MATH U101 · First-time lesson · Module 6, lectures L12–L15
Maxima, Minima and Lagrange Multipliers, taught from zero
Thomas' Calculus (15th ed.) §14.7–14.8. Finding the highest and lowest points of a surface: first near a point, then over a whole region, then along a curve. Budget 90–120 minutes, in two sittings.
Critical points & the second-derivative test (6.7 min, T7 Q5–Q6) · Absolute max & min on a triangle (5.0 min, T7 Q4). Each one is sound-on and pauses for your next move.
You have met the one-variable version of this module in school: to find the biggest value of g(x) on an interval [a, b], you check where g′ = 0 and you check the two endpoints. Module 6 is that same idea with one extra dimension. The derivative becomes the two partials of Module 4, and the "two endpoints" become a whole boundary curve. What's genuinely new, for everyone in the hall, is three things: the saddle point, the second-derivative test with its D, and Lagrange multipliers.
Why it deserves your hours: the mid-sem (5 Oct, open book) covers Modules 1–6, and both older past papers gave a whole question to "absolute max and min on a region": 15 marks in 2023, 12 marks in 2024. It is one fixed routine, and this page teaches it slowly.
First time → read in order and attempt every green "check yourself" box before opening it. Revising → the notes page has the compressed map and both past-paper questions fully worked with candidate tables.
1 · Peaks and valleys have flat tops §14.7
Picture the surface z = f(x, y) as a landscape. A local maximum at (a, b) is a hilltop: f(a, b) ≥ f(x, y) for every point near (a, b). A local minimum is the bottom of a dip, with ≤ instead.
Now use Module 4's slicing picture. Stand on a smooth hilltop and slice the surface east–west through your feet. The slice is an ordinary curve, and you're at its top, so its slope is zero: fx(a, b) = 0. Slice north–south: same argument, fy(a, b) = 0. So:
A point inside the domain where both partials are zero, or where a partial fails to exist, is called a critical point. The "fails to exist" clause is there for sharp tips: the cone z = √(x2 + y2) has its minimum at the origin, exactly where it has a point instead of a flat bottom, so its partials don't exist there.
Finding them is algebra. Take f(x, y) = x2 + y2 − 4x + 6y. Set fx = 2x − 4 = 0 and fy = 2y + 6 = 0: the only critical point is (2, −3). Is it a minimum? Complete the square in each letter: x2 − 4x = (x − 2)2 − 4 and y2 + 6y = (y + 3)2 − 9, so
Two squares can't be negative, so f ≥ −13 everywhere, with equality only at (2, −3). It's a minimum, and in fact the lowest point anywhere.
Check yourself: find every critical point of f(x, y) = x² + xy + y² − 3y.
fx = 2x + y and fy = x + 2y − 3. From the first, y = −2x; put it in the second: x − 4x − 3 = 0, so x = −1 and y = 2. One critical point, (−1, 2), where f = 1 − 2 + 4 − 6 = −3. (Section 3 decides what kind of point it is.)
2 · A flat point that is neither: the saddle
Here is the twist that makes this module more than school calculus. Take z = x2 − y2. At the origin fx = 2x = 0 and fy = −2y = 0, so it's a critical point. But slice east–west and you get z = x2, a valley with its bottom at the origin. Slice north–south and you get z = −y2, a hill with its top at the origin. The origin is a low point in one direction and a high point in another: a saddle point, shaped like a horse's saddle or a mountain pass.
So a critical point is only a candidate. It may be a max, a min, or a saddle, and you need one more tool to tell which.
3 · The second-derivative test §14.7
In one variable, g″ > 0 at a critical point meant "curving up, so a minimum". In two variables there are three second partials to combine: fxx (curving east), fyy (curving north) and the mixed fxy (how much the surface twists). The test packs them into one number:
| At the critical point | Conclusion |
|---|---|
| D > 0 and fxx > 0 | local minimum |
| D > 0 and fxx < 0 | local maximum |
| D < 0 | saddle point |
| D = 0 | the test says nothing; look at the function directly |
Why the minus sign? If the east and north curvatures agree in sign, their product is positive, which suggests a bowl or a dome. But a big twist fxy can bend the surface up along one diagonal and down along the other, and then it's a saddle after all. D > 0 says "the agreement beats the twist". On the saddle x2 − y2: fxx = 2, fyy = −2, fxy = 0, so D = −4 < 0: saddle, as the picture said.
A full example. f(x, y) = x3 + y3 − 3xy.
- Partials: fx = 3x2 − 3y, fy = 3y2 − 3x. Setting both to zero gives y = x2 and x = y2.
- Substitute the first into the second: x = x4, so x(x3 − 1) = 0, giving x = 0 or x = 1. (Factor; never divide by x, or you lose x = 0.) Critical points: (0, 0) and (1, 1).
- Second partials: fxx = 6x, fyy = 6y, fxy = −3.
- At (0, 0): D = 0 · 0 − 9 = −9 < 0, a saddle. At (1, 1): D = 36 − 9 = 27 > 0 with fxx = 6 > 0, a local minimum, value f(1, 1) = −1.
When D = 0: x4 + y4 and x4 − y4 both have D = 0 at the origin. The first is clearly a minimum (it's never negative), the second a saddle (positive along the x-axis, negative along the y-axis). Same D, different answers, which is exactly why the test must stay silent. Argue from the function itself.
Check yourself: classify the critical point (−1, 2) of f = x² + xy + y² − 3y from section 1.
fxx = 2, fyy = 2, fxy = 1, so D = 4 − 1 = 3 > 0 and fxx > 0: a local minimum, value −3.
4 · The exam question: absolute max and min on a region §14.7
A local max is only the top of its own neighbourhood. The exam usually asks something bigger: the highest and lowest value of f anywhere on a given region R. Two facts make that answerable.
- They exist. If f is continuous and R is closed (it contains its boundary) and bounded (it fits inside some big circle), then f actually reaches an absolute max and an absolute min on R. Every region in the past papers is of this kind.
- They can only hide in two places. Either inside R, and then the point is a critical point (section 1); or on the boundary of R, where section 1's argument doesn't apply because you can't walk in every direction.
So the whole job is to collect every point that could be the answer, then compare. That gives a routine you can run the same way every time:
- Interior: solve fx = fy = 0. Keep only the points that lie inside R; cross the others out, saying why.
- Each boundary piece: describe it with one variable (a segment as y = … for x in an interval, a circle with cos t, sin t). Substitute into f, which gives a one-variable function, and find where its derivative is zero inside the interval.
- Corners: list every point where two boundary pieces meet (they are the endpoints of step 2's intervals).
- Compare: put every candidate and its f-value in one table. The largest value is the absolute max, the smallest is the absolute min.
Unpack this step: the one-variable method step 2 relies on
For g(x) on [a, b]: differentiate, solve g′(x) = 0, keep the roots that lie between a and b, then evaluate g at those roots and at a and b. Biggest wins, smallest loses. Step 2 is this, once per boundary piece.
Notice what is not in the routine: the second-derivative test. You never need to know whether an interior candidate is a max, a min or a saddle, because the comparison table decides everything. (A saddle simply loses the comparison.)
The routine, slowly, on a triangle
Find the absolute max and min of f(x, y) = x2 + y2 − 2x − 4y + 1 on the triangle T with corners (0, 0), (4, 0), (0, 4).
- Interior. fx = 2x − 2 = 0 and fy = 2y − 4 = 0 give (1, 2). Inside T? Both coordinates are positive and 1 + 2 = 3 ≤ 4, so yes. Keep it: f(1, 2) = 1 + 4 − 2 − 8 + 1 = −4.
- Bottom edge y = 0, 0 ≤ x ≤ 4: f = x2 − 2x + 1, derivative 2x − 2 = 0 at x = 1. Candidate (1, 0), value 0.
- Left edge x = 0, 0 ≤ y ≤ 4: f = y2 − 4y + 1, derivative zero at y = 2. Candidate (0, 2), value 4 − 8 + 1 = −3.
- Slanted edge x + y = 4: write y = 4 − x, 0 ≤ x ≤ 4, and substitute. (4 − x)2 = 16 − 8x + x2 and −4(4 − x) = −16 + 4x, so f = x2 + 16 − 8x + x2 − 2x − 16 + 4x + 1 = 2x2 − 6x + 1. Derivative 4x − 6 = 0 at x = 3/2, so y = 5/2. Candidate (3/2, 5/2), value 2(9/4) − 9 + 1 = −7/2.
- Corners: f(0, 0) = 1, f(4, 0) = 16 − 8 + 1 = 9, f(0, 4) = 16 − 16 + 1 = 1.
- Compare in one table:
| Candidate | Where it came from | f |
|---|---|---|
| (1, 2) | interior critical point | −4 ← absolute min |
| (1, 0) | bottom edge | 0 |
| (0, 2) | left edge | −3 |
| (3/2, 5/2) | slanted edge | −7/2 |
| (0, 0) | corner | 1 |
| (4, 0) | corner | 9 ← absolute max |
| (0, 4) | corner | 1 |
A sanity check you can often use. Completing the square, f = (x − 1)2 + (y − 2)2 − 4: that's "(distance from (1, 2))² − 4". So f is smallest at the point of T nearest to (1, 2), which is (1, 2) itself, and largest at the point farthest from it, which is the corner (4, 0) (distance √13, against √5 for the other two corners). Same answer, no calculus. The 2023 paper's function can be read the same way (see the notes).
Check yourself: why didn't step 1 bother checking whether (1, 2) is a max, min or saddle?
Because the question is about absolute extremes, and the comparison table settles those. The second-derivative test answers a different question (what the surface looks like right around one point). Running it costs time and earns nothing here.
5 · Walk the boundary yourself
Step 2 of the routine turns each boundary piece into a one-variable problem. The widget lets you watch that happen. Choose a region, then drag the slider to walk once around its boundary. The top picture shows where you are; the graph underneath is f along the walk, one piece after another. Its bumps and dips are step 2's candidates, and its breaks are the corners. "Show candidates" lays out the full comparison table. Two of the regions are straight from the past papers.
Check yourself: on the diamond, f = 2x² + y − 3xy has an interior critical point (1/3, 4/9) with f = 2/9. Why is it neither the max nor the min?
Two reasons, either enough. The comparison: the boundary reaches 2 (above 2/9) and −6/5 (below it). The test: fxx = 4, fyy = 0, fxy = −3, so D = −9 < 0: a saddle. It still belongs in the table; it just loses.
Check yourself: on the disc slice, the only critical point of f = x² + y² + 2y + 2 is (0, −1). What do you write about it?
"(0, −1) is not in R (it has y < 0, but R needs y ≥ x ≥ 0), so it is not a candidate." Writing that sentence is worth marks; quietly including its value −1 in the table would give a wrong minimum.
6 · Lagrange multipliers: best value along a curve §14.8
Sometimes the whole problem lives on a curve: "largest value of 3x + 4y on the circle x2 + y2 = 25". Or a boundary piece is awkward to parametrise. Lagrange's method handles both, using the gradient ∇f = ⟨fx, fy⟩ from Module 5, a vector that always points perpendicular to the level curves of f.
The idea is a picture. Walk along the constraint curve g(x, y) = c and watch which level curve of f you're standing on. Where the constraint crosses a level curve, you can keep walking onto higher levels, so you're not at the best point yet. At the best point, the constraint just touches a level curve without crossing it. Two curves that touch share a tangent line, so their perpendicular directions agree too. Both are gradients, so:
λ (lambda) is just the unknown stretch factor between the two parallel vectors. Written out, that's three equations for three unknowns: fx = λgx, fy = λgy, g = c.
Worked: f = 3x + 4y, g = x2 + y2 = 25.
- ∇f = ⟨3, 4⟩, ∇g = ⟨2x, 2y⟩. Equations: 3 = 2λx, 4 = 2λy, x2 + y2 = 25.
- λ can't be 0 (then 3 = 0), so it's safe to divide by it: x = 3/(2λ), y = 4/(2λ).
- Into the circle: (9 + 16)/(4λ2) = 25, so λ2 = 1/4 and λ = ±1/2. That gives (3, 4) and (−3, −4).
- Compare: f(3, 4) = 25 is the max, f(−3, −4) = −25 is the min. As on the picture.
Step 2 above was safe only because we checked λ ≠ 0 first. In a system like y = 2λx, x = 8λy, dividing one equation by the other silently throws away the case x = y = 0. Split into cases instead ("either y = 0, or …"), follow each case to the end, and reject a case only by showing it breaks the constraint. The notes run exactly this example.
Two constraints (a curve cut out by two surfaces in space) use the same idea with two multipliers: ∇f = λ∇g + μ∇h, plus both constraint equations. It's in §14.8; the notes page has one short example.
Lagrange on a region's boundary. In an absolute-extrema question, a circular boundary piece can be handled either by parametrising (x = cos t, y = sin t) or by Lagrange with g = x2 + y2. Both give the same candidates; use whichever makes cleaner algebra, and the other as a check if you have time.
Check yourself: largest and smallest value of x + y on the circle x² + y² = 2.
1 = 2λx and 1 = 2λy (so λ ≠ 0), which forces x = y. Then 2x2 = 2, x = ±1. Max f(1, 1) = 2, min f(−1, −1) = −2.
7 · You're ready: what to do next
The module in four sentences. Interior peaks and dips are critical points (∇f = 0 or undefined). D sorts critical points into max, min and saddle, and is silent when D = 0. Absolute extremes on a closed bounded region come from one routine: interior, each boundary piece, corners, one comparison table. Along a curve, the best points are where ∇f is parallel to ∇g. To turn it into marks:
- Work the two past-paper questions on the notes page: the diamond (2024) and the disc slice (2023), each with a full candidate table. Cover the solution, run the routine, then compare.
- Drill from the notes page's exercise table (§14.7–14.8, odd numbers, answers in the back).
- For the open-book exam, tab the notes page's routine card and trap list, and write the four step headings on every region question even before you start computing. The headings show the examiner your method.
Pin it to §14.7–14.8 so it stays on the exam's methods. Prompts that work:
"I'm studying Thomas' Calculus 15th ed. §14.7. Give me a function and a closed triangular region, then let me run the absolute-extrema routine one step at a time (interior, each edge, corners, comparison table). Check each step before I move on; don't show your answer first."
"Quiz me on the second-derivative test: give me five critical points with their fxx, fyy, fxy values, including one where D = 0, and ask me to classify each."
"Using §14.8 only: set up and solve a Lagrange multiplier problem with one constraint where dividing by a variable would lose a case. Let me solve it first, then point out any case I missed."
One caution: AI answers can contain confident errors. Cross-check any number against the textbook's answers in the back, or against the candidate table idea.