Differential Equations 6.2: The Pendulum and Conservation of Energy

Differential Equations

Units and Topics

Unit 6. Nonlinear Systems

6.2 The Pendulum and Conservation of Energy

The linearization of Topic 6.1 does not decide whether the lowest position of a pendulum without friction is a center. This topic answers the question with the energy. The energy of the pendulum is constant along each trajectory, so the trajectories are the level curves of one function, and they can be drawn without a solution formula.

You need Topic 6.1 for this topic. The topic uses the oscillator of Topic 3.6.

1. The Equation of the Pendulum

A small mass m hangs on a light rod of length L. The angle θ is measured from the lowest position. The mass moves on a circle, and its acceleration along the circle is Lθ″. The component of the gravitational force along the circle is −mg sin θ.

mLθ″ = −mg sin θthe second law of Newton along the circleθ″ = −g/L sin θdivide both sides by mLθ″ + sin θ = 0with the unit of time chosen so that g/L is 1

The equation is nonlinear because of sin θ. For small angles, sin θ is close to θ, and the equation becomes θ″ + θ = 0, the oscillator of Topic 3.6 with the period 2π. This topic keeps sin θ, so the results hold for all angles.

With the angular velocity ω = θ′, the equation becomes a system.

θ′ = ω ω′ = −sin θ

2. The Equilibrium Points

At an equilibrium point, ω = 0 and sin θ = 0. The two different positions are θ = 0 and θ = π. The Jacobian matrix has the entries 0, 1, −cos θ, and 0.

J = 01−10at the point (0, 0), where cos θ is 1T = 0the traceD = 1the determinant, so the eigenvalues are ±i, a centerJ = 0110at the point (π, 0), where cos θ is −1D = −1the determinant is negative, a saddle point

The point (π, 0) is a saddle point, and the linearization decides this. At the point (0, 0), the eigenvalues have the real part 0, so the linearization does not decide. The trajectories near (0, 0) could be closed curves, or they could be spirals. The energy decides.

3. A Conserved Quantity

The kinetic energy of the mass is (1/2)m(Lω)², and its potential energy is −mgL cos θ. Divided by mL², and with g/L equal to 1, the total energy is the function below.

E = 1/2ω² − cos θ

Calculate the rate of change of E along a solution.

dE/dt = ωω′ + (sin θ)θ′the chain rule for each termdE/dt = ω(−sin θ) + (sin θ)ωsubstitute the two equations of the systemdE/dt = 0the two terms cancel

Conserved quantity. A function E(x, y) is a conserved quantity of a system when dE/dt is 0 along each solution. Each trajectory then stays on one level curve of E, a curve on which E has one constant value.

The same steps work for each equation of the form x″ = F(x), where the force depends only on the position. Choose a function U(x) with U′ = −F. With v = x′, the function E = (1/2)v² + U(x) is a conserved quantity. For the pendulum, F is −sin θ and U is −cos θ.

4. The Level Curves

The smallest value of E is −1, at the point (0, 0). The value at the saddle point (π, 0) is 1. The level curves have three kinds.

EnergyLevel curveMotion
Between −1 and 1A closed curve around (0, 0)The pendulum swings back and forth
Equal to 1The curves that connect the saddle pointsThe pendulum approaches the highest position and does not reach it in a finite time
Greater than 1A wave above or below the other curvesThe pendulum rotates over the top, always in the same direction

Near the point (0, 0), the level curves are closed curves, so the trajectories return to their start. The point (0, 0) is a center of the nonlinear system. The energy decides what the linearization could not decide.

The curves with E = 1 are called separatrices, because they separate the swinging motion from the rotating motion.

The energy also gives numbers. A pendulum is released at rest at the angle π/3. Find its angular velocity at the lowest position.

E = 1/2(0)² − cos(π/3)the energy at the startE = −1/2because cos(π/3) is 1/21/2ω² − cos 0 = −1/2the same energy at the lowest position1/2ω² = 1/2add 1 to both sides, because cos 0 is 1ω = ±1the pendulum passes the lowest position in both directions

A second question: which angular velocity at the lowest position takes the pendulum over the top? The energy must be greater than 1.

