Multivariable-Calculus ยท Unit 12 ยท Video 2 ยท Interactive Practice

Solving the Lagrange Equations, and Why the Method Works

IKey Formulas

FormulaNameFor f=x2+y2f = x^2 + y^2 on xy=3xy = 3
โˆ‡f=ฮปโˆ‡g,g=c\nabla f = \lambda \nabla g, \quad g = cLagrange system2x=ฮปy,2y=ฮปx,xy=32x = \lambda y, \quad 2y = \lambda x, \quad xy = 3
[2โˆ’ฮปโˆ’ฮป2][xy]=[00]\begin{bmatrix} 2 & -\lambda \\ -\lambda & 2 \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}Nonzero solution only if detโก=0\det = 04โˆ’ฮป2=0โ‡’ฮป=ยฑ24 - \lambda^2 = 0 \Rightarrow \lambda = \pm 2
โˆ‡fโ‹…u^=0\nabla f \cdot \hat{u} = 0 for every u^\hat{u} tangent to g=cg = cWhy it works: โˆ‡fโˆฅโˆ‡g\nabla f \parallel \nabla gAt (3,3)(\sqrt3, \sqrt3): โˆ‡f=โŸจ23,23โŸฉ=2โˆ‡g\nabla f = \langle 2\sqrt3, 2\sqrt3 \rangle = 2\nabla g
Compare the values of ff at all solutionsMin or max?f=6f = 6 at both points; f(t,3/t)=t2+9/t2โ†’โˆžf(t, 3/t) = t^2 + 9/t^2 \to \infty

Key Insight: Lagrange solutions are the critical points of ff on the constraint. They can be minima, maxima or neither, and there is no constrained second derivative test in this course, so you decide by comparing values of ff.

IIVisualization 1 โ€” Which Multipliers Allow a Point Other Than the Origin?

The two linear equations meet only at (0,0)(0, 0) unless detโก=4โˆ’ฮป2=0\det = 4 - \lambda^2 = 0.

๐Ÿ’ก The constant 33 never enters 4โˆ’ฮป2=04 - \lambda^2 = 0: on any hyperbola xy=cxy = c with c>0c > 0 the multiplier is ฮป=2\lambda = 2, and only the points (c,c)(\sqrt{c}, \sqrt{c}) and (โˆ’c,โˆ’c)(-\sqrt{c}, -\sqrt{c}) change.

IIIVisualization 2 โ€” Where Do โˆ‡f\nabla f and โˆ‡g\nabla g Line Up?

Along xy=3xy = 3, ff stops changing exactly where โˆ‡f\nabla f is perpendicular to the curve, which is where โˆ‡fโˆฅโˆ‡g\nabla f \parallel \nabla g.

IVVisualization 3 โ€” Minimum at 6\sqrt6, Maximum at Infinity

On the branch point (t,3/t)(t, 3/t), f=t2+9/t2f = t^2 + 9/t^2 bottoms out at 66 but has no upper bound.

๐Ÿ’ก The Lagrange equations found no maximum because there is none: a minimum that exists and is not at infinity must be among the Lagrange solutions, but a maximum at infinity never is.

VQuiz Questions

Problem 1 ยท Find the Multipliers

Given: minimize f=x2+4y2f = x^2 + 4y^2 subject to g=xy=2g = xy = 2. The first two Lagrange equations are 2x=ฮปy2x = \lambda y and 8y=ฮปx8y = \lambda x. Find the values of ฮป\lambda for which these two equations have a solution other than x=y=0x = y = 0.

โœ… Correct! detโก[2โˆ’ฮปโˆ’ฮป8]=16โˆ’ฮป2=0\det\begin{bmatrix} 2 & -\lambda \\ -\lambda & 8 \end{bmatrix} = 16 - \lambda^2 = 0 gives ฮป=ยฑ4\lambda = \pm 4.
โŒ Not quite. That is the multiplier for f=x2+y2f = x^2 + y^2. Here โˆ‡f=โŸจ2x,8yโŸฉ\nabla f = \langle 2x, 8y \rangle, so the matrix has an 88 in the lower-right corner.
โŒ Close, butโ€ฆ 1616 is ฮป2\lambda^2, not ฮป\lambda. Take the square root of ฮป2=16\lambda^2 = 16.
โŒ Close, butโ€ฆ ฮป2=16\lambda^2 = 16 has two roots. Whether ฮป=โˆ’4\lambda = -4 gives any points is decided later by the constraint, not by the determinant.
โŒ Not quite. Write the two equations as a homogeneous 2ร—22 \times 2 system and set its determinant to zero.
Show solution

