I/
I have an exercise asking me to prove that the length between two points is a straight line using Euler Lagrange (in 2 dimensions).
I all ready know that this type of solution exist: https://en.wikipedia.org/wiki/Euler–Lagrange_equation#Example, Euler-Lagrange Eqn to find eqn of a straight line but i wanted to know if my solution is correct too despite the fact that it is different.
II/
By assuming that the relief over the entire movement area is flat and that teleportation doesn't exist (sadly) all the paths $\overrightarrow{\gamma (t)}$ over this map are described by $\overrightarrow{\gamma (t)}=\binom{x(t)}{y(t)} \in C^1 $.
Hence the length of all those paths are given by the line integral: $\int_{t_i}^{t_f}\left \| \overrightarrow{\gamma' (t)} \right \|dt=\int_{t_i}^{t_f}\sqrt{\dot{x}^2+\dot{y}^2}dt$
Now let note: $L(q(t),\dot{q}(t), t)=L(\dot{x},\dot{y})=\sqrt{\dot{x}^2+\dot{y}^2}$ with $q(t)=(x(t),y(t))$ and $\dot{q}(t)=(\dot{x},\dot{y})$
So by Euler-Lagrange's equation we have: (very similar for $\dot{y}$)
$\frac{\partial L}{\partial x}=0=\frac{\partial L}{\partial y}$
$\frac{\partial L}{\partial \dot{x}}=\frac{\dot{x}}{\sqrt{\dot{x}^2+\dot{y}^2}}$
$\frac{\mathrm{d} }{\mathrm{d} t}(\frac{\partial L}{\partial \dot{x}})=\frac{\mathrm{d} }{\mathrm{d} t}(\frac{\dot{x}}{\sqrt{\dot{x}^2+\dot{y}^2}})=\frac{\dot{y}(\ddot{x}\dot{y}-\ddot{y}\dot{x})}{(\dot{x}^2+\dot{y}^2)^{3/2}}$
So we write:
$\frac{\partial L}{\partial x}=0=\frac{\dot{y}(\ddot{x}\dot{y}-\ddot{y}\dot{x})}{(\dot{x}^2+\dot{y}^2)^{3/2}}=\frac{\mathrm{d} }{\mathrm{d} t}(\frac{\partial L}{\partial \dot{x}})\Rightarrow \ddot{x}\dot{y}-\ddot{y}\dot{x}=0$
Note: we get exactly the same equation $\ddot{x}\dot{y}-\ddot{y}\dot{x}$ if we derive by $\dot{y}$
So to solve $\ddot{x}\dot{y}-\ddot{y}\dot{x}$ we just have to ask that $\ddot{y}=0$ and $\ddot{x}=0$. Hence $x(t)=At+B$ and $y(t)=Ct+D$ and this is exactly the parametric equation of a straight line.
III/
Is it correct?
Moreover i think that in order for my demonstration to be totally finished i need to add that there is only one type of solution to this type of differential equation $\ddot{x}\dot{y}-\ddot{y}\dot{x}=0$. Is there a theorem like this one?
Thank you for your help.
Thank to @Lutz Lehmann i hope the solution below is correct and complete.
So we need to solve:
$\dot{y}(\ddot{x}\dot{y}-\ddot{y}\dot{x})=0$ and $\dot{x}(\ddot{y}\dot{x}-\ddot{x}\dot{y})=0$
Possible solution:
1/$\dot{y}=0$ and $\dot{x}=0 \Rightarrow x(t)=A $ and $y(t)=B$
2/$\ddot{y}\dot{x}-\ddot{x}\dot{y}=0 \Rightarrow \ddot{x}=0$ and $\ddot{y}=0$ are possible solution. Hence: $x(t)=Ct+A$ and $y(t)=Dt+B$
3/$\ddot{y}=c(t)\dot{y}$ and $\ddot{x}=c(t)\dot{x}$ with the same $c(t)$ for $x(t)$ and $y(t)$. We solve the differential equations and we get $x(t)=\int e^{\int c(t)dt}d\breve{t}+R$ and $y(t)=\int e^{\int c(t)dt}d\breve{t}+R$
In summary we have 2/ that is the definition of the parametrisation of a straight line while 1/ is just a special case of 2/ with $C=0=D$. Concerning 3/ we get the same the same straight-line solutions, but not with uniform speed in their parametrization.
So Q. E. D.