SimuveliqLearnEspañolOpen the simulators
Learn › Physics

Pendulum and simple harmonic motion

A pendulum, a mass hanging from a spring, a swaying building or a guitar string oscillate for the same reason: when moved away from equilibrium a force appears that brings them back. When that force is proportional to the displacement, the motion is simple harmonic (SHM) and everything is computed with a single frequency. This topic derives SHM for the mass–spring (amplitude, phase, energy), the simple pendulum with its small-angle approximation and what happens when it fails, and the physical pendulum with the moment of inertia. All of it can be checked in the Pendulums and SHM simulator.

Restoring force and simple harmonic motion

A body in stable equilibrium that is moved slightly away feels a force pushing it back: the restoring force. The simplest case is an ideal spring (Hooke's law): the force is proportional to the stretch measured from equilibrium and opposite to it, , with the spring constant (N/m).

x = 0mF = +kAx = −A: v = 0m±vx = 0: F = 0, max vmF = −kAx = +A: v = 0
The force always points toward equilibrium and grows with the distance. At there is no force, but the mass goes through it at its maximum speed and overshoots.

Newton's second law gives a differential equation: the acceleration is proportional to the displacement and of opposite sign.

You need a function whose second derivative is itself times : the cosine (and the sine). The general solution is . Check it by differentiating twice: and . The two constants, the amplitude and the phase , are set by the initial conditions; (the angular frequency, in rad/s) depends only on the spring and the mass:

The period does not depend on the amplitude (isochronism): stretching the spring further makes the mass travel more, but with more force and more speed, and it takes the same time. A stiffer spring oscillates faster; a larger mass, slower.

Position, velocity and acceleration

All three oscillate with the same period. The velocity is a quarter period ahead of the position and the acceleration always has the opposite sign to . Hence the maximum values:

0.05−0.05x(m)1−1v(m/s)20−20a(m/s²)T/4T/23T/4T5T/43T/27T/4t
A 0.5 kg mass on a 200 N/m spring released at 5 cm (example 1): rad/s, m/s and m/s². Where is largest, and is largest the other way.
Point
Right end
Equilibrium (moving left)
Left end
Equilibrium (moving right)

Amplitude and phase from x₀ and v₀

If at the mass is at with velocity , the first two equations at give and . Squaring and adding, and dividing one by the other:

It is clearer with the phasor: is the horizontal projection of a vector of length turning counter-clockwise with angular velocity (SHM is the shadow of uniform circular motion). is the angle of the vector at ; its components are and .

xφturns at ωx0 v0 /ωAx(t) = A cos(ωt + φ)A cos φ = x₀A sin φ = −v₀/ωx₀ = 0.02 mv₀/ω = 0.5/20 = 0.025 mA = 0.03202 mφ = −0.8961 rad (−51.34°)
Phasor of example 2 ( cm, m/s, rad/s): the vector starts below the axis, with , because the mass is moving away from equilibrium and has not yet reached the end.
  • Released from rest at : and .
  • Struck at equilibrium with : and .
  • Released from rest at : .
With and the key of a calculator the angle comes out wrong by when . Use atan2 or look at the quadrant: the sign of is that of and the sign of , that of .

Energy

The elastic energy of the spring is and the kinetic energy . Substituting and and using , and : the sum does not depend on time.

0T/4T/23T/4T00.1250.25JtE = ½kA²½kx² (elastic)½mv² (kinetic)T = 0.3142 s
Example 1 ( J): the energy goes from the spring to the mass and back twice in each period; the sum is constant.

The last formula gives the speed at any position without going through time, and energy gives the amplitude of a kick: is the same as .

Vertical spring

If the mass hangs, the spring stretches until its force equals the weight: . Measuring from that new equilibrium position (downward), the net force is : the weight cancels with the static stretch and the same SHM remains, with the same . Gravity only shifts the center of the oscillation.

no massmmgkδequilibriummmgk(δ + y)displaced ynatural lengthnew equilibriumδ = mg/k
Natural length, equilibrium with the mass () and displaced by : the net force brings it back to the new equilibrium.

The second form is useful: measuring how much a spring stretches under the load is enough to know its period, without knowing or .

Simple pendulum

A point mass hanging from a string of length , massless and inextensible. The weight and the tension act on it. Along the path (an arc of radius , with ) the tension does nothing, and the weight component is , always toward the lowest point:

s = LθθLmgmg cos θmg sin θT (tension)along the arc:mL θ″ = −mg sin θtoward the center:T − mg cos θ = mv²/L
Free-body diagram at 30°: the tangential weight component, , is the restoring force; the radial one and the tension give the centripetal acceleration.

It is not exactly SHM, because the force is proportional to , not to . But for small angles, in radians, (the first term of its series, ), and the equation becomes the spring one with :

The mass cancels (weight and inertia grow equally with ): two pendulums of equal length, one of lead and one of cork, have the same period if the air does not slow them. How wrong is the approximation? The force is overestimated far more than the period is wrong:

Amplitude θ₀θ₀ in radsin θ₀error of sin θ ≈ θexact period over T₀
5°0.087270.087160.13 %+0.048 %
10°0.17450.17360.51 %+0.19 %
20°0.34910.34202.06 %+0.77 %
30°0.52360.50004.72 %+1.74 %
45°0.78540.707111.07 %+4.00 %
Rule of thumb: up to about 15° the period error is below 0.5 % and is enough. For a clock it is not: 0.05 % is 41 s a day (example 4).

Large angles: the exact period

Without approximating, start from energy: released at rest from , . Solving for and integrating from 0 to (a quarter of an oscillation) gives a complete elliptic integral of the first kind:

There is a very handy way to compute it, the one the simulator uses: the arithmetic–geometric mean (AGM). Start from and and repeat , until they agree (in 4 or 5 steps); then . For moderate amplitudes the series also works:

0°30°60°90°120°150°11.522.51.0171.0731.1801.3731.762T/T₀θ₀exact1 + θ₀²/16
Ratio of the exact period to the small-angle one (the dots are the simulator values). It grows without bound near 180°: the inverted pendulum takes very long to start falling.
θ₀10°30°60°90°120°150°170°
1.00191.01741.07321.18031.37291.76222.4394

With a large amplitude the motion is still periodic but no longer sinusoidal: it lingers near the ends. The simulator draws the exact (with the Jacobi elliptic functions) next to , and you can see them drift apart.

String tension and speed

Energy gives the speed at each angle, . Along the string, the tension minus the radial weight component is the centripetal force, . Putting both together:

At the lowest point the tension is larger than the weight: the difference is the centripetal force . And with , comes out negative: a string cannot push, it goes slack and the mass falls instead of following the arc. Those results hold for a massless rigid rod (the simulator warns about it).

Physical pendulum

Any rigid body that oscillates about a pivot (a rod, a disc, a ruler hanging from a nail). Its weight acts at the center of mass , at distance from the pivot, and makes a torque . The second law for rotation uses the moment of inertia about the pivot, , which measures how much the body resists a change in its rotation (like mass on a straight line):

OGmgd sin θdθtorque of the weight:M = −mgd sin θIO  θ″ = −mgd sin θG: center of massO: pivot
Rod pivoted off its center, turned by an angle θ: the lever arm of the weight is .

depends on the axis. Tables give the moment about the center of mass, , and the parallel-axis theorem (Steiner) moves it to a parallel axis at distance : . The equivalent length is that of the simple pendulum that would have the same period.

Body and pivot
Point mass on a string (simple pendulum)
Rod of length , hung from one end
Rod of length , pivot from the center
Disc of radius , hung from its rim

The mass cancels again: the period depends only on the shape and on where the pivot is. For the rod, has a minimum at (the radius of gyration): neither hanging it from the end nor from the center (as the period becomes infinite, because the weight no longer has a lever arm).

00.10.20.30.40.51.41.61.82.02.22.4min. 1.524 s (d = L/√12)d = 0.25: 1.532 s1.638 s (end)T₀ (s)d (m)
Small-oscillation period of a 1 m rod against the distance from the pivot to the center: minimum of 1.524 s at m; hung from its end, 1.638 s (example 5).

Using the simulator

In Physics → Pendulums and SHM, the System panel has three buttons: Simple pendulum, Mass–spring and Physical pendulum. Below, the panel of each system; at the end, Examples with «Load an example».

  • Simple pendulum: Length L, Amplitude θ₀ (in degrees, between 0 and 180), Mass (for the tension) and Gravity g (change it for another planet). It is released from rest at θ₀. Cards: Period (small angles), Exact period (with the extra %), Frequency (with ω₀), Maximum speed, Height it rises, String tension (maximum at the bottom and minimum; it warns «⚠ a string would go slack» if negative) and At t = … s (θ and ω at that instant).
  • Mass–spring: Mass m, Constant k, Amplitude A, Gravity g and, optional, or x₀ and and v₀. With x₀ typed, the amplitude and phase come from x₀ and v₀ (and A is ignored); without x₀, it is released from x = A at rest. v₀ without x₀ gives a warning. Cards: Period, Angular frequency, Amplitude (with the phase φ), Maximum speed, Maximum acceleration, Energy, At t = … s and If it hangs vertically (the stretch δ).
  • Physical pendulum: the Body selector («Rod hung from one end», «Rod pivoted at a distance d from its center», «Disc hung from its rim» or «Another body (known I and d)») and its fields: Mass m, Rod length, Disc radius, Pivot to center of mass d or I about the pivot (which cannot be less than md², by the parallel-axis theorem). Extra cards: Moment of inertia and Equivalent length.
  • The figure (Pendulum or Oscillation) animates with ▶ over two periods, and the t slider picks the instant. For the pendulums, the Angle graph compares the «exact (no approximation)» curve with the «small angle» one (dashed); for the spring, the Position and Velocity graphs.
  • The Step by step writes the equation of motion, the approximation, the exact period with and the energy; the Detailed solution (PDF) button gives the complete development to print.

Common mistakes

  • Using degrees in or in : the argument is in radians.
  • Confusing (rad/s) with (Hz): .
  • Believing that the pendulum period depends on the mass, or that the spring period depends on .
  • Using with amplitudes of 40° or more without saying it is approximate.
  • Taking at the lowest point: the centripetal force is missing.
  • In the physical pendulum, using instead of , or the rod length instead of .

Worked examples

Example 1Mass–spring released from rest

A 0.5 kg mass is attached to a spring of constant 200 N/m on a frictionless table. It is stretched 5 cm and released. Find , the period, the frequency, , the maximum velocity and acceleration and the energy. How much would the spring stretch if the mass hung from it?

Solution

  1. rad/s; s and Hz.
  2. It is released at rest at the end: m, , (m).
  3. m/s (through ); m/s² (at the ends).
  4. J, equal to .
  5. Hanging: m; it would oscillate about that position with the same period.
rad/s, s, Hz, , m/s, m/s², J and cm.

Solve it in Simuveliq

  1. In Physics → Pendulums and SHM, Mass–spring button: m = 0.5, k = 200, A = 0.05, with x₀ and v₀ empty (or «Load an example» → «Mass–spring: 0.5 kg, k = 200 N/m, stretched 5 cm»).
  2. Cards: Period 0.3142 s (f = 3.183 Hz), Angular frequency 20 rad/s, Amplitude 0.05 m with φ = 0, Maximum speed 1 m/s, Maximum acceleration 20 m/s², Energy 0.25 J and If it hangs vertically δ = 0.02453 m.
  3. Double the amplitude (A = 0.1): the period does not change; and double and the energy is multiplied by 4.

Example 2Amplitude and phase from x₀ and v₀

A 0.2 kg mass on an 80 N/m spring passes cm moving away from equilibrium at m/s at . Find the amplitude, the phase, , the maximum speed and the energy. When does it first reach the end?
xφturns at ωx0 v0 /ωAx(t) = A cos(ωt + φ)A cos φ = x₀A sin φ = −v₀/ωx₀ = 0.02 mv₀/ω = 0.5/20 = 0.025 mA = 0.03202 mφ = −0.8961 rad (−51.34°)

Solution

  1. rad/s (the same period as example 1, 0.3142 s).
  2. m; m.
  3. rad (): fourth quadrant, because and . Then .
  4. m/s and m/s². Energy: J; check with the initial instant, J.
  5. It reaches when : s. At , m/s².
cm, rad, , m/s, J; it reaches the end at 0.0448 s.

Solve it in Simuveliq

  1. Mass–spring with m = 0.2, k = 80, or x₀ = 0.02 and and v₀ = 0.5 («Load an example» → «Mass–spring with x₀ = 2 cm and v₀ = 0.5 m/s»).
  2. Cards: Amplitude 0.03202 m with «phase φ = −0.8961 rad», Maximum speed 0.6403 m/s, Maximum acceleration 12.81 m/s², Energy 0.041 J and At t = 0 s: x = 0.02 m, v = 0.5 m/s, a = −8 m/s².
  3. Move the t slider to about 0.045 s: the instant card gives x ≈ 0.032 m and v ≈ 0, the end.

Example 3Pendulum with a large amplitude

A 1 m pendulum with a 0.5 kg mass is released from 60°. Compare the small-angle period with the exact one, and find the maximum speed and the maximum and minimum string tensions.

Solution

  1. rad/s and s.
  2. Exact: and , so s, 7.32 % more. The series gives : almost the same as the exact 1.0732.
  3. Energy: it rises m, so m/s at the bottom.
  4. Tensions: N (twice the weight) and N at the ends.
s, s (+7.32 %), m/s, N and N.

Solve it in Simuveliq

  1. Simple pendulum button: L = 1, θ₀ = 60, mass 0.5, g = 9.81 («Load an example» → «Large amplitude: 1 m at 60° (the period grows)»).
  2. Cards: Period (small angles) 2.006 s, Exact period 2.153 s «7.32 % more than the small-angle one», Maximum speed 3.132 m/s, Height it rises 0.5 m and String tension 9.81 N (min. 2.453 N).
  3. In the Angle graph the exact curve falls behind the dashed one; at the end of the two periods the lag is already 0.29 s. Try θ₀ = 120°: the minimum tension comes out negative and the string warning appears.

Example 4The seconds pendulum

A pendulum clock ticks once per one-way swing (1 s), so its period is 2 s. What length must it have with m/s²? If it swings with a 5° amplitude, how much does it lose per day? What period would it have on the Moon ( m/s²)?

Solution

  1. From : m.
  2. With 5°, the exact period is s: 0.0476 % longer.
  3. Delay: the clock counts swings, and each lasts 0.0476 % too long; in a day, s. That is why precision clocks swing with small, constant amplitudes.
  4. On the Moon: s, almost 2.5 times slower ().
m; with 5° the period is 2.001 s (+0.0476 %), about 41 s lost per day; on the Moon, 4.922 s.

Solve it in Simuveliq

  1. «Load an example» → «Seconds pendulum: 2 s period» (L = 0.994, θ₀ = 5°).
  2. Cards: Period (small angles) 2 s and Exact period 2.001 s, «0.0476 % more than the small-angle one».
  3. Change Gravity g to 1.62: the small-angle period becomes 4.922 s.

Example 5Rod: where to put the pivot

A uniform 1 m, 2 kg rod swings with a small amplitude. Find the moment of inertia, the period and the equivalent length (a) with the pivot 25 cm from the center and (b) hung from one end. (c) Where should the pivot go for the period to be a minimum?
OGmgd sin θdθtorque of the weight:M = −mgd sin θIO  θ″ = −mgd sin θG: center of massO: pivot

Solution

  1. (a) Parallel axes: kg·m².
  2. rad/s, s and m.
  3. (b) From one end: kg·m², m, s and m: slower.
  4. (c) ; differentiating, m, with m and s. The mass plays no part.
(a) kg·m², s, m; (b) 0.6667 kg·m², 1.638 s, 0.6667 m; (c) minimum with cm: 1.524 s.

Solve it in Simuveliq

  1. Physical pendulum button, Body «Rod pivoted at a distance d from its center», m = 2, Rod length 1, Pivot to center of mass d 0.25, θ₀ = 10°.
  2. Cards: Moment of inertia 0.2917 kg·m², Equivalent length 0.5833 m and Period (small angles) 1.532 s (the exact one, with 10°, 1.535 s).
  3. Change Body to «Rod hung from one end»: 0.6667 kg·m² and 1.638 s. Go back to the offset pivot and type d = 0.2887: 1.524 s, the minimum; try values on both sides.

Related topics