1/2ω² − 1 = 1the energy of the separatrix at the lowest positionω² = 4add 1 and multiply by 2ω = ±2the border between swinging and rotating

With a speed greater than 2 at the lowest position, the pendulum rotates over the top.

Try it: the phase plane of the pendulum

The horizontal axis is the angle θ, and the vertical axis is the angular velocity ω. The gray curves are level curves of the energy, and the purple curves are the separatrices. Drag the blue point to choose the start. The slider sets the friction.

5. The Period Depends on the Amplitude

For the linear oscillator θ″ + θ = 0, the period is 2π for each amplitude. For the pendulum, the period grows with the amplitude. The table shows the period of a pendulum that is released at rest at the angle θ₀, calculated with a numerical method.

Angle θ₀ at the startPeriod
0.16.29
0.56.38
16.70
28.35
316.16

For the angle 0.1 the period is close to 2π, which is 6.28. The period grows without bound as θ₀ approaches π, because the trajectory passes close to the saddle point, where the motion is very slow.

6. Other Systems with an Energy

Practice 2 of Topic 6.1 left the points (1, 0) and (−1, 0) of the system x′ = y, y′ = x − x³ undecided. This system is the equation x″ = x − x³, so it has a conserved quantity.

U′ = −(x − x³)the condition U′ = −FU = −1/2x² + 1/4x⁴integrateE = 1/2y² − 1/2x² + 1/4x⁴the conserved quantityU(1) = −1/4the same value at x = −1U(0) = 0a local maximum of U

The function U has a minimum at x = 1 and at x = −1. Near a minimum of U, the level curves of E are closed curves, so both points are centers. The function U has a maximum at x = 0, and the point (0, 0) is a saddle point, as the linearization showed.

Equilibrium points of x″ = F(x). The equilibrium points are the points where U′ is 0. A minimum of U is a center. A maximum of U is a saddle point.

With friction, the energy is not conserved. For the pendulum with the friction term bω, the system is θ′ = ω, ω′ = −sin θ − bω.

dE/dt = ωω′ + (sin θ)θ′the chain rule, as in Part 3dE/dt = ω(−sin θ − bω) + (sin θ)ωsubstitute the two equationsdE/dt = −bω²the terms with sin θ cancel

The energy decreases whenever the pendulum moves. The trajectory crosses the level curves toward lower energy, and it spirals into a point where the pendulum hangs down. This agrees with the stable spiral of Topic 6.1.

Common Mistakes

  • Concluding from the linearization that (0, 0) is a center. The linearization does not decide. The conserved energy does.
  • Using the period 2π for a large amplitude. The period of the pendulum grows with the amplitude.
  • Writing the potential energy with the wrong sign. The condition is U′ = −F, so for the force −sin θ the function U is −cos θ.
  • Expecting a pendulum on a separatrix to reach the highest position. It approaches the saddle point and does not reach it in a finite time.
  • Using the conserved energy for a system with friction. With friction, dE/dt is −bω², and the energy decreases.

Summary

ItemResult
Pendulumθ′ = ω, ω′ = −sin θ
EnergyE = (1/2)ω² − cos θ
Conserved quantitydE/dt = 0 along each solution
E between −1 and 1The pendulum swings, and (0, 0) is a center
E = 1The separatrices through the saddle points
E greater than 1The pendulum rotates over the top
x″ = F(x)E = (1/2)v² + U(x), with U′ = −F
With frictiondE/dt = −bω²

Practice

Work each problem on paper first. Then open the answer to check your work.

1. A pendulum is released at rest at the angle π/2. Find its energy and its angular velocity at the lowest position.

E = 1/2(0)² − cos(π/2)the energy at the startE = 0because cos(π/2) is 01/2ω² − 1 = 0the same energy at the lowest positionω² = 2add 1 and multiply by 2ω = ±√2about 1.41

2. A pendulum passes the lowest position with the angular velocity 1.5. Does it swing or rotate? If it swings, find the largest angle.

E = 1/2(1.5)² − 1the energy at the lowest positionE = 0.125less than 1, so the pendulum swings−cos θ = 0.125at the largest angle, where ω is 0cos θ = −0.125multiply by −1θ = 1.70the inverse cosine, in radians

