# Help understanding a passage in Gelfand and Fomin's Calculus of Variations

Page 19 of Gelfand and Fomin's Calculus of Variations considers the Euler equation arising from functionals of the form $\int_a^b f(x, y)\sqrt{1+y'^2}\, dy$. Letting the integrand be $F$, they give the $\frac{d}{dx} F_{y'}$ term of the Euler equation as $$\frac{d}{dx} \left[f(x,y) \frac{y'}{\sqrt{1+y'^2}}\right] = f_x \frac{y'}{\sqrt{1+y'^2}} + f_y \frac{y'^2}{\sqrt{1+y'^2}} + f \frac{y''}{\left( 1 + y'^2\right)^{3/2}}.$$

(Subscripts are Gelfand and Fomin's notation for partial derivatives.) This formula should stem from the product rule for derivatives, so to my understanding, the second and third terms should be $f$ times the derivative of $\frac{y'}{\sqrt{1+y'^2}}$; that is, they should be $$f \frac{d}{dx} \frac{y'}{\sqrt{1+y'^2}} = f \frac{y'^2}{\sqrt{1+y'^2}} + f \frac{y''}{\left( 1 + y'^2\right)^{3/2}}.$$ So why do Gelfand and Fomin give $f_y$ (which is certainly not a typo) rather than $f$ as the coefficient of $\dfrac{y'^2}{\sqrt{1+y'^2}}$? There's no derivative with respect to $y$ anywhere in the setup, so I don't see how any could arise in the answer.

Actually only the last term comes from $$f \frac{d}{dx} \frac{y'}{\sqrt{1+y'^2}} = \left( \frac{y''}{\sqrt{1+y'^2}}-\frac{y'y'y''}{(1+y'^2)^{3/2}} \right)f = \frac{y''}{(1+y'^2)^{3/2}}f.$$ The first two terms are from the total derivative of $f$, namely $$\frac{df}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \frac{dy}{dx} = f_x + y' f_y$$ by the multivariate chain rule.