Steply

Min of f(x, y) = x^2 + y^2 subject to x + 2y = 10

Step by step, with the reason for every step · Lagrange multipliers · Calculus 3

Step by step

The question

Question: find the minimum of f(x, y) = x² + y² with x + 2y = 10.

f(x, y) = x2 + y2, x + 2y = 10

1 Set up the equations

At the best point, the level curve of f just touches the curve.

So the two gradients point the same way.

The rule: ∇f = λ∇g.

λ is the Greek letter lambda.

It is just a number.

∇f = λ ∇g

The curve is g = 10, with g(x, y) = x + 2y.

g(x, y) = x + 2y

The x parts: f_x = λ g_x.

f_x is 2x, g_x is 1.

① 2x = λ

The y parts: f_y = λ g_y.

f_y is 2y, g_y is 2.

② 2y = λ × 2

And ③: stay on the curve.

③ x + 2y = 10

Careful!

The curve's own equation is part of the system.

Without it, we cannot find x and y.

Careful: three equations: never forget ③

2 Solve the equations

From ①: λ is 2x.

λ = 2x

From ②: λ is y.

λ = y

Both are λ, so they are equal.

2x = y

Tidy it up: y = 2x.

y = 2x

Put it into ③.

x + 2(2x) = 10

Open the bracket and add the like terms.

5x = 10

Divide by 5: x = 2.

x = 2

Then y = 2x gives y = 4.

y = 4

3 Compare the values

At (2, 4), f is 20.

f(2, 4) = 20

There is one point, so it gives the minimum: 20.

= min 20 at (2, 4)

4 Check

Let's check on the xy grid.

The orange line is the curve ③: x + 2y = 10.

The blue curve is where f is 20.

It just touches the line at the point.

Another point on the line, (4, 3), gives 25.

That is bigger, as a minimum needs.

Right!

another point on the line: f(4, 3) = 25

Let's look back.

First: set up the equations.

Then: solve the equations.

Then: compare the values.

Last: check.

Answer
= min 20 at (2, 4)

Your turn

Try this one yourself, then check:

Find the minimum of f(x, y) = 4x2 + 2y2, 2x + 2y = 6
Show the answer
min 12 at (1, 2)

More from Lagrange multipliers

The whole lesson: Lagrange multipliers →