Step by step
The question
Question: find the maximum and minimum of f(x, y) = 2x − y with x² + y² = 20.
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.
The curve is g = 20, with g(x, y) = x² + y².
The x parts: f_x = λ g_x.
f_x is 2, g_x is 2x.
The y parts: f_y = λ g_y.
f_y is −1, g_y is 2y.
And ③: stay on the curve.
Careful!
The curve's own equation is part of the system.
Without it, we cannot find x and y.
2 Solve the equations
From ①: 2 = λ × 2x, so λ is 2/2x.
From ②: λ is −1/2y.
Both are λ, so they are equal.
Cross-multiply and tidy up: y = −1/2x.
Put it into ③.
Add the x² terms and divide: x² = 16.
Two numbers: x = 4 or −4.
Then y follows: two points.
3 Compare the values
At (4, −2), f is 10.
At (−4, 2), f is −10.
The bigger value is the maximum, the smaller one the minimum.
4 Check
Let's check on the xy grid.
The orange circle is the curve ③.
The blue lines are where f is 10 and −10.
Each just touches the circle.
Another point on the circle gives −4.47: between the two.
Right!
Let's look back.
First: set up the equations.
Then: solve the equations.
Then: compare the values.
Last: check.