Back to the on-screen lesson ·

Constraint forces and Lagrange multipliers

Lagrange multipliers for constraint forces: tensions, normal forces, when a body leaves a surface, and nonholonomic constraints.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to use Lagrange multipliers to find constraint forces, and decide where a body leaves a surface or a string goes slack.

2. What you already have

Lagrange's equations let you choose coordinates that satisfy the constraints, so the forces enforcing them never appear. From multivariable calculus you know Lagrange multipliers for maximizing a function subject to a constraint: at the optimum the gradient of the function is a multiple of the gradient of the constraint. This lesson uses the same idea to bring constraint forces back into Lagrangian mechanics when they are the question.

3. Words for this lesson

TermWhat it means
Constraint forceA force, such as tension or a normal force, that keeps a system on its allowed motions.
Lagrange multiplierAn extra unknown $\lambda(t)$ added for each constraint, solved for along with the motion.
Generalized constraint force$\lambda\,\partial f/\partial q_i$, the constraint's contribution to the equation for $q_i$.
Virtual displacementAn instantaneous change of configuration allowed by the constraints, used to show constraint forces do no work.
Unilateral constraintOne that can push but not pull, such as a surface; it holds only while its force keeps its sign.
Nonholonomic constraintA constraint on velocities that cannot be written as an equation among coordinates.

4. Recovering the forces that constraints exert

Suppose a system's coordinates $q_1, \ldots, q_n$ are tied by a constraint $f(q_1, \ldots, q_n) = 0$. Instead of eliminating one coordinate, keep them all and add an unknown function $\lambda(t)$, the Lagrange multiplier. The equations of motion become

$$\frac{\partial\mathcal{L}}{\partial q_i} + \lambda\frac{\partial f}{\partial q_i} = \frac{d}{dt}\frac{\partial\mathcal{L}}{\partial\dot{q}_i}, \qquad i = 1, \ldots, n,$$

together with $f = 0$: $n + 1$ equations for $n$ coordinates and $\lambda$. The term $\lambda\,\partial f/\partial q_i$ is the generalized constraint force in the $q_i$ equation. When $q_i$ is a Cartesian coordinate it is the ordinary component of the constraint force; when $q_i$ is a distance from a pivot it is the tension or normal force along it.

The method works because constraint forces are perpendicular to every allowed motion, so they point along the gradient of $f$, the only direction the constraint forbids. The multiplier measures how hard the constraint has to push in that direction.

Another way: picture

Imagine the bead on a wire as a bead in open space that is being pushed back onto the wire whenever it tries to leave. The push is always straight away from any direction the bead could move along the wire: along the gradient of the equation that defines the wire. The multiplier is the size of that push, found by requiring that the bead stay exactly on the wire.

Another way: steps

  1. Keep one extra coordinate across the constraint you want the force of.
  2. Write $\mathcal{L}$ in all the coordinates and the constraint $f = 0$.
  3. Add $\lambda\,\partial f/\partial q_i$ to each Lagrange equation.
  4. Impose $f = 0$ and its derivatives, and solve for $\lambda$.
  5. Read off the force; for a surface, check where it changes sign.

5. Why constraint forces do no work

A virtual displacement is a small change of configuration $\delta q_i$ made at one instant, consistent with the constraints. For the constraint $f = 0$ it satisfies $\sum(\partial f/\partial q_i)\delta q_i = 0$: it lies along the surface $f = 0$, perpendicular to the gradient. An ideal constraint force points along the gradient, so it does no work in any virtual displacement. This is d'Alembert's principle, and it is the assumption behind Lagrangian mechanics.

Smooth surfaces, inextensible strings, rigid rods and rolling without slipping all satisfy it. Friction that causes sliding does not: a sliding block's friction points along the allowed motion and does negative work. Such forces must be added to Lagrange's equations by hand as generalized forces, which is why this course treats them only through damping terms.

6. The Atwood machine's tension

Let $x_1$ and $x_2$ be the distances of the two masses below the pulley, with the string constraint $f = x_1 + x_2 - \ell = 0$. Then $\mathcal{L} = \tfrac{1}{2}m_1\dot{x}_1^2 + \tfrac{1}{2}m_2\dot{x}_2^2 + m_1gx_1 + m_2gx_2$, and since $\partial f/\partial x_1 = \partial f/\partial x_2 = 1$, the equations are $m_1g + \lambda = m_1\ddot{x}_1$ and $m_2g + \lambda = m_2\ddot{x}_2$.

