Finding r(ϕ) from r(t) and ϕ(t) to plot Newtonian orbits

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
Poirot
Messages
87
Reaction score
2

Homework Statement


I'm trying to plot Newtonian orbits in Mathematica with the goal of extending this to orbits including GR after. I've derived equations for r(t) and ##\phi##(t) (see below) by integrating ##\dot{r}## and ## \dot{\phi} ## (see below also) from E = 1/2mv2 +V(r) with velocity being split into angular and radial terms and V(r) = GMm/r. I think I then need to find an equation for r(##\phi##) to then plot in Mathematica using the ParametricPlot function but I can't see how to do this as my equations for r(t) and ##\phi##(t) are tricky.

Homework Equations


##\dot{r} = \sqrt{\frac2m(E-\frac{GMm}{r})-\frac{L^2}{m^2r^2}}##
##\dot{\phi} = \frac{L}{mr(t)^2}##
##r(t)=\sqrt{\frac2m(E-\frac{GMm}{r})-\frac{L^2}{m^2r^2}} t + r_0##
##\phi(t)=\frac{L}{m}\frac{ln(m\sqrt{\frac2m(E-\frac{GMm}{r})-\frac{L^2}{m^2r^2}} t + r_0m)}{\sqrt{\frac2m(E-\frac{GMm}{r})-\frac{L^2}{m^2r^2}}} + \phi_0 ##
##r(0)=r_0##
##\phi(0)=\frac{L}{m}\frac{ln(r_0m^2)}{\sqrt{\frac2m(E-\frac{GMm}{r})-\frac{L^2}{m^2r^2}}} + \phi_0 ##

The Attempt at a Solution


I tried finding initial conditions at t=0 (see equations above) but I'm not sure if any of this is even right? It seems to have gotten to complicated. If everything I have done so far is correct, I'm not sure how to then find r(##\phi##) and if I was to find this how to convey all this information into a ParametricPlot function in order to obtain the orbits.

Any help would be greatly appreciated, Thanks.
 
Physics news on Phys.org
If you have ##r(\phi)##, you could use PolarPlot. For ParametricPlot, you need expressions for ##x(t)## and ##y(t)##. With ##r(t)## and ##\phi(t)##, that's straightforward using the usual polar-to-Cartesian coordinate transformation.
 
Thanks for the reply!
I had planned to find ##r(\phi)## and then used ParametricPlot with ##r(\phi)Cos(\phi)## and ##r(\phi)Sin(\phi)## so that I could plot independent of t (As this is what I think my supervisor implied to do) but in practice I've gotten myself quite confused. I tried plotting ##r(t)## and ##\phi(t)## as a ParametricPlot of t also but this didn't seem to work, which I think I can see why from what you've just said. So I've just retried this using ##r(t)Cos(\phi(t))## and ##r(t)Sin(\phi(t))## plotting with changing t but this didn't seem to work either? It may be that I'm just not that great at Mathematica too, but I can't see any clear mistake I've made in syntax.

Thanks again.