Solving the Euler-Lagrange equations for geodesics I am trying to find geodesics on the following metric: $ds^2 = dx^2 + x^2 dy^2$
Setting $dx \rightarrow \dot{x}, dy \rightarrow \dot{y}$ in $ds^2$ i get following Lagrangian: $L = \dot{x}^2 + x^2 \dot{y}^2$. Then i write E-L equations: $\frac{d}{dt} (\frac{\partial L}{\partial \dot{x_i}}) - \frac{\partial L}{\partial x_i} = 0$
In my case they are:
$\begin{cases}
\ddot{x} - \dot{x} \dot{y}^2 = 0 \\
2\dot{x} \dot{y} + x \ddot{y}^2 = 0
\end{cases}
$ 
As far as i understand, solving these will yield geodesics. 
Ok, let's solve second equation:
$$
\frac{2}{x} \dot{x} \dot{y} + \ddot{y} = 0 \\
\frac{\dot{y}}{\dot{y}} = -\frac{2\dot{x}}{x} \\
(\ln \dot{y})' = (-2 \ln x)' \\
(\ln \dot{y})' = (\ln x^{-2})' \\
\ln \dot{y} = const + \ln x^{-2} \\
\dot{y} = \frac{c}{x^2} \\
$$
Solution presented above looks good to me, let's substitute $\dot{y}$ in the first equation and try to solve it:
$$
\ddot{x} - \frac{c^2}{x^4} \dot{x} = 0
$$
And that is where i get lost, i have no idea how to solve it. 
I tried to do the following: let's substitute $\dot{x} = p(x)$, then $\ddot{x} = p'(x) \dot{x} = p'p$ 
$$
x^4 p' p - c^2 p = 0 \\
x^4 p' = c^2 \\
p' = \frac{c^2}{x^4}, dp = \frac{c^2 dx}{x^4} \\
p = -\frac{c^2}{3x^3} + c_1 \\
 \frac{dx}{dt} = c_1 - \frac{c^2}{3x^3} \\
$$
How can i solve this last equation ($\frac{dx}{dt} = c_1 - \frac{c^2}{3x^3}$)? 
And is there any other, easier way to find geodesics on this metric?
 A: I can see a problem right off the bat:
$$L=\dot x^2+x^2\dot y^2$$
$$p_x=\frac{\partial L}{\partial\dot x}=2\dot x$$
$$\dot p_x=2\ddot x=\frac{\partial L}{\partial x}=2x\dot y^2$$
Since your equation for $\dot p_x$ was not just a typo in my reading of your solution, you were hosed at this point.
$$p_y=\frac{\partial L}{\partial\dot y}=2x^2\dot y$$
$$\dot p_y=\frac d{dt}(2x^2\dot y)=\frac{\partial L}{\partial y}=0$$
So you have an immediate integral, $2x^2\dot y=p_y=\text{constant}$. We can use that in the $\dot p_x$ equation:
$$\dot x=\frac{dx}{dt}=\frac{dx}{dy}\frac{dy}{dt}=\dot y\frac{dx}{dy}=\frac{p_y}{2x^2}\frac{dx}{dy}$$
$$\ddot x=\frac{p_y}{2x^2}\left(-\frac{p_y}{x^3}\left(\frac{dx}{dy}\right)^2+\frac{p_y}{2x^2}\frac{d^2x}{dy^2}\right)=x\dot y^2=\frac{p_y^2}{4x^3}$$
$$x\frac{d^2x}{dy^2}-2\left(\frac{dx}{dy}\right)^2=x^2$$
Now we can let $u=\frac1x$.
$$\frac{dx}{dy}=-\frac1{u^2}\frac{du}{dy}$$
$$\frac{d^2x}{dy^2}=\frac2{u^3}\left(\frac{du}{dy}\right)^2-\frac1{u^2}\frac{d^2u}{dy^2}$$
$$-\frac1{u^3}\frac{d^2u}{dy^2}+\frac2{u^4}\left(\frac{du}{dy}\right)^2-2\left(-\frac1{u^2}\frac{du}{dy}\right)^2=-\frac1{u^3}\frac{d^2u}{dy^2}=\frac1{u^2}$$
So we are down to
$$\frac{d^2u}{dy^2}+u=0$$
And we know the solution $u=c_1\cos y+c_2\sin y=\frac1x$
We can rearrange to
$$x\sin y=-\frac{c_1}{c_2}x\cos y+\frac1{c_2}$$
Let's see, what could have gone wrong with my solution? If $c_2=0$, then $c_1\ne0$ and we get $x\cos y=\frac1{c_1}$. If $p_y=0$, that would invalidate just about all of the above so that case has to be dealt with separately. That implies either $x=0$ or $\dot y=0$ so that $\ddot x=0$, so we can integrate to $x=c_3+c_4t$. If $c_3=c_4=0$, then $y$ is indeterminate, which is fine because that's a natural consequence of being at the origin in polar coordinates. If $c_4=0\ne c_3$, then $\dot y=0$ so the solution is a single point. If $c_4\ne0$ then again $\dot y=0$, so $y=y_0$, a constant, which is the equation for a line through the origin in polar coordinates. These are all exactly the solutions we knew we would get because they are the equations for a straight line in polar coordinates.