These are Newton's laws for each mass with $\lambda$ in the place of an upward force of size $-\lambda$: the multiplier is minus the tension. With the constraint, $\ddot{x}_2 = -\ddot{x}_1$; subtracting gives the acceleration and adding gives $T = -\lambda = 2m_1m_2g/(m_1 + m_2)$. The tension lies between the two weights, as it must for the heavier mass to fall and the lighter to rise.

7. A pendulum's tension at every angle

Use polar coordinates $r, \phi$ for the bob with the constraint $f = r - L = 0$. The radial equation reads $mr\dot{\phi}^2 + mg\cos\phi + \lambda = m\ddot{r}$, and with $r = L$ fixed the right side is zero. So $\lambda = -(mL\dot{\phi}^2 + mg\cos\phi)$, and the tension is $T = mL\dot{\phi}^2 + mg\cos\phi$: the weight's component along the string plus the centripetal requirement.

Combined with energy conservation, this gives the tension at every angle. Released from the horizontal, $L\dot{\phi}^2 = 2g\cos\phi$ and $T = 3mg\cos\phi$: three times the weight at the bottom. A pendulum released from higher than horizontal would see its string go slack when the formula for $T$ turns negative, at which point the bob leaves its circle and flies as a projectile until the string snaps taut again.

8. Unilateral constraints: when a body leaves a surface

A surface can push but not pull. The multiplier method gives the normal force the surface would need to keep a body on it; while that force is positive the body stays, and where it would turn negative the body leaves. The constraint is then dropped and the motion continues as free flight.

For a block sliding from rest over a smooth dome of radius $R$, energy gives $v^2 = 2gR(1 - \cos\theta)$, and the radial equation gives $N = mg\cos\theta - mv^2/R = mg(3\cos\theta - 2)$. The normal force falls to zero at $\cos\theta = 2/3$, about $48°$ from the top, whatever the radius or the mass. A child sliding down a snow-covered dome in Minnesota leaves it at that angle, not at the side.

9. Nonholonomic constraints

Some constraints restrict velocities in a way that no equation of coordinates can capture. A coin rolling without slipping on a table can reach any position and any orientation, so no equation connects its coordinates; yet at each instant its contact point must be at rest, a condition on its velocities. Such a constraint is nonholonomic.

Nonholonomic constraints cannot be removed by a choice of coordinates, but the multiplier method still works: the velocity constraint $\sum a_i\dot{q}_i = 0$ contributes $\lambda a_i$ to each equation. The same kind of constraint governs a car's wheels, which roll but cannot slide sideways, and it is why parallel parking is possible: a car can reach a position to its side only by a sequence of forward and backward motions.

10. The method, step by step, and how to check it

  1. Decide which force you want and keep the coordinate across which it acts: the radius for a string's tension, the height above a surface for a normal force.
  2. Write the constraint as $f = 0$ and compute its partial derivatives.
  3. Add the multiplier terms to each Lagrange equation.
  4. Impose the constraint, often with energy conservation, and solve for $\lambda$.

Checking an answer. The constraint force must reproduce Newton's second law for each body separately. For a hanging mass at rest it must equal the weight. A tension must be positive while the string is taut; a normal force must be positive while the contact holds. And the constraint force must do no work: its dot product with the allowed velocity must be zero.

11. Why not always use Newton's laws for constraint forces

For a single pendulum or a block on a dome, Newton's laws give the constraint force as quickly as a multiplier. The method earns its place in systems with several coupled constraints, where a free-body diagram for each part is error-prone, and in numerical simulation, where engineers add a multiplier for every joint of a linkage and let software solve for all the forces at once.

Computer graphics and game physics engines do exactly this: each joint of a simulated character, each hinge of a door and each contact between colliding bodies is a constraint with its multiplier, solved every frame. The same numbers tell an engineer whether a bolt in a car's suspension or a pin in a crane's boom is carrying a safe load, which is often the question that matters most.

12. In the world: camelback humps and airtime

Coaster riders love airtime, the feeling of floating out of the seat over a hump. At the top of a hump of radius $R$, the seat pushes up with $N = m(g - v^2/R)$. When the hump's radius equals $v^2/g$, the seat pushes with nothing: riders are weightless. For a train at $25$ m/s, that radius is about $64$ m.