โˆ‡f=โŸจ2x,8yโŸฉ\nabla f = \langle 2x, 8y \rangle and โˆ‡g=โŸจy,xโŸฉ\nabla g = \langle y, x \rangle, so โˆ‡f=ฮปโˆ‡g\nabla f = \lambda \nabla g reads 2x=ฮปy2x = \lambda y, 8y=ฮปx8y = \lambda x. Move everything to one side:

[2โˆ’ฮปโˆ’ฮป8][xy]=[00]\begin{bmatrix} 2 & -\lambda \\ -\lambda & 8 \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}

The trivial solution x=y=0x = y = 0 fails xy=2xy = 2, so we need the matrix to be non-invertible:

detโก=2โ‹…8โˆ’(โˆ’ฮป)(โˆ’ฮป)=16โˆ’ฮป2=0โŸนฮป=ยฑ4\det = 2 \cdot 8 - (-\lambda)(-\lambda) = 16 - \lambda^2 = 0 \quad\Longrightarrow\quad \lambda = \pm 4

Problem 2 ยท From Multipliers to Points

Given: the same problem, minimize f=x2+4y2f = x^2 + 4y^2 subject to xy=2xy = 2, with ฮป=ยฑ4\lambda = \pm 4. Find the candidate points and the minimum value of ff.

Which points solve the Lagrange equations?

What is the minimum value of ff?

โœ… Correct! ฮป=4\lambda = 4 gives x=2yx = 2y, so 2y2=22y^2 = 2 and (x,y)=ยฑ(2,1)(x, y) = \pm(2, 1) with f=4+4=8f = 4 + 4 = 8; ฮป=โˆ’4\lambda = -4 gives no real points.
โŒ Not quite. x=yx = y came from the video's f=x2+y2f = x^2 + y^2. Here 2x=4y2x = 4y, so x=2yx = 2y.
โŒ Close, butโ€ฆ 2x=4y2x = 4y gives x=2yx = 2y, not y=2xy = 2x. Check: at (1,2)(1, 2), 2x=22x = 2 but 4y=84y = 8.
โŒ Not quite. (2,โˆ’1)(2, -1) has xy=โˆ’2โ‰ 2xy = -2 \ne 2. With ฮป=โˆ’4\lambda = -4, x=โˆ’2yx = -2y and the constraint becomes โˆ’2y2=2-2y^2 = 2: no real solution.
โŒ Not quite. Use ฮป=4\lambda = 4 in 2x=ฮปy2x = \lambda y, then substitute into xy=2xy = 2.
โŒ Close, butโ€ฆ ff itself is the value asked for; there is no square root here, since f=x2+4y2f = x^2 + 4y^2 is not a squared distance.
โŒ Not quite. 5=22+125 = 2^2 + 1^2 evaluates x2+y2x^2 + y^2. The function is f=x2+4y2f = x^2 + 4y^2.
โŒ Not quite. 17=f(1,2)17 = f(1, 2), but (1,2)(1, 2) does not solve the Lagrange equations.
โŒ Not quite. Evaluate f=x2+4y2f = x^2 + 4y^2 at the candidate points.
Show solution

ฮป=4\lambda = 4: 2x=4y2x = 4y gives x=2yx = 2y, and 8y=4x8y = 4x says the same. The constraint becomes (2y)y=2(2y)y = 2, so y2=1y^2 = 1 and y=ยฑ1y = \pm 1:

(x,y)=(2,1)or(โˆ’2,โˆ’1)(x, y) = (2, 1) \quad\text{or}\quad (-2, -1)

ฮป=โˆ’4\lambda = -4: 2x=โˆ’4y2x = -4y gives x=โˆ’2yx = -2y, and the constraint becomes โˆ’2y2=2-2y^2 = 2, i.e. y2=โˆ’1y^2 = -1: no real points.

At both candidates f=22+4(1)2=8f = 2^2 + 4(1)^2 = 8. As in the video, f(t,2/t)=t2+16/t2โ†’โˆžf(t, 2/t) = t^2 + 16/t^2 \to \infty as tโ†’โˆžt \to \infty, so there is no maximum and the minimum is 88.

Problem 3 ยท Rate of Change Along the Constraint

Given: at a point PP on a curve g=cg = c, โˆ‡f(P)=โŸจ3,โˆ’1โŸฉ\nabla f(P) = \langle 3, -1 \rangle and โˆ‡g(P)=โŸจ1,2โŸฉ\nabla g(P) = \langle 1, 2 \rangle. The unit vector u^=15โŸจ2,โˆ’1โŸฉ\hat{u} = \tfrac{1}{\sqrt5}\langle 2, -1 \rangle is tangent to the curve. Find the rate of change of ff along the curve in the direction u^\hat{u}.

