1.3.4 Numerical solution of simple harmonic motion3
When solving the equation of motion for an oscillating pendulum we made use of
the small-angle approximation, sin θ θ when θ is small. This made the equation
of motion much easier to solve. However an alternative way, without resorting to
the small-angle approximation, is to solve the equation numerically. The essential
idea is that if we know the position and velocity of the mass at time t and we know
the force acting on it then we can use this knowledge to obtain good estimates of
these parameters at time (t + δt). We then repeat this process, step by step, over
the full period of the oscillation to trace out the displacement of the mass with
time. We can make these calculations as accurate as we like by making the time
interval δt sufficiently small. To demonstrate this approach we apply it to the simple
pendulum. Figure 1.18 shows a simple pendulum and the angular position of the
mass at three instants of time each separated by δt, i.e. at t, (t + δt) and (t + 2δt).
Using the notation ˙ θ(t) and ¨ θ(t) for dθ(t)/dt and d2θ(t)/dt2, respectively, we can
write the equation of motion of the mass, Equation (1.29)