In-class exercise 7.1

Modify the predictor-corrector program (C++ or Python versions) studied previously to study the effect of friction on pendulum motion. Assume that a particle moves under the influence of a restoring acceleration  -k sin(x),  with  k = 1,  and that friction also acts, producing a force  -ALPHA v  that always opposes the motion. Note that the variable x is angle, replacing θ in our earlier discussion. The particle starts with position  x = 0  and velocity  v = 1  at time  t = 0.
  1. Using time steps of  dt = 0.01,  answer the following questions for  ALPHA = 0, 0.1, 0.2, 0.5, and 1.0.

  2. By increasing  ALPHA  in small increments until the particle never quite returns to  x = 0,  estimate the value of the critical damping factor  ALPHA_CRIT,  beyond which oscillations cease.