โœ… Correct! โˆ‡fโ‹…u^=15(6+1)=75โ‰ 0\nabla f \cdot \hat{u} = \tfrac{1}{\sqrt5}(6 + 1) = \tfrac{7}{\sqrt5} \ne 0, so ff still changes along the constraint: PP is not a constrained critical point, and indeed โŸจ3,โˆ’1โŸฉ\langle 3, -1 \rangle is not a multiple of โŸจ1,2โŸฉ\langle 1, 2 \rangle.
โŒ Not quite. The rate is 00 only at a constrained critical point, where โˆ‡fโˆฅโˆ‡g\nabla f \parallel \nabla g. Here โŸจ3,โˆ’1โŸฉ\langle 3, -1 \rangle is not a multiple of โŸจ1,2โŸฉ\langle 1, 2 \rangle, so compute โˆ‡fโ‹…u^\nabla f \cdot \hat{u}.
โŒ Not quite. 15=15(โˆ‡fโ‹…โˆ‡g)\tfrac{1}{\sqrt5} = \tfrac{1}{\sqrt5}(\nabla f \cdot \nabla g): you dotted with the normal direction โˆ‡g\nabla g, not the tangent u^\hat{u}.
โŒ Not quite. 10=โˆฃโˆ‡fโˆฃ\sqrt{10} = |\nabla f| is the rate in the steepest direction. Along the curve you may move only in the direction u^\hat{u}.
โŒ Not quite. The directional derivative is โˆ‡fโ‹…u^\nabla f \cdot \hat{u}.
Show solution

First check that u^\hat{u} is tangent: โˆ‡gโ‹…u^=15(2โˆ’2)=0\nabla g \cdot \hat{u} = \tfrac{1}{\sqrt5}(2 - 2) = 0. Then

dfdsโˆฃu^=โˆ‡fโ‹…u^=15(3โ‹…2+(โˆ’1)(โˆ’1))=75\frac{df}{ds}\Big|_{\hat{u}} = \nabla f \cdot \hat{u} = \frac{1}{\sqrt5}\big(3 \cdot 2 + (-1)(-1)\big) = \frac{7}{\sqrt5}

Because this is not zero, moving along g=cg = c in the direction u^\hat{u} increases ff and moving the other way decreases it, so PP is neither a constrained minimum nor a constrained maximum.

Problem 4 ยท Compare Values on a Closed Curve

Given: the Lagrange equations for f=xyf = xy on the circle x2+y2=8x^2 + y^2 = 8 have exactly four solutions: (2,2)(2, 2) and (โˆ’2,โˆ’2)(-2, -2) with ฮป=12\lambda = \tfrac12, and (2,โˆ’2)(2, -2) and (โˆ’2,2)(-2, 2) with ฮป=โˆ’12\lambda = -\tfrac12. Find the maximum and minimum of ff on the circle.

โœ… Correct! f=4f = 4 at (2,2)(2, 2) and (โˆ’2,โˆ’2)(-2, -2), f=โˆ’4f = -4 at (2,โˆ’2)(2, -2) and (โˆ’2,2)(-2, 2); the circle is closed and bounded, so nothing escapes to infinity and both extremes are among these points.
โŒ Not quite. At (0,22)(0, 2\sqrt2), f=0f = 0, but that point is not a Lagrange solution: โˆ‡f=โŸจ22,0โŸฉ\nabla f = \langle 2\sqrt2, 0 \rangle is not parallel to โˆ‡g=โŸจ0,42โŸฉ\nabla g = \langle 0, 4\sqrt2 \rangle. Evaluate ff at the four given points.
โŒ Not quite. Unlike the hyperbola, the circle is bounded: โˆฃxyโˆฃโ‰ค12(x2+y2)=4|xy| \le \tfrac12(x^2 + y^2) = 4, so ff cannot run off to infinity.
โŒ Not quite. Those are the multipliers ฮป\lambda, not values of ff. Compare f=xyf = xy at the points.
โŒ Not quite. Evaluate f=xyf = xy at each of the four solutions and compare.
Show solution

Evaluate f=xyf = xy at every solution of the Lagrange equations:

f(2,2)=f(โˆ’2,โˆ’2)=4,f(2,โˆ’2)=f(โˆ’2,2)=โˆ’4f(2, 2) = f(-2, -2) = 4, \qquad f(2, -2) = f(-2, 2) = -4

The circle is closed and bounded, so ff attains a maximum and a minimum on it, and each is a constrained critical point, hence among these four. So the maximum is 44 and the minimum is โˆ’4-4. The multiplier's sign does not decide min or max; the values of ff do.

Solved: 0 / 4