The mathematics of pendulums are in general quite complicated. Simplifying assumptions can be made, which in the case of a simple pendulum allows the equations of motion to be solved analytically for smallangle oscillations.
Contents 
A simple pendulum is an idealisation, working on the assumption that:
The differential equation which represents the motion of the pendulum is
This is known as Mathieu's equation. It can be derived from the conservation of mechanical energy. At any point in its swing, the kinetic energy of the bob is equal to the gravitational potential energy it lost in falling from its highest position at the ends of its swing (the distance h in the diagram). From the kinetic energy the velocity can be calculated.
The first integral of motion found by integrating (1) is
It gives the velocity in terms of the angle and includes the initial displacement (θ_{0}) as an integration constant.
The differential equation given above is not soluble in elementary functions. A further assumption, that the pendulum attains only a small amplitude, that is
is sufficient to allow the system to be solved approximately. Making the assumption of small angle allows the approximation
to be made. To first order, the error in this approximation is proportional to θ^{ 3} (from the Maclaurin series for sin θ). Substituting this approximation into (1) yields the equation for a harmonic oscillator:
Under the initial conditions θ(0) = θ_{0} and dθ/dt(0) = 0, the solution is
The motion is simple harmonic motion where θ_{0} is the semiamplitude of the oscillation (that is, the maximum angle between the rod of the pendulum and the vertical). The period of the motion, the time for a complete oscillation (outward and return) is
which is Christiaan Huygens's law for the period. Note that under the smallangle approximation, the period is independent of the amplitude θ_{0}; this is the property of isochronism that Galileo discovered.
If SI units are used (i.e.
measure in metres and seconds), and assuming the measurement is
taking place on the earth's surface,
then
m/s^{2}, and
(the exact figure is 0.994 to 3 decimal places).
Therefore
or in words:
For amplitudes beyond the small angle approximation, one can compute the exact period by inverting equation (2)
and integrating over one complete cycle,
or twice the halfcycle
or 4 times the quartercycle
which leads to
This integral cannot be evaluated in terms of elementary functions. It can be rewritten in the form of the elliptic function of the first kind (also see Jacobi's elliptic functions), which gives little advantage since that form is also insoluble.
or more concisely,
where is Legendre's elliptic function of the first kind
Figure 4 shows the deviation of from , the period obtained from smallangle approximation.
The value of the elliptic function can be also computed using the following series:
Figure 5 shows the relative errors using the power series. T_{0} is the linear approximation, and T_{2} to T_{10} include respectively the terms up to the 2nd to the 10th powers.
For a swing of exactly 180° the bob is balanced over its pivot point and so T = ∞.
For example, the period of a pendulum of length 1 m on Earth
(g = 9.80665 m/s^{2}) at initial angle 10 degrees
is ,
where the linear approximation gives .
The difference (less than 0.2%) is much less than that caused by
the variation of g with geographical location.
By using the following Maclaurin series:
The equivalent power series is:^{[1]}
A compound pendulum is one where the rod is not massless, and may have extended size; that is, an arbitrarily shaped rigid body swinging by a pivot. In this case the pendulum's period depends on its moment of inertia I around the pivot point.
The equation of torque gives:
where:
The torque is generated by gravity so:
where:
Hence, under the smallangle approximation ,
This is of the same form as the conventional simple pendulum and this gives a period of:
^{[2]}
The Jacobian elliptic function that expresses the position of a pendulum as a function of time is a doubly periodic function with a real period and an imaginary period. The real period is of course the time it takes the pendulum to go through one full cycle. Paul Appell pointed out a physical interpretation of the imaginary period:^{[3]} if θ_{0} is the maximum angle of one pendulum and 180° − θ_{0} is the maximum angle of another, then the real period of each is the magnitude of the imaginary period of the other.
