Integral replacement I have the following integral
$φ=\frac{M}{\sqrt{2m}}\int_{ }^{ }\frac{dr}{r^{2}\sqrt{E-\frac{M^{2}}{2mr^{2}}-\frac{kr^{2}}{2}}}$
As a result, I want to get the following result: $r=\frac{p}{1-ε\cosφ}$ This satisfies the ellipse equation in polar coordinates
I know I have to get an integral that reduces to an arccosine or an arcsine, but I can't think of a replacement for $p$, $ε$

$E=\frac{1}{2}m\dot{r}^2+\frac{1}{2}mr^2\dot{\theta}^2+\frac{1}{2}kr^2=\frac{1}{2}m\dot{r}^2+\frac{1}{2} \frac{ L^2}{mr^2} +\frac{1}{2}kr^2$
$k/m=\omega^2$
$\frac{2E}{m}=\dot{r}^2+\frac{L^2}{m^2r^2}+\omega^2r^2$
$\frac{2E}{m}r^2=r^2\dot{r}^2+\frac{L^2}{m^2}+\omega^2r^4$
$\frac{2E}{m}r^2-\omega^2r^4-\frac{L^2}{m^2}=r^2\dot{r}^2$
$\sqrt{  \frac{2E}{m}r^2-\omega^2r^4-\frac{L^2}{m^2}}=r\dot{r}$
$dt=\frac{rdr}{\sqrt{\frac{2E}{m}r^2-\omega^2r^4-\frac{L^2}{m^2}}}, u=r^2$
$dt=\frac{du}{2\sqrt{\frac{2E}{m}u-\omega^2u^2-\frac{L^2}{m^2}}}$
Complete the square.
$dt=\frac{du}{2\omega\sqrt{\frac{-E^2}{m^2\omega^2}+ \frac{2E}{m\omega^2}u-u^2+\frac{E^2}{m^2\omega^2}-\frac{L^2}{m^2\omega^2}}}$
$dt=\frac{du}{2\omega\sqrt{\alpha^2-(u-\frac{E}{m\omega^2})^2}}$
Now with some variable substitution, you should be able to get it to something of the form $\int \frac{du}{\sqrt{1-u^2}}$
Then you have $\omega t=\arcsin(Au+B)+C$ for appropriate constants.
From there: $(\sin(\omega t-C)-B)/A=u$
Once you have $u$, you have $r$. From $r$ you can get $\dot{\theta}=\frac{L}{mu}$
By the chain rule:
$\frac{dr}{d\theta}=\frac{\dot{r}}{\dot{\theta}}$
