I need to minimize a (very simple) functional using variational calculus:
$F (x,\,f (x),f'(x)) = 5f(x)^2 + (x^3 + 3x^2 + 9x)\,f'(x)$
Plugging that into the Euler-Lagrange equation gives
$\frac{\partial}{\partial f}\left(5f(x)^2 + (x^3 + 3x^2 + 9x)\,f'(x)\right) - \frac{d}{dx}\frac{\partial}{\partial f'}\left(5f(x)^2 + (x^3 + 3x^2 + 9x)\,f'(x)\right) = 0$
For the second term I find
$\frac{d}{dx}\frac{\partial}{\partial f'}\left(5f(x)^2 + (x^3 + 3x^2 + 9x)\,f'(x)\right) = 3x^2 + 6x + 9$
For the first term I would intutitively say
$\frac{\partial}{\partial f}\left(5f(x)^2 + (x^3 + 3x^2 + 9x)\,f'(x)\right) = 5$
because $f$ ist not squared (only the result of $f$ is), but plugging that into Wolframalpha gives
$\frac{\partial}{\partial f}\left(5f(x)^2 + (x^3 + 3x^2 + 9x)\,f'(x)\right) = 0$
Is this correct and how can I get there?