SME
Calculus III (Multivariable) · Problem type
Lagrange multipliers
Use this for “Find the largest value of xy on the line 2x + 4y = 400, using a Lagrange multiplier.”
Diagram
f(x, y) = xy.
At (100, 50): f = 5000, ∂f/∂x = 50 and ∂f/∂y = 100.
|∇f|
=
√
50
2
+
100
2
=
111.8.
∇f = ⟨50, 100⟩ = 25 × ⟨2, 4⟩, so λ = 25: the level curve f = 5000 touches the line.
This is an example. Type your own values to start a new problem.
p
x
+
q
y
=
k
max
xy
=
xy
at
(
x
,
y
)
λ
Lagrange multiplier
worked out (not typed)
Formulas
λ
=
k
2 ×
p
×
q
25
=
400
2 × 2 × 4
x
=
λ
×
q
100 = 25 × 4
y
=
λ
×
p
50 = 25 × 2
xy
=
x
×
y
5,000 = 100 × 50
Assumptions
•
Make f(x, y) = xy as large as it can be on the line px + qy = k, with p, q and k above 0.
•
At the best point the level curve xy = M just touches the line, so ∇f = λ∇g: ⟨y, x⟩ = λ⟨p, q⟩.
•
So y = λp and x = λq; putting them into px + qy = k gives 2pqλ = k.
Step-by-step
WE KNOW
p = 2, q = 4, k = 400
FIND
Lagrange multiplier (λ), best x (x), best y (y), largest product (xy)
Step 1 · Find Lagrange multiplier (λ)
Use λ = k ÷ (2 × p × q)
Put
y
=
λp
and
x
=
λq
into
px
+
qy
=
k
:
pqλ
+
qpλ
=
k
,
so
2pqλ
=
k
.
λ
=
400
2 × 2 × 4
λ
=
400
4 × 4
λ
=
400
16
λ
=
25
Step 2 · Find best x (x)
Use x = λ × q
The
y
-part
of
∇f
=
λ
∇g:
∂(xy)/∂
y
=
x
equals
λ
times
q
.
x
=
25
×
4
x
=
100
Step 3 · Find best y (y)
Use y = λ × p
The
x
-part:
∂(xy)/∂
x
=
y
equals
λ
times
p
.
y
=
25
×
2
y
=
50
Step 4 · Find largest product (xy)
Use xy = x × y
The
largest
product.
Each
term
of
the
constraint
gets
half
of
k
here:
px
=
qy
=
k
2
.
xy
=
100
×
50
xy
=
5,000
Check
Put the numbers back in. Both sides should match.
25
=
400
2 × 2 × 4
✓
100 = 25 × 4 ✓
50 = 25 × 2 ✓
5,000 = 100 × 50 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
Related lessons
Partial derivatives and gradients
Main lesson
Directional derivative
Use this for “How fast does f(x, y) = x² + xy + 2y² change at (1, 2) in the direction of ⟨3, 4⟩?”
The chain rule for z = f(x, y)
Use this for “At (1, 2), ∂z/∂x = 4 and ∂z/∂y = 9. If x = 1 + 2t and y = 2 − t, find dz/dt at t = 0.”
Classify a critical point
Use this for “Find the critical point of f(x, y) = x² + xy + y² − 3x and say whether it is a maximum, a minimum or a saddle point.”