Let $L:(t,q,\dot q)\mapsto L(t,q,\dot q)$ a Lagrangian defined on $U\times \mathbb{R}^n$, with $U\subset \mathbb{R}^n$.
A Lagrangian variational problem consists in, given two points $x$ and $y$ of $U$, finding the curves $c:[a,b]\to U$ such that $c(a)=x, c(b)=y$ and the quantity $$ \Phi(c(.)) = \int_a^b L(c(t),\dot c(t))dt \tag{1} $$ is minimised.
An extremal of a Lagrangian variational problem is a curve which cancels the differential of $\Phi$ (defined on all curves with fixed extremeties).
Consider a Riemannian metric $g$ on $\mathbb{R}^n$ and $L(q,\dot q)=\sqrt{g_q(\dot q)}$. A geodesics is an extremal of the variational problem associated to the Lagrangian $L^2(q,\dot q)=g_q(\dot q)$.
Question : Show that the geodesics are extremals of $L$ with constant speed.
Proof : The Euler Lagrange equations associated to $L^2$ can be written as $$ 2L\frac{\partial L}{\partial q} -\frac{d}{dt}\left(2\dot L \frac{\partial L}{\partial \dot q}\right)=0 $$ that is $$ \frac{\partial L}{\partial q} -\frac{d}{dt}\left(\frac{\partial L}{\partial \dot q}\right) -2\dot L \frac{\partial L}{\partial \dot q}=0. \qquad (*) $$
Now if $q(.)$ is a gedesics, we can show first that $$\frac{d}{dt}(2L^2(q,\dot q))=\frac{d}{dt}(L^2(q,\dot q))$$ using only the Euler Lagrange equations for $L^2$. Thsi proves that $q(.)$ is with constant speed i.e. $\dot L=0$. Then from (*) we get $\frac{\partial L}{\partial q} -\frac{d}{dt}\left(\frac{\partial L}{\partial \dot q}\right)=0$ and $q(.)$ is an extremal of $L$.
Conversely, if $q(.)$ is an extremal of $L$ with constant speed then $\frac{\partial L^2}{\partial q} -\frac{d}{dt}\left(\frac{\partial L^2}{\partial \dot q}\right)=-2\dot L \frac{\partial L}{\partial \dot q}=0$ since $\dot L = \frac{\partial g_q}{\partial \dot q}\ddot q=0$.
Is it correct ?