Designers at parks such as Cedar Point in Ohio shape camelbacks so the radius is a little less than $v^2/g$, giving a gentle negative push of perhaps a fifth of a $g$ that lifts riders against their lap bars. They cannot let it go much further: a normal force far below zero would need restraints to hold riders in, and the wheels under the track, which play the role of the constraint, must be designed to pull as well as push. The multiplier method is how those wheel loads are calculated for every point on the track.

13. In the world: the tension in a swing's chains

A child on a playground swing, swung up until the chains are nearly horizontal, feels the chains pull with up to three times her weight at the bottom: the $3mg\cos\phi$ of a pendulum released from the horizontal. A $30$ kg child puts about $900$ N into the chains, split between two, so playground standards in the United States require swing hangers and chains rated well above that, with a large safety factor for adults who use the swings.

The same calculation shows why swinging past the horizontal is dangerous. Above that height, the tension formula turns negative before the top of the arc: the chains go slack, and the rider falls freely inside the circle until the chains snap taut with a jerk. Playground swings are designed with short enough chains and low enough pivots to make that difficult.

14. A body on a dome does not stay on until the side

A block sliding over a smooth dome seems to have a surface under it all the way to the side, so it is natural to think it follows the surface there. But the dome can only push, and as the block speeds up it needs less and less push to follow the curve; at $\cos\theta = 2/3$ it needs none, and beyond that it would need a pull. It leaves at about $48°$.

A second error concerns signs. The multiplier is a force along the gradient of $f$, and its sign depends on how $f$ was written. Read the physical force from the equation, not from the symbol: the tension in the Atwood machine is $-\lambda$.

15. The multiplier as a tension

  1. A mass $m$ hangs at rest on a string from a fixed point. Keep its height $y$ below the support with the constraint $f = y - L = 0$.

    $\mathcal{L} = \tfrac{1}{2}m\dot{y}^2 + mgy$

    With $y$ measured downward, gravity lowers $U$ as $y$ grows.

  2. Write the equation with the multiplier.

    $mg + \lambda\dfrac{\partial f}{\partial y} = m\ddot{y}$

    $\partial\mathcal{L}/\partial y + \lambda\,\partial f/\partial y = \frac{d}{dt}\partial\mathcal{L}/\partial\dot{y}$.

  3. Evaluate the constraint's gradient.

    $\dfrac{\partial f}{\partial y} = 1$

    The constraint pushes along $y$.

  4. Impose the constraint.

    $y = L \Rightarrow \ddot{y} = 0 \Rightarrow \lambda = -mg$

    At rest on the string.

  5. Interpret the multiplier.

    $T = -\lambda = mg$

    An upward force equal to the weight, as it must be.

16. An Atwood machine's tension

  1. Masses $m_1 = 6.0$ kg and $m_2 = 4.0$ kg hang with $x_1 + x_2 = \ell$. Write both equations with $g = 10$ m/s².

    $60 + \lambda = 6.0\ddot{x}_1, \quad 40 + \lambda = 4.0\ddot{x}_2$

    Each mass's weight and the multiplier.

  2. Use the constraint.

    $\ddot{x}_2 = -\ddot{x}_1$

    Differentiate $x_1 + x_2 = \ell$ twice.

  3. Subtract the second equation from the first.

    $20 = 6.0\ddot{x}_1 + 4.0\ddot{x}_1 = 10\ddot{x}_1$

    The multiplier cancels.

  4. Solve for the acceleration.

    $\ddot{x}_1 = 2.0\ \text{m/s}^2$

    $(m_1 - m_2)g/(m_1 + m_2)$.

  5. Solve for the multiplier.

    $\lambda = 6.0 \times 2.0 - 60 = -48\ \text{N}$

    From the first equation.

  6. Read off the tension.

    $T = 48\ \text{N}$

    Between the weights $40$ N and $60$ N, and equal to $2m_1m_2g/(m_1 + m_2)$.

