Rewriting ODEs with polar coordinates I have been working on a problem on satellite orbits but i've been stuck solving one part for a while. I have the following set of ODEs. $(x(t),y(t))$ describe the trajectory of the satellite.
\begin{equation}
x^{\prime\prime}=-\frac{x}{r^{3}}, \;\; y^{\prime\prime}=-\frac{y}{r^{3}},
\end{equation}
where $r$ is the distance of the satellite to the centre of the earth.
\begin{equation}
r=\sqrt{x^{2}+y^{2}}.
\end{equation}
Now using polar coordinates, $x=r\cos\theta$ and $y=r\sin\theta$, I need to rewrite the ODEs as
\begin{equation}
r^{\prime\prime}-r(\theta^{\prime})^{2}+\frac{1}{r^{2}}=0,\;\; (r^{2}\theta^{\prime})^{\prime}=0.
\end{equation}
To start off I computed $x^{\prime\prime}$ and $y^{\prime\prime}$:
\begin{equation}
x^{\prime\prime}=r^{\prime\prime}\cos\theta-2r^{\prime}\theta^{\prime}\sin\theta-r\theta^{\prime\prime}\sin\theta-r(\theta^{\prime})^{2}\cos\theta
\end{equation}
\begin{equation}
y^{\prime\prime}=r^{\prime\prime}\sin\theta+2r^{\prime}\theta^{\prime}\cos\theta+r\theta^{\prime\prime}\cos\theta-r(\theta^{\prime})^{2}\sin\theta
\end{equation}
Now if I plug these back into our original ODEs and simplify I get
\begin{equation}
r^{\prime\prime}-r(\theta^{\prime})^{2}-\frac{\sin\theta}{\cos\theta}(2r^{\prime}\theta^{\prime}+r\theta^{\prime\prime})+\frac{1}{r^{2}}=0
\end{equation}
\begin{equation}
r^{\prime\prime}-r(\theta^{\prime})^{2}+\frac{\cos\theta}{\sin\theta}(2r^{\prime}\theta^{\prime}+r\theta^{\prime\prime})+\frac{1}{r^{2}}=0
\end{equation}
This is the point where I get stuck, I can't seem to figure out how to remove the terms with $\sin$ and $\cos$ to determine the first desired ODE. I have also considered that maybe I need to find the second ODE first but I also can't figure out how to determine that one from this point.
Edit: Thanks to Ninad Munshi's answer I understand how to get the first of the two equations. However I have not been able to determine the second equation. I have tried using the first equation and also from the original ODEs but unfortunately I don't even manage to find anything close.
 A: The adding went wrong, but it works out fine if you multiply both sides by a trig function before adding them. On the one hand
$$\begin{cases}x''\frac{x}{r} = -\frac{x^2}{r^4} \\ y''\frac{y}{r} = -\frac{y^2}{r^4}\end{cases} \implies x''\frac{x}{r}+y''\frac{y}{r} = -\frac{x^2+y^2}{r^4} = -\frac{1}{r^2}$$
On the other
$$\begin{cases}x''\frac{x}{r} = r''\cos^2\theta-2r'\theta'\sin\theta\cos\theta-r\theta''\sin\theta\cos\theta -r(\theta')^2\cos^2\theta \\ y''\frac{y}{r} = r''\sin^2\theta+2r'\theta'\sin\theta\cos\theta+r\theta''\sin\theta\cos\theta -r(\theta')^2\sin^2\theta \end{cases} $$ $$\implies x''\frac{x}{r}+y''\frac{y}{r} = r''-r(\theta')^2$$
Set these equal and you are done.
A: The last two equations you got have many similar terms, collecting them one can bring the equations to the form
$$
A-BC=0\\
A+\frac{C}{B}=0
$$
where
$$
A=r''−r(θ')^2+\frac1{r^2},~~~B=\tanθ~~\text{ and }~~C=2r'θ'+rθ''.
$$
It follows that $(B^2+1)C=0$, so that $C=0$ and thus also $A=0$.
Then also
$$
0=rC=2rr'\,θ'+r^2θ''=(r^2θ')'.
$$

Another way to do this compactly is to set $z=x+iy=re^{iθ}$, so that then $z'=(r'+irθ')e^{iθ}$,
$$
z''=(r''+2ir'θ'+irθ''-rθ'^2)e^{iθ}=-\frac{z}{|z|^3}=-\frac{e^{iθ}}{r^2}.
$$
Now cancel $e^{iθ}$ and separate real and imaginary parts.

See also other posts on the topic of separating Kepler's second law out of the DE for a central force field, like

*

*Coupled second order differential equations for radial field

*Solving $\frac{\mathrm d^2\mathbf{q}}{\mathrm dt^2} = -\frac{\mathbf{q}}{|\mathbf{q}|^3}$

*Any central force implies conservation of angular momentum

*Developing Kepler's first law from the two-body problem
