MA 261 – Lesson 17: Lagrange Multipliers (Section 15.8)

Page 1

Page 1: Title page for Lesson 17 on Lagrange Multipliers with course announcements.
Original handwritten page 1

Announcements

Note: Lagrange Multipliers (Section 15.8) is not included on Exam 1.

Exam 1 is on Wednesday, February 25th, in ELLT 116 at 6:30 PM. The following are posted on Brightspace: exam instructions, seating chart, and study guide.

Office hours before Exam 1: Today and Monday, 9:45 AM–11:15 AM; Tuesday and Wednesday, 2:45 PM–4:15 PM.


Page 2

Page 2: Warm-up example - find max/min of x^2+y^2 on xy=1 by substitution.
Original handwritten page 2
Warm-Up Example: Constrained Optimization

Find the maximum and minimum of the objective function \(x^2 + y^2\) on the constraint curve \(xy = 1\).

Solution (by substitution):

From the constraint \(xy = 1\), write \(y = \frac{1}{x}\) for \(x \neq 0\). Substituting into the objective gives:

\[g(x) = x^2 + \frac{1}{x^2}, \quad x \neq 0\]

There is no maximum since \(g(x)\) grows without bound. Setting the derivative to zero:

\[g'(x) = 2x - \frac{2}{x^3} = 0 \implies x^4 = 1\]

So \(x = 1\) or \(x = -1\), giving points \((1, 1)\) and \((-1, -1)\). The minimum occurs at both points.


Page 3

Page 3: Geometric motivation for Lagrange Multipliers - level curves touching the constraint curve at optimal points.
Original handwritten page 3

Lagrange Multipliers: Geometric Motivation

Revisiting: find the max/min of \(f(x,y) = x^2 + y^2\) on the constraint \(g(x,y) = xy = 1\) (a hyperbola).

Diagram Description: Concentric circles centered at the origin represent level curves of \(f(x,y) = x^2 + y^2\) at increasing radii. The hyperbola \(xy = 1\) passes through the first and third quadrants. Points \((1,1)\) and \((-1,-1)\) are marked where the smallest circle just touches the hyperbola. A line represents their shared tangent at these contact points.

Moving along the hyperbola away from \((1,1)\) or \((-1,-1)\) leads to larger circles, meaning larger \(f\)-values. So these are the minimum-distance points on the hyperbola from the origin.

Key Observation: At \((1,1)\) and \((-1,-1)\), the level curve of \(f\) and the constraint curve \(xy=1\) touch — their tangent lines are parallel. Since the gradient is always perpendicular to the tangent, parallel tangents mean parallel gradients:

\[\nabla f \parallel \nabla g \quad \text{at the minimum points.}\]

Page 4

Page 4: Computing gradients and deriving the Lagrange condition grad f = lambda grad g.
Original handwritten page 4

The Lagrange Condition

For \(f(x,y) = x^2 + y^2\) and \(g(x,y) = xy\):

\[\nabla f = \langle 2x,\, 2y \rangle, \qquad \nabla g = \langle y,\, x \rangle\]

At the critical points the gradients are scalar multiples of each other:

Diagram Description: A circle (level curve) is tangent to a hyperbola (constraint) at a point. Two arrows show \(\nabla f\) and \(\nabla g\) both pointing outward in the same direction, confirming they are parallel.

Lagrange Condition: At every point of max/min on the constraint \(g = k\):

\[\nabla f = \lambda\, \nabla g\]

where \(\lambda\) is a scalar called the Lagrange multiplier.


Page 5

Page 5: The formal Method of Lagrange Multipliers - two steps.
Original handwritten page 5
Method of Lagrange Multipliers

To find the max/min of \(f(x,y,z)\) subject to \(g(x,y,z) = k\):

Procedure:
  1. Solve the system from \(\nabla f = \lambda\,\nabla g\) plus the constraint: \[\begin{cases} f_x = \lambda\, g_x \\ f_y = \lambda\, g_y \\ f_z = \lambda\, g_z \\ g(x,y,z) = k \end{cases}\] Find all \((x,y,z)\) and \(\lambda\) satisfying all four equations simultaneously.
  2. Evaluate \(f(x,y,z)\) at each solution. The highest value is the Maximum; the lowest is the Minimum.

Page 6

Page 6: Setting up verification of max/min of x^2-y^2 on the unit circle using Lagrange Multipliers.
Original handwritten page 6
Example: Verifying with Lagrange Multipliers

Find the max/min of \(f(x,y) = x^2 - y^2\) subject to \(x^2 + y^2 = 1\).

Previously solved by substitution: setting \(y^2 = 1 - x^2\) and solving yields candidate points \((-1,0)\), \((1,0)\), \((0,1)\), \((0,-1)\).

Diagram Description: The unit circle \(x^2 + y^2 = 1\) is drawn centered at the origin. Four red points mark the axis intercepts: \((1,0)\), \((-1,0)\), \((0,1)\), \((0,-1)\) — the candidate extrema.

We now verify using Lagrange Multipliers.


Page 7

Page 7: Full Lagrange Multiplier solution for x^2-y^2 on the unit circle - max 1 at (+-1,0), min -1 at (0,+-1).
Original handwritten page 7
Example (continued): Lagrange Multiplier Solution

For \(f(x,y) = x^2 - y^2\) and \(g(x,y) = x^2 + y^2\): \(\nabla f = \langle 2x, -2y \rangle\) and \(\nabla g = \langle 2x, 2y \rangle\).

System \(\nabla f = \lambda\,\nabla g\):

\[\begin{cases} 2x = \lambda(2x) & \text{(I)} \\ -2y = \lambda(2y) & \text{(II)} \\ x^2 + y^2 = 1 & \text{(III)} \end{cases}\]

From (I): \((\lambda - 1)(2x) = 0\), so \(\lambda = 1\) or \(x = 0\).

Case 1 (\(\lambda = 1\)): From (II): \(-2y = 2y \implies y = 0\). Then (III) gives \(x = \pm 1\). Points: \((1,0)\) and \((-1,0)\).

Case 2 (\(x = 0\)): From (III): \(y^2 = 1 \implies y = \pm 1\). Points: \((0,1)\) and \((0,-1)\).

Evaluate \(f\) at all candidates:

\[f(1,0) = 1 \quad \textbf{(Max)}, \qquad f(-1,0) = 1 \quad \textbf{(Max)}\] \[f(0,1) = -1 \quad \textbf{(Min)}, \qquad f(0,-1) = -1 \quad \textbf{(Min)}\]

Maximum value is \(1\), minimum value is \(-1\). This confirms the substitution result.


Page 8

Page 8: Lagrange Multipliers for f(x,y)=xy subject to x^2+xy+y^2=1, setting up the system.
Original handwritten page 8
Example: A More Complex Constraint

Find the max/min of \(f(x,y) = xy\) subject to \(g(x,y) = x^2 + xy + y^2 = 1\).

The gradients are \(\nabla f = \langle y, x \rangle\) and \(\nabla g = \langle 2x+y,\; x+2y \rangle\).

System \(\nabla f = \lambda\,\nabla g\):

\[\begin{cases} y = \lambda(2x+y) & \text{(I)} \\ x = \lambda(x+2y) & \text{(II)} \\ x^2 + xy + y^2 = 1 & \text{(III)} \end{cases}\]

Assuming \(2x + y \neq 0\), from (I): \(\lambda = \dfrac{y}{2x+y}\). Substituting into (II):

\[x = \frac{y}{2x+y}(x+2y) \implies x(2x+y) = y(x+2y)\] \[2x^2 + xy = xy + 2y^2 \implies x^2 = y^2\]

This means \(y = x\) or \(y = -x\).

Special case \(2x + y = 0\): Then \(y = -2x\) and from (I): \(x = 0, y = 0\). Substituting into (III) gives \(0 = 1\), a contradiction. No solutions from this case.


Page 9

Page 9: Completing the example - sub-case y=x gives max 1/3, sub-case y=-x gives min -1.
Original handwritten page 9
Example (continued): Solving the Two Sub-Cases

From the previous page, \(x^2 = y^2\) gives \(y = x\) or \(y = -x\).

Sub-case A: \(y = x\). Substituting into (III):

\[x^2 + x^2 + x^2 = 1 \implies 3x^2 = 1 \implies x = \pm\frac{1}{\sqrt{3}}\]

Points: \(\left(\tfrac{1}{\sqrt{3}}, \tfrac{1}{\sqrt{3}}\right)\) and \(\left(-\tfrac{1}{\sqrt{3}}, -\tfrac{1}{\sqrt{3}}\right)\).

\[f\!\left(\tfrac{1}{\sqrt{3}}, \tfrac{1}{\sqrt{3}}\right) = f\!\left(-\tfrac{1}{\sqrt{3}}, -\tfrac{1}{\sqrt{3}}\right) = \frac{1}{3} \quad \textbf{(MAX)}\]

Sub-case B: \(y = -x\). Substituting into (III):

\[x^2 - x^2 + x^2 = 1 \implies x^2 = 1 \implies x = \pm 1\]

Points: \((1,-1)\) and \((-1,1)\).

\[f(1,-1) = -1 = f(-1,1) \quad \textbf{(MIN)}\]

Conclusion: The maximum of \(f(x,y) = xy\) on \(x^2 + xy + y^2 = 1\) is \(\dfrac{1}{3}\) and the minimum is \(-1\).


Page 10

Page 10: Three-variable example - max/min of x+5y+3z on the unit sphere, maximum sqrt(35) and minimum -sqrt(35).
Original handwritten page 10
Example: Three Variables on the Unit Sphere

Find the max/min of \(f(x,y,z) = x + 5y + 3z\) subject to \(g(x,y,z) = x^2 + y^2 + z^2 = 1\).

The gradients are \(\nabla f = \langle 1, 5, 3 \rangle\) and \(\nabla g = \langle 2x, 2y, 2z \rangle\).

System \(\nabla f = \lambda\,\nabla g\):

\[\begin{cases} 1 = \lambda(2x) & \text{(I)} \\ 5 = \lambda(2y) & \text{(II)} \\ 3 = \lambda(2z) & \text{(III)} \\ x^2 + y^2 + z^2 = 1 & \text{(IV)} \end{cases}\]

Since \(\lambda = 0\) would give \(1 = 0\) from (I), we have \(\lambda \neq 0\). Solving for each variable:

\[x = \frac{1}{2\lambda}, \qquad y = \frac{5}{2\lambda}, \qquad z = \frac{3}{2\lambda}\]

Substituting into (IV):

\[\frac{1}{4\lambda^2} + \frac{25}{4\lambda^2} + \frac{9}{4\lambda^2} = 1 \implies \frac{35}{4\lambda^2} = 1 \implies \lambda = \pm\frac{\sqrt{35}}{2}\]

For \(\lambda = \dfrac{\sqrt{35}}{2}\):

\[(x,y,z) = \left(\frac{1}{\sqrt{35}},\; \frac{5}{\sqrt{35}},\; \frac{3}{\sqrt{35}}\right)\] \[f = \frac{1 + 25 + 9}{\sqrt{35}} = \sqrt{35} \quad \textbf{(MAX)}\]

For \(\lambda = -\dfrac{\sqrt{35}}{2}\):

\[(x,y,z) = \left(-\frac{1}{\sqrt{35}},\; -\frac{5}{\sqrt{35}},\; -\frac{3}{\sqrt{35}}\right), \qquad f = -\sqrt{35} \quad \textbf{(MIN)}\]