Peaks, valleys and saddles
Before you start: you'll need partial derivatives up to second order.
A function \(f(x, y)\) has a local maximum at \((a, b)\) if \(f(a, b)\) is bigger than every nearby value, and a local minimum if it is smaller. At either one, the surface is flat in every direction, so
\[f_x(a, b) = 0 \quad \text{and} \quad f_y(a, b) = 0\]
Points where both partial derivatives are zero are called stationary points. But not every stationary point is a maximum or minimum. It can also be a saddle point, which is a maximum in one direction and a minimum in another.
The idea in one picture
The test
At a stationary point, let \(r = f_{xx}\), \(s = f_{xy}\), \(t = f_{yy}\).
\(rt - s^2 > 0\) and \(r < 0\)
Maximum
\(rt - s^2 > 0\) and \(r > 0\)
Minimum
\(rt - s^2 < 0\)
Saddle point (neither)
\(rt - s^2 = 0\)
The test fails; investigate further.
Why it works: near a stationary point, Taylor's theorem gives \(f(a + h, b + k) - f(a, b) \approx \tfrac{1}{2}\big(rh^2 + 2shk + tk^2\big)\). This quadratic keeps one sign for every \(h, k\) exactly when \(rt - s^2 > 0\), and the sign of \(r\) says which.
The method
- Find \(f_x\) and \(f_y\), and solve \(f_x = 0\), \(f_y = 0\) together. List every solution.
- Find \(r\), \(s\), \(t\).
- At each stationary point, compute \(rt - s^2\) and classify.
- Find the maximum or minimum value by substituting into \(f\).
Solved examples
Example 1: A simple minimum
EasyFind the extreme values of \(f = x^2 + y^2 - 2x - 4y + 7\).
- \(f_x = 2x - 2 = 0\) and \(f_y = 2y - 4 = 0\), so the only stationary point is \((1, 2)\).
- \(r = 2\), \(s = 0\), \(t = 2\), so \(rt - s^2 = 4 > 0\) and \(r > 0\): a minimum.
- \(f(1, 2) = 1 + 4 - 2 - 8 + 7 = 2\).
AnswerMinimum value \(2\) at \((1, 2)\).
Example 2: A classic with a saddle
MediumExamine \(f = x^3 + y^3 - 3axy\) for maxima and minima, where \(a > 0\).
- \(f_x = 3x^2 - 3ay = 0\) and \(f_y = 3y^2 - 3ax = 0\). So \(y = \dfrac{x^2}{a}\), and then \(\dfrac{x^4}{a^2} = ax\), giving \(x = 0\) or \(x = a\). Stationary points: \((0, 0)\) and \((a, a)\).
- \(r = 6x\), \(s = -3a\), \(t = 6y\).
- At \((0, 0)\): \(rt - s^2 = -9a^2 < 0\), a saddle point.
- At \((a, a)\): \(rt - s^2 = 36a^2 - 9a^2 = 27a^2 > 0\) and \(r = 6a > 0\), a minimum. \(f(a, a) = a^3 + a^3 - 3a^3 = -a^3\).
AnswerMinimum value \(-a^3\) at \((a, a)\); saddle point at \((0, 0)\).
Example 3: Four stationary points
MediumFind the maximum value of \(f = xy(a - x - y)\), where \(a > 0\).
- \(f_x = y(a - 2x - y) = 0\) and \(f_y = x(a - x - 2y) = 0\). Solutions: \((0, 0)\), \((a, 0)\), \((0, a)\) and \(\left(\tfrac{a}{3}, \tfrac{a}{3}\right)\).
- \(r = -2y\), \(s = a - 2x - 2y\), \(t = -2x\).
- At \((0, 0)\), \((a, 0)\) and \((0, a)\): \(rt - s^2 = -a^2 < 0\), all saddle points.
- At \(\left(\tfrac{a}{3}, \tfrac{a}{3}\right)\): \(r = t = -\tfrac{2a}{3}\), \(s = -\tfrac{a}{3}\), so \(rt - s^2 = \tfrac{4a^2}{9} - \tfrac{a^2}{9} = \tfrac{a^2}{3} > 0\) and \(r < 0\): a maximum.
AnswerMaximum value \(\dfrac{a}{3}\cdot\dfrac{a}{3}\cdot\dfrac{a}{3} = \dfrac{a^3}{27}\).
Example 4: When the test fails
Exam levelFind the extreme values of \(f = x^4 + y^4 - 2x^2 + 4xy - 2y^2\).
- \(f_x = 4x^3 - 4x + 4y = 0\) and \(f_y = 4y^3 + 4x - 4y = 0\). Adding gives \(x^3 + y^3 = 0\), so \(y = -x\).
- Then \(4x^3 - 8x = 0\), so \(x = 0\) or \(x = \pm\sqrt 2\). Points: \((0, 0)\), \((\sqrt 2, -\sqrt 2)\), \((-\sqrt 2, \sqrt 2)\).
- \(r = 12x^2 - 4\), \(s = 4\), \(t = 12y^2 - 4\). At \((\pm\sqrt 2, \mp\sqrt 2)\): \(r = t = 20\), so \(rt - s^2 = 384 > 0\) and \(r > 0\): minima. \(f = 4 + 4 - 4 - 8 - 4 = -8\).
- At \((0, 0)\): \(r = t = -4\), \(s = 4\), so \(rt - s^2 = 0\) and the test fails. (Along \(y = x\), \(f = 2x^4 > 0\); along \(y = 0\), \(f = x^4 - 2x^2 < 0\) for small \(x\). So \((0, 0)\) is neither a maximum nor a minimum.)
AnswerMinimum value \(-8\) at \((\sqrt 2, -\sqrt 2)\) and \((-\sqrt 2, \sqrt 2)\).
Example 5: A word problem
Exam levelAn open-top rectangular box must hold 32 cm³. Find the dimensions that use the least material.
- Let the base be \(x \times y\) and the height \(z\), with \(xyz = 32\). Surface area \(S = xy + 2xz + 2yz\).
- Eliminate \(z = \dfrac{32}{xy}\): \(S = xy + \dfrac{64}{y} + \dfrac{64}{x}\).
- \(S_x = y - \dfrac{64}{x^2} = 0\) and \(S_y = x - \dfrac{64}{y^2} = 0\). These give \(x = y = 4\).
- \(r = \dfrac{128}{x^3} = 2\), \(s = 1\), \(t = \dfrac{128}{y^3} = 2\), so \(rt - s^2 = 3 > 0\) and \(r > 0\): a minimum. Then \(z = \dfrac{32}{16} = 2\).
AnswerBase 4 cm × 4 cm, height 2 cm (least area 48 cm²).
Solving \(f_x = 0\), \(f_y = 0\) is where marks are lost. Factorise instead of dividing: \(y(a - 2x - y) = 0\) means \(y = 0\) or \(a - 2x - y = 0\). Dividing by \(y\) silently throws away stationary points.
Common mistakes
1. Missing stationary points
Dividing an equation by a variable loses the solutions where that variable is 0. Factorise and consider every case.
2. Calling every stationary point a maximum or minimum
A saddle point has \(f_x = f_y = 0\) too. Always compute \(rt - s^2\).
3. Using the sign of \(t\) instead of \(r\)
The test uses \(r = f_{xx}\). (When \(rt - s^2 > 0\), \(r\) and \(t\) have the same sign anyway, but write \(r\).)
4. Concluding something when \(rt - s^2 = 0\)
The test says nothing then. Investigate along particular paths, as in Example 4.
How it's asked in exams
- Find and classify all stationary points of a given function, and the extreme values.
- Word problems: boxes, tanks and sums of numbers. When there is a condition linking the variables, Lagrange's method is often the neater alternative.
- Show a point is a saddle point, or examine a case where \(rt - s^2 = 0\).
Practice questions
Try each one on paper before you open the answer.
Q1Find the extreme value of \(f = x^2 + xy + y^2 + 3x - 3y + 4\).
\(2x + y + 3 = 0\) and \(x + 2y - 3 = 0\) give \((-3, 3)\). \(r = 2\), \(s = 1\), \(t = 2\): \(rt - s^2 = 3 > 0\), \(r > 0\). Minimum value \(f(-3, 3) = -5\).
Q2Find the extreme value of \(f = 2x^2 + 3y^2 - 4x - 12y + 1\).
Stationary point \((1, 2)\); \(r = 4\), \(s = 0\), \(t = 6\): a minimum. \(f(1, 2) = 2 + 12 - 4 - 24 + 1 = -13\).
Q3Find and classify the stationary points of \(f = x^3 + 3xy^2 - 15x^2 - 15y^2 + 72x\).
\(f_y = 6y(x - 5) = 0\) and \(f_x = 3(x^2 + y^2 - 10x + 24) = 0\). Points: \((4, 0)\), \((6, 0)\), \((5, \pm 1)\).
\(r = t = 6x - 30\), \(s = 6y\). \((4, 0)\): maximum, \(f = 112\). \((6, 0)\): minimum, \(f = 108\). \((5, \pm 1)\): \(rt - s^2 = -36 < 0\), saddle points.
Q4Find the maximum of \(f = \sin x + \sin y + \sin(x + y)\) for \(0 < x, y < \pi\).
\(\cos x + \cos(x + y) = 0\) and \(\cos y + \cos(x + y) = 0\) give \(x = y\), then \(2\cos^2 x + \cos x - 1 = 0\), so \(x = y = \dfrac{\pi}{3}\).
\(r = t = -\sqrt 3\), \(s = -\dfrac{\sqrt 3}{2}\): \(rt - s^2 = \tfrac{9}{4} > 0\), \(r < 0\). Maximum value \(\dfrac{3\sqrt 3}{2}\).
Q5Divide 24 into three parts whose product is as large as possible.
Let the parts be \(x\), \(y\), \(24 - x - y\), and maximise \(f = xy(24 - x - y)\). By Example 3 with \(a = 24\), \(x = y = 8\).
The parts are 8, 8, 8, with product 512.
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
What is a stationary point of a function of two variables?
A point where both partial derivatives are zero, \(f_x = f_y = 0\). The surface is flat there in every direction.
What is a saddle point?
A stationary point that is a maximum along one direction and a minimum along another, like the centre of a horse's saddle. It is neither a maximum nor a minimum.
What do r, s and t stand for?
The second-order partial derivatives: \(r = f_{xx}\), \(s = f_{xy}\), \(t = f_{yy}\).
What if rt − s² = 0?
The test is inconclusive. You have to examine the function directly near the point, for example along different paths.