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’s position in its orbit varies over time. At each moment we have a gravitational force
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’s orbit is along the x-axis. At each moment the centripetal acceleration of the Earth is
Next, we need to split that acceleration into 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
(The minus sign because of the direction of the acceleration.) This gives us
We can now use these to find the changes in velocity
that gives us
Here the arrow stands for “is given by”. Next, we can use these to calculate our new positions.
Then we repeat the calculation of our acceleration, our velocities and our positions over and over again. Simple, right? Or perhaps not. We have 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 use the values from the previous round of calculations?
We will test this in the next page.
Up a level : Differential EquationsPrevious page : Simple harmonic motion –Euler’s step method
Next page : The order of operationsLast modified: