I'm studying equations for geodesics of the plane in polar coordinates from the book "gravity by James hartle" and I am stuck at the last step which involves partial derivative of 3 variable. The metric of the plane in polar coordinates $r$ and $Φ$ is : $$ dS^2 = dr^2 + r^2dΦ^2 $$ A curve between two points $A$ and $B$ can be described parametrically by giving $r$ and $Φ$ as a function of a parameter $σ$ which varies between $σ=0$ at point $A$ and $σ=1$ at point $B$ distance between $A$ and $B$ is given by: $$ \int_A^B dS = \int_A^B (dr^2 + r^2 dΦ^2)^{1/2} = \int_0^1 {dσ} \left[ \left(\frac{dr}{dσ}^2\right) + r^2\left(\frac{dΦ}{dσ}\right)^2\right]^{1/2} $$ Solve the above equation by Lagrangian and we will get : $$ \frac d{dσ}\left(\frac1L\frac{dr}{dσ}\right) = \frac rL\left(\frac{dΦ}{dσ}\right)^2 \tag{1} $$$$ \frac d{dσ}\left(\frac1L r^2 \frac{dΦ}{dσ}\right) = 0 \tag{2} $$ Now writer says that the value of $L$ is just $dS/dσ$. Therefore, multiplying above equations by $dσ/dS$, the equations for geodesics using the distance $S$ as the parameter along the curve take the simple form $$ \frac{d^2r}{ds^2} = r\left(\frac{dΦ}{dS}\right)^2 \tag{3} $$$$ \frac d{dS}\left(r^2 \frac{dΦ}{dS}\right) = 0 \tag{4} $$
Can somebody please explain how do we get equations 3 and 4 from 1 and 2 ?? I understand the rest of the calculation but facing difficulty how to deal with these mix partial derivatives.
Thanks