TITLE: Independence of function and its derivative in calculus of variations
QUESTION [7 upvotes]: It's common to see in calculus of variation that the integrand $f$ of functional $F[y]=\int f(y,y',x)dx$ is a function of $y,y'$ and $x$. Why do we regard the derivative $y'$ as an independent variable to $y$? And why don't we involve $x$ explicitly in $\displaystyle \delta F=\int\delta f~dx=\int\left(\frac{\partial f}{\partial y}\delta y+\frac{\partial f}{\partial y'}\delta y'\right)~dx$ ?

REPLY [2 votes]: The derivative of a function is only so much related to the base function. Having proved anything for a function (or it's derivative) entails very little for the other one.
However, I think what looks suspicuous to you is the list of arguments in the functional $f(x,y,y')$. In this regard: try to remind yourself, that the argument list (mostly omitted anyway) is only a reminder to the reader and specifies which quantities a varible or function explicitly depends on!
If your functional would for example not depend on $x$, the lagrange equations reveal a conservation (in mechanics this is the generalized conservation of momentum). If the problem does not involve $y'$, you can treat the resulting Euler Lagrange equations yet another way and find solutions by especially simple means. As pointed out by the other answer, your functional can also involve higher derivatives of $y$ up to order $n$. Then you'd have to acknowledge this fact and use a little different equations to solve the problem. However, what matters is, that the argument list is there only to specify for you what you are dealing with.
Thus I hope I could make clear, that the list of arguments $f(x,y,y')$ says nothing about dependence between the arguments themselves - $y$ is by definition dependent on $x$, if $y'$ should be some nonvanishing quantity!
The variable $x$ does not explicitly appear in the variation, because the variation is carried out wrt a function $y$. If you consider a family of functions depending on $\epsilon$ and walk down the definition of the variation you can see, that the variation is similar to a partial derivative wrt this $\epsilon$! Since a partial derivative considers every other quantity to be "fixed" you can for illustration purposes regard every variation as undergone at fixed $x$!
Hope this clarifies your 2 questions specifically. Otherwise please specify more clearly where the confusion lies.