Multivariable Calculus, Interactive EditionXYZ Homework Edition

⇩ Download ▾

4.3 Lagrange Multipliers

Most optimization in practice comes with a leash: maximize ff, subject to g=cg = c. The leash changes everything. A constrained maximum is almost never at a critical point of ff itself — our specimen f(x,y)=xyf(x, y) = xy has only a saddle, no maximum at all — yet on the constraint circle x2+y2=4x^2 + y^2 = 4 the problem has clean, finite answers. The question is where to look, and the figure answers it twice over: once on the map, once along a ribbon.

A translucent red-and-blue saddle surface z = x*y with seventeen dark contour lines on the z = 0 plane — hyperbolas, plus a crossed pair of straight lines at level zero. A flat dark circle of radius 2 lies in that plane, and a thick red ribbon-like curve traces the value of x*y above and below each point of the circle, rising to two crests of height 2 and dipping to two troughs of depth 2. Two red marker points at the crests are hidden.Explore in 3D (opens in a new tab)
The translucent red-and-blue saddle z=xyz = xy, its seventeen dark level curves on the plane z=0z = 0 (hyperbolas, plus a crossed pair of lines at level 00), a flat dark circle of radius 22 in that same plane — the constraint x2+y2=4x^2 + y^2 = 4 — and a thick red ribbon that follows the circle while rising and falling with the surface: ff evaluated along the constraint, the only part of the surface the problem is allowed to use. Two marker points at the constrained maxima hide in the object list.

Explore

  1. Orbit to a low side view and follow the red ribbon once around. How many crests and how many troughs does it have? Note roughly where the crests sit over the dark circle.
  2. A crest is where ff, walking along the constraint, stops increasing and starts decreasing — it stalls. What is the ribbon's slope, measured along the walk, at a stall?
  3. The ribbon's height over the circle is xyxy. Using symmetry — the product is largest where xx and yy are equal and share a sign — predict the exact coordinates of the two crests and the value of ff there. Commit before revealing.
  4. Reveal the two hidden points with their eye toggles. They sit at the crests; zoom in and read their positions against the grid. Do they match your (±2,±2)(\pm\sqrt{2}, \pm\sqrt{2}), f=2f = 2?
  5. Now the map view: orbit to look straight down and drag the contour plot's z-offset from 00 up to 22. The whole family of level curves rides up the saddle as one sheet. As it reaches crest height, the curve xy=2xy = 2 meets the circle at exactly the two marked points — does it cross the circle there, or kiss it tangentially?
  6. Drag the z-offset back to about 11 and look at where xy=1xy = 1 meets the circle: four honest crossings. Check against the ribbon — over those four points, is it at a crest, or still climbing? Say the connection out loud: crossing a level curve means the walk is still changing ff. (The 17 levels put drawn curves exactly at the integer values 8,,8-8, \ldots, 8, so both curves in this step and the last are actually drawn; other level counts can hide them.)

From kiss to equations

At a tangency the constraint curve and the level curve share a tangent line, so their normals point along one line. Those normals are gradients — f\nabla f for the level curve, g\nabla g for the constraint — so at a constrained extremum

f = λ g \nabla f = \lambda\, \nabla g

for some scalar λ\lambda, the Lagrange multiplier, solved together with g=cg = c. The logic runs through step 6: where the level curve crosses the constraint, level curves of larger and smaller value lie on either side, so sliding along the constraint still changes ff — no extremum there. Only a kiss can stop the walk, and the ribbon says the same thing in its own language: kisses on the map are stalls on the ribbon.

12,12\frac{1}{2},\; -\frac{1}{2}
The multiplier equation, solved ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The multiplier equation, solved, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The pivot of the example: eliminating xx and yy from the Lagrange equations leaves 4λ2=14\lambda^2 = 1 (written here with LL for λ\lambda), whose two roots λ=±12\lambda = \pm\tfrac{1}{2} hand back the lines y=xy = x and y=xy = -x and, with the constraint, all four kiss points.

An original work of XYZ Homework, built around interactive XYZ 3D figures. Aligned to OpenStax Calculus Volume 3 (Strang & Herman), © OpenStax (Rice University), licensed CC BY-NC-SA 4.0; no OpenStax content is reproduced, and this work is not affiliated with or endorsed by OpenStax or Rice University. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.