Hi all, I got set this question as part of my calculus of variations homework, but the lecturer has told me that it's not actually a calculus of variations problem (just a calculus problem).

Find the minimum of the integral:

$\displaystyle I = \int{(2(y+2)^3\frac{dy}{dx}}+(x-7))dx$

I'm not sure whether I should do something involving Leibniz's rule, or whether I should try integrating, then differentiating twice.

So far I got:

$\displaystyle I = {\frac{1}{2}(y+2)^4+\frac{1}{2}x^2-7x$,

since

$\displaystyle \frac{d}{dx}(\frac{1}{2}(y+2)^4) = 2(y+2)^3\frac{dy}{dx}$

Any hints?