部分作业要求：（特殊符合用X代替）

1. Consider the oscillations executed by a simple pendulum. The equation of motion for a simple pendulum
of length L is given by

XX

With the small angle approximation, XX, this equation can be solved exactly and describes simple
harmonic motion that has a frequency of XX. But with numerical techniques, we don’t need
to restrict ourselves to small angles! We don’t even need to ignore air resistance!
I want you to write a program that exactly solves and then graphs (several periods of) the motion of a
simple pendulum that is subject to the same linear air resistance to which our projectiles were subject
(XX) AND to a driving “force” (this is actually more of a driving torque, the force
should always be exerted in the direction of motion), F(t) = F0 cos (XX). Please use Taylor’s
notation = b=2m. Your program should:
 Accept appropriate initial conditions, 0 and _0, and the pendulum’s length L and mass m.
 Graph the resulting motion the following conditions (you should produce 9 graphs total):
1. Driving force equal to the weight of the pendulum bob, F0 = mg, driving frequency ! =
0:1X, = 0:2X, X, and 5X.
2. Driving force equal to the weight of the pendulum bob, F0 = mg, driving frequency ! = X,
= 0:X, X, and X.
3. Driving force equal to the weight of the pendulum bob, F0 = mg, driving frequency ! =
10X, = 0:2X, X, and 5X.
 For each graph, find the natural frequency.