3. A pendulum passes the lowest position with the angular velocity 3. Find its angular velocity at the highest position.

E = 1/2(3)² − 1the energy at the lowest positionE = 3.5greater than 1, so the pendulum rotates1/2ω² − cos π = 3.5the same energy at the highest position1/2ω² = 2.5because −cos π is 1, subtract 1ω = √5about 2.24

4. Show that E = (1/2)y² + (1/2)x² is a conserved quantity of x′ = y, y′ = −x, and describe the level curves.

dE/dt = yy′ + xx′the chain ruledE/dt = y(−x) + xysubstitute the two equationsdE/dt = 0the two terms cancel

The level curves x² + y² = 2E are circles around the origin, so the origin is a center.

5. Find a conserved quantity of the equation x″ = −x³, and determine the kind of the equilibrium point (0, 0).

U′ = x³the condition U′ = −F with F = −x³U = 1/4x⁴integrateE = 1/2v² + 1/4x⁴the conserved quantity

The function U has a minimum at x = 0, so the origin is a center. The linearization has the matrix 0100 with the determinant 0, so it does not decide.

6. A pendulum with the friction term 0.5ω has the angular velocity 2 at one instant. Find the rate of change of its energy at that instant.

dE/dt = −bω²the result of Part 6dE/dt = −(0.5)(2)²with b = 0.5 and ω = 2dE/dt = −2the energy decreases

Python Practice

Step 1. The energy at two points

The function E below is the energy of Part 3. A pendulum is released at rest at the angle π/3, and Part 4 found the angular velocity 1 at the lowest position. The code prints the energy at both points.

Python

Both values are −0.5. Now release the pendulum at rest at the angle 2. The energy conservation gives the angular velocity at the lowest position as the square root of 2(1 − cos 2). Store this number in w, and print the energy at the start and at the lowest position. Both values should be 0.416.

Python

Step 2. The energy along a numerical solution

The function rk below makes one step of a numerical method that is more accurate than the method of Euler. Topic 7.2 covers it. The code follows the pendulum from the angle π/3 until t = 10 and prints the energy at the end.

Python

The energy is still −0.5. Now start at the lowest position with the angular velocity 2.5, so the first line for p has the entries 0 and 2.5. The energy should be 2.125, which is greater than 1, and the pendulum rotates.

Python

Step 3. The period for a large amplitude

A pendulum that is released at rest reaches the lowest position after one quarter of a period. The code below counts the time until the angle is no longer positive and multiplies it by 4. The function np.greater(a, b) is true when a is greater than b.

Python

The period is 6.288, close to 2π. Now find the period for the angle 2 at the start. The table of Part 5 gives 8.35.

Python

Step 4. Friction and the energy

The code below adds the friction term with b = 0.5 and follows the pendulum from the angle 2 until t = 10. It prints the energy at the start and at the end.

Python

The energy falls from 0.416 to −0.990, close to the smallest value −1. Now remove the friction by setting b to 0. The two values should both be 0.416.

Python

Step 5. The potential energy of another system

The function U below is the potential energy of the equation x″ = x − x³ of Part 6. The code prints its values at the three equilibrium points.

Python

The values are −0.25, −0.25, and 0. The two points with the smaller value are minima of U, and they are centers. Now use the equation x″ = 4x − x³. Its potential energy is −2x² + (1/4)x⁴, and its equilibrium points have x = 2, x = −2, and x = 0. Print the three values. They should be −4, −4, and 0.

Python

Quiz

This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.

Choose how your answers are checked

1. For the pendulum θ′ = ω, ω′ = −sin θ, which function is constant along each trajectory?

2. A pendulum with θ′ = ω, ω′ = −sin θ is released at rest at the angle π/2. Find the positive angular velocity at the lowest position, to two decimal places.

3. A pendulum with θ′ = ω, ω′ = −sin θ passes the lowest position with the angular velocity 2.5. What does it do?

4. The equation x″ = F(x) has the potential energy U(x). Which statement is correct for an equilibrium point at a minimum of U?

5. A pendulum with the friction term 0.2ω has the angular velocity 3 at one instant. Find the rate of change dE/dt of its energy at that instant.

Next: Topic 6.3, Models of Populations