# Why can I remove the first term from euler equation for the shortest path between two points?

I'm studying the basic example of Euler's equation that is to obtain the shortest path between two points. $$f = \sqrt {1 + y' ^ 2}$$

$$\frac{\partial f}{\partial y} - \frac{d}{dx}(\frac{\partial f}{\partial y'}) = 0$$

My textbook said that I could replace the first term $$\frac{\partial f}{\partial y}$$ to $$0$$, because there is no $$y$$ in the definition of $$f$$.

I got no intuition to do so, so I tried to calculate $$\frac{\partial f}{\partial y}$$.

$$\frac{\partial f}{\partial x} \frac{\partial x}{\partial y} = \frac{\partial f}{\partial x} \frac{1}{y'} = {(y'^2 + 1)}^{-1/2} = \frac{1}{2}{(y'^2 + 1) ^ {-1/2}}{2y'y''}\frac{1}{y'} = {(y'^2+1)}^{-1/2}y''$$ And I don't think $${(y'^2+1)}^{-1/2}y'' = 0$$. This derivation doesn't seem to give the same result of the textbook.

What did I do wrong?

• $f$ is a function of $y'$ only. So you should get $\frac{df}{dy'}=C\implies \frac{y'}{\sqrt{1+y'^2}}=C$ for some constant $C$. Now show that $y=ax+b$ for constants $a$ and $b$. Sep 15, 2020 at 14:34
• In this case you age considering $y$ and $y’$ to be different variables. This is common notation which I think this is slightly unfortunate. Here the functional to be minimized is $\int^b_a f(x,y,y’)dt$ under the constraint that $y(a)$ and $y(b)$ are the fixed points. Note that $f$ is a function of three variables, and the notation $\frac {df}{dy}$ denotes the derivative of $f$ w.r.t. the second variable. In your case, $f$ doesn’t actually depend on its second variable so the derivative is zero. Sep 15, 2020 at 14:36

What you did wrong is computing the partial derivatives, for instance in your case $$\frac{\partial f}{\partial x}=0$$ (see this).

For example if $$f(x,u)=x^{2}+u(x)$$, then $$\frac{\partial f}{\partial x}=2x,\frac{\partial f}{\partial u}=1$$ and $$\frac{df}{dx}=2x+\frac{d}{dx}u.$$

Continuing from your example, since $$\frac{\partial f}{\partial y}=0$$, then we have $$- \frac{d}{dx}(\frac{\partial f}{\partial y'}) = 0$$ or $$\frac{d}{dx}(\frac{\partial f}{\partial y'}) =0.$$

So $$\frac{d}{d x}(\frac{\partial f}{\partial y'})=\frac{d}{dx}(\frac{\partial }{\partial y'}\big((1+y'^{2})^{\frac{1}{2}}\big)$$ $$=\frac{d }{dx}(\frac{y'}{\sqrt{1+y'^{2}}})=0$$

(You may think of $$\frac{\partial}{\partial y'}\big((1+y'^{2})^{\frac{1}{2}}\big)$$ the same as computing $$\frac{d}{dx}\sqrt{1+x^2}$$).

Then you have $$\frac{y'}{\sqrt{1+y'^{2}}}=c_{1}$$ and since the denominator is never $$0$$ we have $$y'^{2}=c_{1}^2(1+y'^{2})$$ so re-arranging gives

$$y'^{2}=\frac{c_1^{2}}{1-c_{1}^2}$$

(Can $$c_{1}=\pm 1$$?) so you have $$y'=\sqrt{\frac{c_1^{2}}{1-c_{1}^2}}=\text{constant}=a$$

Thus $$y(x)=ax+b.$$