Calculus of variation proof confusion. 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!
 A: 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)}.$$
A: I think in order to fully clarify what is going on it is better if we solve this problem from scratch; then it will become clear what is happening.
Suppose $y_0(t)$ is the stationary path (the path minimizing $J[y]$) for
$$J[y] = \int_{t_1}^{t_0}dt \sqrt{1+(\dot{y})^2}:=
\int_{t_1}^{t_0}dt L(t,y,\dot{y})
$$
and $y(t) = y_0(t) +\epsilon\eta(t)$ is a variation such that $\eta(t_0)=\eta(t_1) = 0$. Then assuming $\epsilon$ is small
$$
\sqrt{1+(\dot{y})^2} = \sqrt{1+(\dot{y}_0)^2 + 2\epsilon \dot{\eta}\dot{y}_0}=
\sqrt{1+(\dot{y}_0)^2}\left(1+\frac{\epsilon \dot{\eta}\dot{y}_0}{1+(\dot{y}_0)^2}\right)
$$
Therefore
$$\delta J=J[y] - J[y_0] = \epsilon \int_{t_0}^{t_1} dt \frac{\dot{y}_0}{\sqrt{1+\dot{y}_0^2}}\dot{\eta}=-\epsilon
\int_{t_0}^{t_1} dt \frac{d}{dt}\left[\frac{\dot{y}_0}{\sqrt{1+\dot{y}_0^2}}\right]\eta
$$
The last part is by integration by parts. Now the action ($J[y]$) is stationary if $\delta J = 0$ for any variation $\eta$. This means
$$\frac{d}{dt}\left[\frac{\dot{y}_0}{\sqrt{1+\dot{y}_0^2}}\right]=0$$
which as it turns out is actually $\frac{d}{dt}(\partial L/\partial \dot{y})=0$ (The Euler-Lagrange equation with $\partial L/\partial y=0$). If you go back to the proof of Euler-Lagrange equation you will see that at no point we care about how $y$ does actually depend on $t$. That is actually the whole point since we want to explore over all possible paths and find the extremum. In that sense you have to treat $y$ and $\dot{y}$ as independent variables since we actually do not know anything about their functionality and we we don't even want to know.
In other words, in treating the paths as the variables $\dot{y}=\dot{y}_0+\epsilon \dot{\eta}$, while $y=y_0 + \epsilon \eta$. Even though it is quite possible that $y_0$ and $\dot{y}_0$ are related to each other, since $\eta$ is completely arbitrary, $y$ and $\dot{y}$ are independent.
