How to calculate the geodesics in polar coordinates? I know that:
$$
\ddot{r}^2 = r\dot{\phi}^2
$$
and
$$
\ddot{\phi}=-\frac{2}{r}\dot{r}\dot{\phi}
$$
and I know that using this I should be able to get the geodesic equations, but for my life I just can't, I keep trying but I end up with things I cannot solve.
I tried getting $r$ from the first equation and replacing it in the second, getting $\dot{\phi}$ from the second and replacing it in the first, I even found that:
$$
r^2\dot{\phi} = constant
$$
but that didn't help at all, I am completely stuck and I can't find any derivation of the geodesic equations anywhere in the internet, please help I want to understand
 A: Brute-force method
From your second equation:
$$r\ddot{\varphi}+2\dot r\dot\varphi=0$$
$$r^2\ddot{\varphi}+2r\dot r\dot\varphi=0$$
$$\frac{d}{dt}\left(r^2\dot{\varphi}\right)=0$$
$$r^2\dot{\varphi}=C$$
$$\dot{\varphi}=\frac{C}{r^2}\tag{3}$$
From your first equation (you have a typo):
$$\ddot r=r\dot\varphi^2\tag{4}$$
Introduce substitution:
$$r=\frac 1u\implies\frac{dr}{du}=-\frac{1}{u^2}$$
$$\dot r = \frac{dr}{dt}=\frac{dr}{d\varphi}\dot\varphi=\frac{dr}{du}\frac{du}{d\varphi}\frac{C}{r^2}=-\frac{1}{u^2}\frac{du}{d\varphi}Cu^2=-C\frac{du}{d\varphi}$$
$$\ddot r=\frac{d\dot r}{dt}=\frac{d\dot r}{d\varphi}\dot\varphi=\frac{d}{d\varphi}\left(-C\frac{du}{d\varphi}\right)\frac{C}{r^2}=-C^2u^2\frac{d^2u}{d\varphi^2}\tag{5}$$
Now replace (5) into (4):
$$-C^2u^2\frac{d^2u}{d\varphi^2}=\frac{1}{u}\left(\frac{C}{r^2}\right)^2=C^2u^3$$
...Which leads to:
$$\frac{d^2u}{d\varphi^2}+u=0\tag{6}$$
or:
$$u=\frac{1}{r}=C_1\cos\varphi+C_2\sin\varphi$$
or, finally:
$$r=\frac{1}{C_1\cos\varphi+C_2\sin\varphi}\tag{7}$$
But this is all baloney :)
Smart method
Your first equation simply says that the radial component of accelaration $a_r=\ddot r-r\dot\varphi^2$ is equal to zero.
Your second equation says that the circular component of accelaration $a_c=r\ddot\varphi+2\dot r\dot\varphi$ is also equal to zero.
So the total acceleration is zero, velocity is constant and trajectory must be a straight line:
$$y=ax+b$$
$$r\sin\varphi=ar\cos\varphi+b$$
$$r=\frac{b}{\sin\varphi - a\cos\varphi}\tag{8}$$
...which is equivalent to (7), just with a different constants :)
