I want to solve following differential equations using mathematica (I know the solution as it is easy to compute): $$\dot{r}^2+r^2\dot{u}^2=2\kappa^2\frac{1}{r}+h,$$ $$r^2\dot{u}=c.$$ To computer the solution we substitute second equation in the first and then eliminate the time variable from these equations using, $$\dot{r}=\frac{dr}{du}\frac{du}{dt}=\frac{dr}{du}cr^{-2}.$$ Substituting this we get $$\left(\frac{dr}{du}\right)^2\frac{c^2}{r^4}+r^2\frac{c^2}{r^4}=2\kappa^2\frac{1}{r}+h.$$ Can someone please show me how to do this using mathematica?
I have tried following things, but that didn't work:
expr = r'[t]^2 + r[t]^2 u'[t]^2 - 2 κ^2/r[t] - h
expr1 = expr /. r -> (r[u[#]] &)
expr2 = Eliminate[{expr1 == 0, u'[t] == c r[u[t]]^-2}, u'[t]]
expr3 = expr2 /. {r'[u[t]] -> c r[u[t]]^-2 r'[u[t], u[t]], u'[t] -> c r[u[t]]^-2}

{}button above the edit window. The edit window help button?is also useful for learning how to format your questions and answers. You may also find this this meta Q&A helpful – Michael E2 Mar 07 '16 at 12:46DSolveandNDSolve? – Michael E2 Mar 07 '16 at 12:48