Steply

Min of f(x, y) = 2x^2 + y^2 with 2x + y = 6

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) = 2x² + y² with 2x + y = 6.

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

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 = 6, with g(x, y) = 2x + y.

g(x, y) = 2x + y

The x parts: f_x = λ g_x.

f_x is 4x, g_x is 2.

① 4x = λ × 2

The y parts: f_y = λ g_y.

f_y is 2y, g_y is 1.

② 2y = λ

And ③: stay on the curve.

③ 2x + y = 6

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 2y.

λ = 2y

Both are λ, so they are equal.

2x = 2y

Tidy it up: y = x.

y = x

Put it into ③.

2x + (x) = 6

Open the bracket and add the like terms.

3x = 6

Divide by 3: x = 2.

x = 2

Then y = x gives y = 2.

y = 2

3 Compare the values

At (2, 2), f is 12.

f(2, 2) = 12

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

= min 12 at (2, 2)

4 Check

Let's check on the xy grid.

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

The blue curve is where f is 12.

It just touches the line at the point.

Another point on the line, (4, −2), gives 36.

That is bigger, as a minimum needs.

Right!

another point on the line: f(4, −2) = 36

Let's look back.

First: set up the equations.

Then: solve the equations.

Then: compare the values.

Last: check.

Answer
= min 12 at (2, 2)

Your turn

Try this one yourself, then check:

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

More from Lagrange multipliers

The whole lesson: Lagrange multipliers →