Trajectories in an Attractive Central Potential
by Jason Janesky, Corinne Manogue & Kerry Browne
Copyright 2010 Corinne Manogue

Initialization

SetOptions[Plot,BaseStyle->{FontFamily->"Arial",FontSize->16},PlotStyle->{{Black,AbsoluteThickness[1.5]}},AxesLabel-> {"r","Energy"},AxesStyle->Directive[FontFamily->"Arial",FontSize->16,Black,AbsoluteThickness[0.5],Arrowheads[0.04]],TicksStyle->{{Black,AbsoluteThickness[0.5]},{Black,AbsoluteThickness[0.5]}}];

SetOptions[ParametricPlot,BaseStyle->{FontFamily->"Arial",FontSize->16},PlotStyle->{{Black,AbsoluteThickness[1.5]}},AxesLabel-> {"x","y"},AxesStyle->Directive[FontFamily->"Arial",FontSize->16,Black,AbsoluteThickness[0.5],Arrowheads[0.04]],TicksStyle->{{Black,AbsoluteThickness[0.5]},{Black,AbsoluteThickness[0.5]}}];

Worksheet

Plot orbits and motion in effective potential

Define effective potential

Veff[r_,L_]:=-1/r+L^2/(2*r^2)

Find numerical solution of differential equations (see Taylor p. 300) with μ = 1 and U(r) = -1/r  (i.e. k=1).

soln[Energy_?NumericQ,L_?NumericQ]:=NDSolve[
{r''[t]==-1/(((r[t])^2))+(L^2)/(((r[t])^3)),ϕ'[t]==L/(((r[t])^2)),r[0]==(Sqrt[1+2*(L^2)*Energy]-1)/(2*Energy),r'[0]==0,ϕ[0]==0},{r,ϕ},{t,0,25}]

Manipulate[a=-1/2/Energy;
τ=2*π*Sqrt[(a^3)];
vmax=Abs[1.1*(1/2/(L^2))];
eps=Sqrt[1+Energy*2*(L^2)];
rmin=(L^2)/(1+eps);
rmax=(L^2)/(1-eps);
ImgSz=400;
g1=ParametricPlot[Evaluate[{r[t]*Cos[ϕ[t]],r[t]*Sin[ϕ[t]]}/.soln[Energy,L][[1]]],{t,0,τ},PlotRange->All,PlotStyle->{Thick,Blue},Epilog->{Orange,Disk[{0,0},a/10],Red,Disk[Evaluate[{r[x]*Cos[ϕ[x]],r[x]*Sin[ϕ[x]]}/.soln[Energy,L][[1]]],a/15]},ImageSize->ImgSz];g2=Plot[Veff[r,L],{r,0,rmax*1.3},PlotRange->{-vmax,vmax/2}, PlotStyle->{Magenta,Thick},AspectRatio->1,Epilog->{Red,Disk[{r[x]/.soln[Energy,L][[1]],Energy},{1.3*rmax/30,1.5*vmax/30}],Black,Text["E = "<>ToString[Energy],{rmax,vmax/2.5}],Text["L = "<>ToString[L],{rmax,vmax/3.5}],Green,Thick,Line[{{rmin,Energy},{rmax,Energy}}]},ImageSize->ImgSz];
Grid[{{g1,g2}}],{{Energy,-0.4,Energy},-1,-0.1},{{L,0.8,L},0.1,2},{{x,0,t},0,25},SaveDefinitions->True]