File:Closed orbits.gif

Summary

Description
English: Central forces that decay as 1/r² are special, as they guarantee that all bound orbits are going to be closed (Bertrand's theorem). Small changes in the power will lead to significantly different kind of orbits.
Date
Source https://twitter.com/j_bertolotti/status/1247542284616269826
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.0 code

ep = {0, 0};
me = 5;
mp = {{0, 5}, {0, 5}, {0, 5}};
acc = {me (ep - mp[[1]])/(Norm[ep - mp[[1]]]^1 Norm[ep - mp[[1]]]^2), me (ep - mp[[2]])/(Norm[ep - mp[[2]]]^1 Norm[ep - mp[[2]]]^1.9), me (ep - mp[[3]])/(Norm[ep - mp[[3]]]^1 Norm[ep - mp[[3]]]^2.1)};
mv = mv = {{Sqrt[Abs[Norm[acc[[1]] ] Norm[mp[[1]] - ep] ]], 0.2}, {Sqrt[Abs[Norm[acc[[1]] ] Norm[mp[[1]] - ep] ]], 0.2}, {Sqrt[Abs[Norm[acc[[1]] ] Norm[mp[[1]] - ep] ]], 0.2}};
dt = 0.2;
mpold = mp;
mp = mpold + mv dt + acc/2 dt^2;
evo = Reap[Do[
      acc = {me (ep - mp[[1]])/(Norm[ep - mp[[1]]]^1 Norm[ep - mp[[1]]]^2), 
        me (ep - mp[[2]])/(Norm[ep - mp[[2]]]^1 Norm[ep - mp[[2]]]^1.9), 
        me (ep - mp[[3]])/(Norm[ep - mp[[3]]]^1 Norm[ep - mp[[3]]]^2.1)};
      mpoldold = mpold;
      mpold = mp;
      mp = 2 mpold - mpoldold + acc dt^2;
      Sow[mp];
      , {1500}];][[2, 1]];
plots = Table[
   Legended[
    Graphics[{Gray, Disk[ep, 0.1 ],
      Purple, Disk[evo[[j, 2]], 0.5 ], Line[evo[[1 ;; j, 2]] ]
      ,
      Orange, Disk[evo[[j, 3]], 0.5 ], Line[evo[[1 ;; j, 3]] ]
      ,
      Black, Disk[evo[[j, 1]], 0.5 ], Line[evo[[1 ;; j, 1]] ]
      },
     PlotRange -> {{-10, 10}, {-10, 10}}, Frame -> False], LineLegend[{Black, Purple, Orange}, {"F\[Proportional]\!\(\*FractionBox[\(1\), \SuperscriptBox[\(r\), \(2\)]]\)", "F\[Proportional]\!\(\*FractionBox[\(1\), SuperscriptBox[\(r\), \(1.9\)]]\)", "F\[Proportional]\!\(\*FractionBox[\(1\), SuperscriptBox[\(r\), \(2.1\)]]\)"}] ]
   , {j, 1, Dimensions[evo][[1]]}];
ListAnimate[plots[[1 ;; -1 ;; 5]] ]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Closed%20orbits.gifCategory:Self-published work
Category:Animations of dynamics Category:Animations of orbits Category:Images with Mathematica source code Category:Animated GIF files between 50 MP and 100 MP Category:Animated GIF files
Category:Animated GIF files Category:Animated GIF files between 50 MP and 100 MP Category:Animations of dynamics Category:Animations of orbits Category:CC-Zero Category:Images with Mathematica source code Category:Self-published work