Skip to main content

Section 1.3 Numerical Stepping Equations

Let us incorporate the ideas mentioned above into a set of formulas that we (or better yet, a computer) could use to calculate the position and velocity of a particle moving under the influence of some forces. Call the present time \(t\) and the time a little later \(t + \Delta t\text{.}\) Let \(x(t)\) denote the position of the particle now, then \(x(t + \Delta t)\) denotes the position of the particle a short time later. Similarly \(v_x(t)\) and \(v_x(t + \Delta t)\) represent the present and slightly later velocities of the particle. In all of these expressions, note that \(x(t + \Delta t)\) does not mean the quantity ‘\(x\)’ times the quantity ‘\(t + \Delta t\)’ but rather means the value of the function \(x\) evaluated at the time \(t + \Delta t\text{.}\) This is standard functional notation used in mathematics.
Recall the definition of velocity as the rate of change of the position. Taking \(\Delta t\) to be very small in magnitude, we may approximate this as “velocity = displacement/time” and express the velocity at time \(t\) approximately as
\begin{equation} v_x(t) \simeq \frac{\Delta x}{\Delta t} = \frac{x(t+\Delta t) - x(t)} {\Delta t}.\tag{1.3.1} \end{equation}
As you recall, \(\Delta x/\Delta t\) is the definition of the average velocity, while the instantaneous velocity is actually the derivative of the position with respect to time. However, for small enough time steps, the average velocity is an excellent approximation for the instantaneous velocity.
Turning the previous expression around, we can write an expression for the position of the particle at time \(t + \Delta t\) in terms of the position and velocity at time \(t\text{:}\)
\begin{equation} x(t+\Delta t) = x(t) + v_x(t)\Delta t.\tag{1.3.2} \end{equation}
(1.3.2) says that the position at time \(t + \Delta t\) is the position at time \(t\) plus the distance traveled \(v_x(t)\Delta t\) by the particle during the short time interval \(\Delta t\text{.}\) Notice that this result is only approximate because the velocity \(v_x\) at time \(t\) is not necessarily equal to the average velocity during the entire time interval. However, if \(\Delta t\) is small enough, the approximation should be quite good.
Next we need an expression for incrementing the velocity. By analogy with the arguments leading up to (1.3.2), we can write
\begin{equation} v_x(t+\Delta t) = v_x(t) + a_x(t)\Delta t.\tag{1.3.3} \end{equation}
The three equations (1.2.1), (1.3.2) and (1.3.3) can now be incorporated into a looping procedure in a computer program. These three equations constitute what is generally referred to as Euler’s method of numerical approximation. Given an initial position and velocity, we calculate the initial acceleration from (1.2.1). Then we calculate the position and velocity a short time later from Eqs. (1.3.2) and (1.3.3). Then we repeat the process, pretending that the new values for \(x\) and \(v_x\) are the initial values. In this way we can numerically iterate the motion of the particle from instant to instant as far into the future as we care to. A spread-sheet program, such as EXCEL, can perform such calculations with very little “programming” required on your part.
A note about numerical errors is worth mentioning. Remember that although (1.2.1) is exact, Eqs. (1.3.2) and (1.3.3) that update \(x\) and \(v_x\) to later times are approximations that are best when \(\Delta t\) is small. If the calculations start going haywire, we can help the situation by choosing smaller steps. This means of course that the computer will have to run longer, but that’s frequently not a serious problem.