# The Earth orbit and Euler’s Step method

Up a level : Differential Equations
Previous page : Simple harmonic motion –Euler’s step method
Next page : The order of operations The step method can be used even if we have not figured out an explicit differential equation. It is enough to know how the differentials are connected to our variables. If you are not familiar with Euler’s step method, look at the earlier pages.

Say we want to figure out how the Earth position in its orbit varies over time. At each moment we have a gravitational force $F = G\frac{{Mm}}{{{r^2}}}$

acting, where M is the mass of the Sun, m is the mass of the Earth and r is the distance between the sun and the Earth. Let us place a coordinate system with coordinates (x, y) so that the Sun is at the origin (we assume it is stationary) and the perihelion (maximum distance) of the Earth orbit is along the x-axis. At each moment the centripetal acceleration of the Earth is $a = G\frac{M}{{{r^2}}}$

Next we need to split that acceleration in an x and y component. We can do that by considering the similar triangles formed by the components of the acceleration and the triangle formed as in the figure. We thus get $\frac{{{a_x}}}{a} = - \frac{x}{r},\quad \frac{{{a_y}}}{a} = - \frac{y}{r}$

(The minus sign because of the direction of the acceleration.) This gives us ${a_x} = - \frac{a}{r}x,\quad {a_y} = - \frac{a}{r}y$

We can now use these to find the changes in velocity $\Delta {v_x} = {a_x}\Delta t,\quad \Delta {v_y} = {a_y}\Delta t$

that gives us $\begin{gathered} {v_x} \leftarrow {v_x} + \Delta {v_x} = {v_x} + {a_x}\Delta t = {v_x} - \frac{a}{r}x\Delta t, \hfill \\ {v_y} \leftarrow {v_y} + \Delta {v_y} = {v_y} + {a_y}\Delta t = {v_y} - \frac{a}{r}y\Delta t \hfill \\ \end{gathered}$

Here the arrow stand for “is given by”.  Next we can use these to calculate our new positions. $\begin{gathered} x \leftarrow x + {v_x}\Delta t, \hfill \\ y \leftarrow y + {v_y}\Delta t \hfill \\ \end{gathered}$

Then we repeat the calculation of our acceleration, our velocities and our positions over and over again.   Simple, right? Or perhaps not. We have actually a decision  to make here, and that is the order of the two last steps. Should one calculate the velocity first, then use the new velocity in order to find the position, or should one calculate the position first, then the acceleration. I.e. that both steps uses the values from the previous round of calculations?

We will test this in the next page. Up a level : Differential Equations
Previous page : Simple harmonic motion –Euler’s step method
Next page : The order of operations Last modified: Sep 21, 2019 @ 18:44