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!
In this case $L \colon \mathbb{R} \times \mathbb{R} \times\mathbb{R} \to \mathbb{R}$ is defined via $L(x,f,g) = \sqrt{1 + g^2}$.
When writing $\frac{\partial L}{\partial f}$ the author is referring to the derivative of $L$ with respect to its second variable, which in this case is $0$ since $f$ does not appear in the expression for $L$. (To put it in a different way, $L$ is constant with respect to the variable $f$)
To expand a little bit more on the notation, $L = \sqrt{1 + f'(x)}$ actually means $$L(x,f(x),f'(x)) = \sqrt{1 + f'(x)}.$$