Login
📚 Differential Equations, Interactive Edition
Chapters ▾
⇩ Download ▾

4.2 The Pendulum and Its Energy

A pendulum — a mass on a rigid rod of length L — obeys θ+(g/L)sinθ=0. For small swings sinθθ, and this is Chapter 2's spring: oscillation at the natural frequency g/L. But a pendulum is not a spring. Push it hard enough and it goes over the top, something no linear equation ever does, so this section keeps the sine. Measuring time in units of L/g scrubs out the constants, leaving

x + sin x = 0 ,

or, as a system, x=y, y=sinx, where x is the angle from straight down and y the angular velocity.

The system rests wherever y=0 and sinx=0: the points (nπ,0). At even multiples of π the pendulum hangs straight down; at odd multiples it balances upside down. Near the bottom, sinxx gives the center x+x=0 — closed loops, dimensionless period 2π. Near the top, setting u=xπ gives u=sin(u+π)=sinuu: precisely the saddle in disguise from the last section, eigenvalues ±1. So the portrait must alternate — center, saddle, center, saddle — forever along the x-axis. What no linearization can say is how these local pictures knit together, and for that the pendulum volunteers a global gift. Multiply x+sinx=0 by x and recognize both terms as derivatives: ddt(12(x)2cosx)=0. The energy

[01cos(x)0]
The Jacobian of the pendulum system ✓ Computed · mojocas 0.1.0 The Jacobian of the pendulum system, computed exactly by mojo-cas mojocas 0.1.0.

The linearization of x=y, y=sinx at any point, computed from the system itself. The alternation is visible in one entry: cosx is 1 at the hanging equilibria x=0,±2π and +1 at the inverted ones x=±π — the sign flip that turns each center into a saddle and back.

1+L2
Characteristic polynomial at the inverted equilibrium ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text Characteristic polynomial at the inverted equilibrium, computed exactly by mojo-cas mojocas 0.1.0, and confirmed to agree with the result stated in the text.

At x=π the Jacobian is [0110], so det(JλI) is the polynomial shown — whose roots are the eigenvalues ±1 named above, one positive and one negative, which is exactly what a saddle is. (L stands for λ.)

H ( x , y ) = y 2 2 cos x

— kinetic plus potential — is constant along every solution. That is a confession of imprisonment: each solution is confined for all time to a single level curve of H. To draw the complete phase portrait of an unsolvable nonlinear equation, no solving is required. Draw the contour map of H.

A flat map of dark nested curves: small closed ovals ringing the points x = 0 and x = plus or minus 2 pi on the horizontal axis, a pair of curves crossing at x = plus or minus pi that form cat's-eye corners, and open wavy curves running left to right above and below everything. Each curve is one energy level of the pendulum, so each is one possible motion: back-and-forth swings inside the eyes, over-the-top spinning outside.Explore in 3D (opens in a new tab)
Fourteen level curves of the energy H(x,y)=y2/2cosx on 6.5x6.5, 3y3, viewed face-on — the complete phase portrait of the pendulum. Closed ovals ring the resting equilibria at x=0 and x=±2π; the self-crossing curve through (±π,0) is the separatrix; the open wavy curves above and below it are over-the-top whirls.

Explore

  1. Observe. Three families of curves, three kinds of motion. The nested ovals around (0,0) and (±2π,0) are back-and-forth swings; the open curves running the full width of the window are whirls, over the top in the same direction forever; and the cat's-eye curve crossing itself at (±π,0)(±3.14,0) — the separatrix — is the frontier between them.
  2. Predict. No arrows are drawn. Use x=y: in the upper half-plane x must increase. Which way do the ovals circulate, and which way do the upper whirl curves run? Decide, then check that the lower half-plane tells a consistent story.
  3. Verify. The separatrix carries the energy of the balanced-upright state, H(±π,0)=1. Setting x=0 in y2/2cosx=1 gives y=2: the cat's-eye should stand exactly 2 grid units above and below the origin. Check it against the grid.
  4. Observe. The whirl curves undulate: farthest from the axis over x=0 and x=±2π, closest over x=±π. A whirling pendulum is fastest through the bottom and slowest over the top — readable straight off the map.
  5. Predict, then verify. An oval reaching maximum angle xmax has H=cosxmax, so it crosses the y-axis at height y=2(1cosxmax)=2sin(xmax/2). For the oval reaching out near xmaxπ/2, predict the height of its top — about 1.4 — then check.

The Lift

Why should the level curves of a function be the orbits of a system? The most convincing answer is to stop flattening. H is a function of two variables, so it is a landscape — a surface z=H(x,y) standing over the phase plane — and a level curve is a horizontal slice of that landscape, dropped to the floor. The second figure performs the lift.

A half-transparent rolling surface shaped like an egg carton stretched along one direction - bowls at x = 0 and x = plus or minus 2 pi, saddle passes between them - floating above a flat sheet of dark curves at height zero. Every dark curve is a horizontal slice of the surface dropped to the floor, so the pendulum's phase portrait is revealed as the surface's contour map.Explore in 3D (opens in a new tab)
The energy landscape z=H(x,y)=y2/2cosx, half-transparent, floating above its own fourteen-level contour map in the plane z=0. Bowls sit over the resting equilibria at x=0 and x=±2π; mountain passes of height 1 sit over the saddle points (±π,0); every orbit on the floor is a horizontal slice of the surface overhead.
  1. Observe. The surface is an egg carton stretched along the x-direction — bowls at the hanging equilibria, passes between them — with walls climbing like y2/2 toward the front and back. Orbit the camera until you can see one floor curve and the surface slice directly above it at the same time.
  2. Predict, then verify. A horizontal slice below pass height (1<H<1) is trapped inside one bowl; dropped to the floor it is a closed ring around a well — a swing. A slice above every pass (H>1) clears the whole range and runs unbroken from end to end — a whirl. Match each family on the floor to its slice height on the surface.
  3. Observe. The slice at exactly pass height, H=1, pinches onto the passes themselves: dropped down, it is the separatrix, crossing itself precisely at the saddle points. The frontier between swinging and whirling is the altitude of a mountain pass.

Connect

One picture now settles questions that formulas struggle with. The bottom equilibrium is the floor of a bowl, and nearby slices are small closed rings: a pendulum nudged from rest swings near rest forever — stable, though not attracting, since nothing here dissipates. The top equilibrium is a mountain pass, terrain falling away on two sides, the slice through it crossing itself: the saddle instability of the last section, now with a topographic reason. Even timing is visible: ovals deep in a bowl are traversed with period near 2π, ovals near the separatrix take longer and longer, and the separatrix itself takes forever — released ever closer to upside down, the pendulum hangs ever longer near the top before committing.

The landscape also explains what conservation costs. Add a little friction, x+cx+sinx=0, and the energy obeys ddtH=cy20: the state can no longer hold its altitude and slides downhill across the level sets, every swing and every whirl eventually spiraling into some well. The contour map stops being the portrait, but the landscape still governs — now as terrain being descended. That is Chapter 2's inward spiral, seen from above.

An original work of XYZ Homework, built around interactive XYZ 3D figures, following the standard first-course sequence (first-order equations through systems and the phase plane). Distinct from the LibreTexts-sourced Differential Equations for Engineers (Lebl) edition, which has its own attribution. License: CC-BY-NC-SA-4.0.