So I was reading the proof on the shortest distance between two points being a line (https://en.wikipedia.org/wiki/Calculus_of_variations#Example) but one line of the proof is baffling me. The statement is as follows:
"$\frac{\partial L}{\partial f} -\frac{d}{dx} \frac{\partial L}{\partial f'}=0$
with L = $\sqrt{1 + [ f'(x) ]^2}$.
Since f does not appear explicitly in L, we have $\frac{∂ L}{∂ f}=0$"
I don't see how this statement follows, as, in my mind, $f'$ could very well still depend on $f$. For example, if we take $f=x^2$ we get $L=\sqrt{1+4x^2}=\sqrt{1+4f}$, a function that is clearly dependent on $f$. If someone could point out the flaw in my logic/explain why this must always be the case it would be much appreciated!