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

01002000501002x + 4y = 400∇f = ⟨50, 100⟩f = 5000xy
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

© 2026 SME. All rights reserved.