# What is wrong with this computation of the geodesic equation from the Lagrangian?

Let $M\subset \mathbb{R}^2$ be a surface. The geodesic equation can be written:

$$\dfrac{D\gamma'}{dt}=0.$$

I want to show that the same equation, together with the Christoffel symbols can be obtained as the Euler Lagrange equation for the Lagrangian

$$L(u,u',v,v')=E(u,v)u'^2+2F(u,v)u'v'+G(u,v)v'^2,$$

where $E,F,G$ are the coefficients of the first fundamental form.

Now, I computed

$$\dfrac{\partial L}{\partial u}=\dfrac{\partial E}{\partial u}u'^2+2\dfrac{\partial F}{\partial u}u'v'+\dfrac{\partial G}{\partial u}v'^2,$$

$$\dfrac{\partial L}{\partial u'}=2Eu'+2Fv'.$$

In that case we have

$$\dfrac{d}{dt}\dfrac{\partial L}{\partial u'}=2\left(\dfrac{\partial E}{\partial u}u'+\dfrac{\partial E}{\partial v}v'\right)u'+2Eu''+2\left(\dfrac{\partial F}{\partial u}u'+\dfrac{\partial F}{\partial v}v'\right)v'+2Fv''.$$

In that case writing down the Euler-Lagrange equation for the $u$-coordinate we have

$$-\dfrac{\partial E}{\partial u}u'^2+\left(\dfrac{\partial G}{\partial u}-2\dfrac{\partial F}{\partial v}\right)v'^2+2\dfrac{\partial E}{\partial v}u'v'+2Eu''+2Fv''=0.$$

The problem is that the $u$-th coordinate of the first equation I wrote is:

$$u''+\Gamma^1_{11}u'^2+\Gamma^{1}_{12}u'v'+\Gamma^1_{22}v'^2=0.$$

The problem here is that in my equation there appears $2Fv''$. In the original equation there is no $v''$ term, so something is quite wrong here.

I should be able to recover from the Lagrangian the geodesic equation together with all Christoffel symbols.

What is wrong here? Why I'm not getting the geodesic equation as expected?

Since your first fundamental form is not diagonal, the two equations you get from Euler-Lagrange will not be individually equivalent to the two geodesic equations, despite the fact that the two systems are equivalent. The relationship is via the first fundamental form matrix $g$ - if you view the geodesic equation as the vector ODE
$$\gamma'' - \Gamma(\gamma',\gamma') = 0$$
$$g\gamma'' - g\Gamma(\gamma',\gamma')= 0.$$
Since $g$ is not diagonal, this transformation mixes the two equations; but it does not change their solutions (since $g$ is invertible).