17. Leaving a dome

  1. A block slides from rest at the top of a smooth dome of radius $R$. Use polar coordinates from the center with $f = r - R = 0$.

    $\mathcal{L} = \tfrac{1}{2}m(\dot{r}^2 + r^2\dot{\theta}^2) - mgr\cos\theta$

    $\theta$ from the vertical; height $r\cos\theta$.

  2. Write the radial equation with the multiplier.

    $mr\dot{\theta}^2 - mg\cos\theta + \lambda = m\ddot{r}$

    $\partial f/\partial r = 1$.

  3. Impose the constraint and name the normal force.

    $\ddot{r} = 0 \Rightarrow N = \lambda = mg\cos\theta - mR\dot{\theta}^2$

    The dome pushes outward, along $+\hat{r}$.

  4. Use energy for the speed.

    $R^2\dot{\theta}^2 = 2gR(1 - \cos\theta)$

    It has fallen $R(1 - \cos\theta)$.

  5. Substitute to find the normal force.

    $N = mg\cos\theta - 2mg(1 - \cos\theta) = mg(3\cos\theta - 2)$

    Positive at the top, falling as it slides.

  6. Find where it vanishes.

    $\cos\theta = \dfrac{2}{3} \Rightarrow \theta = 48.2°$

    Where the block leaves.

  7. Find its speed as it leaves, for $R = 3.0$ m.

    $v^2 = gR\cos\theta = 9.8 \times 3.0 \times \tfrac{2}{3} = 19.6 \Rightarrow v = 4.4\ \text{m/s}$

    Then it flies as a projectile.

18. Your turn: a $2.0$ kg pendulum released from the horizontal passes the bottom. With $g = 10$ m/s², find the tension there.

  1. Write the tension formula.

    $T = 3mg\cos\phi$

    From the radial equation and energy.

  2. Set the angle to zero.

    $T = 3 \times 2.0 \times 10 \times \cos 0$

    At the bottom.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Evaluate the tension.

19. Guided practice

A small block starts from rest at the top of a smooth dome of radius $4$ m and slides down its side. At what angle $\theta$ from the top does it leave the surface?

20. Guided practice

Complete the worked solution: a pendulum of mass $1$ kg and length $2$ m is released from rest with its string horizontal, and $g = 10$ m/s². Find the square of the bob's speed at the bottom in m²/s², the tension there in N, and the tension when the string is $60°$ from the vertical, in N.

  1. Use energy conservation for the fall to the bottom.

    $v^2 = 2gL =$ v

    It falls the full length of the string.

  2. Evaluate three times the weight at the bottom.

    $T = 3mg\cos 0 =$ b

    The radial equation with the multiplier.

  3. Take the cosine of sixty degrees in the same formula.

    $T = 3mg\cos 60° =$ s

    The cosine is one half.

  4. Check the tension at the start.

    $T = 3mg\cos 90° = 0$

    At the horizontal, at rest, the string is slack for an instant.

21. Guided practice

Match each part of the multiplier method to what it is.

$f(q) = 0$$\lambda$$\lambda\,\partial f/\partial q_i$nonholonomic
the constraint
the multiplier
the constraint force
a velocity constraint that cannot be integrated

22. Practice

An Atwood machine hangs $m_1 = 7$ kg and $m_2 = 3$ kg over a light pulley, with $g = 10$ m/s². Keeping both heights as coordinates with the constraint $x_1 + x_2 = \ell$, fill in the acceleration in m/s², the tension in N, and the net force on $m_1$ in N.

value
acceleration (m/s²)
tension (N)
net force on the heavier mass (N)

23. Practice

A pendulum bob of mass $3$ kg is released from rest with its string horizontal. With $g = 10$ m/s², write the string's tension $T$, in newtons, as a formula in the angle $\phi$ of the string from the downward vertical, written $p$.

Answer:

24. Practice

A smooth hemispherical dome of radius $9$ m sits on level ground. A block slides from rest at its top. How high above the ground is the block when it leaves the dome, in meters?

Answer: m above the ground on leaving

25. Somewhere new

A roller coaster designer in Ohio wants riders to feel weightless at the top of a camelback hump that trains cross at $22$ m/s. What radius of curvature should the top of the hump have, in meters, with $g = 9.8$ m/s²?

Answer: m radius of the hump

26. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

27. Test question

A pendulum bob of mass $2$ kg is released from rest with its string horizontal. With $g = 10$ m/s², write the string's tension $T$, in newtons, as a formula in the angle $\phi$ of the string from the downward vertical, written $p$.

Answer:

28. What you can do now

You can find constraint forces with Lagrange multipliers. Explain to someone why a block sliding over a smooth dome leaves it before reaching the side.

Working for the steps left to you

18. Your turn: a $2.0$ kg pendulum released from the horizontal passes the bottom. With $g = 10$ m/s², find the tension there., step 3

$T = 60\ \text{N}$

Three times the weight.