I've got an equation of motion (EOM), which is
$ \mu\ddot r=-\frac{k}{r^2} $
How do I find the first integral of this EOM? I'd appreciate it if someone could show me the steps involved. I should get
$ \frac{1}{2}\mu\dot r^2=-k \left( \frac{1}{R}-\frac{1}{r} \right) $
but I'm not sure how to proceed.