Motion of a particle under central force (Planetary motion)
We consider the central force, f = −k / r 2 with k = 1 . Now, x and y-
components of the force can be written as f x = xf / r = − x / r 3 and f y = yf / r = − y / r 3 , where r 2 = x 2 + y 2 . Next we consider Newton’s law: dv f =m dt with m = 1 . dv x Thus we have f x = ⇒ dv x = f x dt = −x / r 3 dt and dv y = f y dt = − y / r 3 dt . We dt implement the last two steps in the following program and evaluate velocity components in successive times and wherefrom we obtain the position x, y.
[Source: Book - “From Newton to Mandelbrot” by D. Stauffer and H.E.