Differential equations of two simple oszillators:

Damped oscillator with external periodic drive

Gravity pendulum

Second order differential equations of the type

y´´ = - y f(x) - y´g(x)

describe a great variety of interesting oscillators.

Periodicity is caused by the term - y .

With f(x) = 1 and g(x) = 0 the equation of an undamped, "free" oscillator with period remains.

Driven Oscillator

When f(x) is a periodic function f(x) = cos(ax) of period 2πa, the differential equation describes a periodically driven oscillator. If the drive frequency is not equal to the free frequency (a ≠1 ), beats between the free frequency and the drive frequency occur. a = 1 defines the resonance case: now the amplitude of oscillation will increase linearly in time

without limit.

The term - y´ g(x) describes damping proportional to the first derivative (de-damping with g(x) < 0). If g(x) is independent of x (constant), damping will be exponential in time. If damping is combined with a drive, the free oscillation will be damped away, and after a transition period the oscillation will go on at the drive frequency, with stable amplitude. In resonance damping limits the final amplitude, with an exponential transition from the original one.

Gravity pendulum

The oscillation of a pendulum under the influence of gravity obeys the differential equation

y´´ = -g /L sin( y )

with g gravity acceleration, L pendulum length , x time and y angle of deviation from the stable rest position.

With g = 9.81 ms-2 and L = 1 m the equation is y´´ = -9.81 sin( y ). For small amplitudes the period of a full oscillation is very close to 2 seconds (linear approximation 2π√L/g≈ 2.0060 seconds). This is called a "seconds pendulum", as in a clock there are 2 "ticks" at the reversal points of a single period. In our example the predefined amplitude is 2 degrees, as in a high precision clock.

The differential equation also describes the nonlinear behavior at large amplitudes, including looping.

At the unstable extreme position, without looping, the initial angular velocity (first derivative) is equal to zero, while the initial amplitude is slightly less than π. With looping the angular velocity is nonzero at amplitude π.

Close to the instable upper position very high accuracy of the calculation is called for, and predefined in our examples. When you increase the step width you will observe erroneous results.