Consider the motion of a pendulum of length

described by the differential equation

, where

is the gravitational acceleration and

is the angle between the pendulum and the vertical direction. This Demonstration plots the phase space diagram (i.e.,

along the horizontal axis and

on the vertical axis). The separatrix, plotted in red, is given by

, where

is the Hamiltonian of the system. The separatrix separates phase space into two different regions. The inside region, where the pendulum oscillates back and forth, corresponds to

. The outside region corresponds to

, where the pendulum continuously turns through vertical planar circles.