TITLE: Geodesics of this metric
QUESTION [6 upvotes]: I have to calculate the geodesics of the metric:
$$\left(\matrix {1 &0\\0& x^2 }\right)$$
I've been able to derive its equations, which are:
$$\ddot x -x\dot y ^2=0$$
$$\ddot y+\frac{2}{x}\dot x\dot y=0$$
It's easy to check that lines of constant $y$ are solutions of that equation: all $(v_0t+x_0,y_0)$ satisfy the above, so geodesics between two points of the form $(x_1,y_1)$, $(x_2,y_1)$ are straight lines, but I can't get the general solutions.
Any help? Thanks in advance.
BTW, To avoid calculations on your side, the Riemann tensor, and therefore the Ricci tensor and scalar curvature, vanish., so $R^2$ with that metric is flat

REPLY [3 votes]: Note that 
$$ \ddot{y} + \frac{2}{x}\dot{x}\dot{y} = \frac{1}{x^2}\frac{d}{dt}\left(\dot{y}x^2\right) = 0$$
so we can now solve for $\dot{y}$:
$$\dot{y} = \frac{C}{x^2}$$
which gives
$$\ddot{x} - x\dot{y}^2 = \ddot{x} - \frac{C^2}{x^3} = 0 $$
This is solved by
$$x(t) = \pm\frac{\sqrt{C^2 + a^2(t+b)^2}}{\sqrt{a}}$$
for integration constants $a,b$. The last equation I leave for you to solve
$$y(t) - y(0) = \int_0^t\frac{C a}{C^2 + a^2(t+b)^2}dt $$