Local extreme points
A surface can have a peak, a pit, or a pass where the ground is flat. All three are critical points. What tells them apart?
The three maps are the three things a critical point can be. Lecture 7 defined local maximum points and local minimum points on the line; in the plane "near" means "within some distance", and the definition has to say so.
So a local maximum beats its immediate neighbours, and a global maximum beats every point of $S.$ Every global extreme point is a local one; the converse fails. The number $r$ is the whole content of the word local: it says how near "near" is, and it may be as small as we like, as long as it is positive. A point that is a strict local maximum beats every other point within that distance.
An interior local extreme point of a differentiable $f$ is a critical point: $f'_{1}=f'_{2}=0$ there.
The proof of Fact 10.1 in Lecture 10 used only the behaviour of $f$ near the point, so it proves this too. Consequently the critical points of $f$ split into exactly three classes — local maxima, local minima, and saddle points — and the problem is to tell which is which.
A saddle point by the definition
This example is the app's. Show that the origin is a critical point of $f(x,y)=xy,$ and that it is a saddle point.
Try it yourself first. Then open one step at a time.
Critical. $f'_{1}=y$ and $f'_{2}=x,$ and both vanish at $(0,0).$ It is the only critical point.
Larger nearby. On the line $y=x$ we have $f(x,x)=x^{2}>0$ for $x\ne0.$ So every disc around the origin, however small, contains points where $f$ is larger than $f(0,0)=0.$
Smaller nearby. On the line $y=-x$ we have $f(x,-x)=-x^{2}<0$ for $x\ne0.$ So every disc around the origin also contains points where $f$ is smaller.
Conclusion. That is exactly Definition 11.2: the origin is a saddle point. Note that along the two axes $f$ is $0$ throughout, so the axes alone would have told us nothing; the two diagonals did.
$(0,0)$ is the only critical point, and it is a saddle point: $f>0$ on the diagonal $y=x$ and $f<0$ on $y=-x,$ arbitrarily close to it.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
$f$ is differentiable and has a local maximum at an interior point $P$ of its domain.
Which of the following must be true at $P$?
- Why is that answer tempting? Concavity is sufficient for a critical point to be a maximum, not necessary for a maximum to occur. A bumpy function can have a perfectly good local maximum.
- Why is that answer tempting? The weak inequality f″₁₁ ≤ 0 is necessary; the strict one is not. Take −x⁴ − y⁴, which has a local maximum at the origin with f″₁₁ = 0.
- Why is that answer tempting? Local is not global — the point of the definition's radius r. A range of hills has one local maximum per summit and one global maximum in total.
Hold $y$ fixed at $y_0{:}$ then $x \mapsto f(x,y_0)$ has an ordinary one-variable local maximum at an interior point, so its derivative — which is $f_1'$ — vanishes. Same for $y.$
That argument used only what happens near $P,$ so it works for local extrema exactly as it did for global ones in Lecture 10 (Fact 11.3).
The second-derivative test
At a critical point $f''_{11}=-4,$ $f''_{12}=3$ and $f''_{22}=-4.$ Maximum, minimum or saddle — and which of the three numbers decides?
Throughout, $(x_{0},y_{0})$ is an interior critical point of a $C^{2}$ function $f,$ and $$ \begin{aligned} A &= f''_{11}(x_{0},y_{0})\,,\\ B &= f''_{12}(x_{0},y_{0})\,,\\ C &= f''_{22}(x_{0},y_{0})\,. \end{aligned} $$ ($C^{2}$ means that $f$ has second-order partial derivatives and that they are continuous; $A$ and $C$ are the two direct second derivatives, $B$ the cross one.)
With $A,B,C$ as above:
- if $A<0$ and $AC-B^{2}>0$, then $(x_{0},y_{0})$ is a strict local maximum point;
- if $A>0$ and $AC-B^{2}>0$, then $(x_{0},y_{0})$ is a strict local minimum point;
- if $AC-B^{2}<0$, then $(x_{0},y_{0})$ is a saddle point;
- if $AC-B^{2}=0$, the test gives no information.
Walk away in one direction. Fix a direction $(h,k)\ne(0,0)$ and walk along the straight line through $(x_{0},y_{0})$ in that direction, that is, put $g(t)=f(x_{0}+th,\,y_{0}+tk).$ Two applications of the chain rule give $$ g''(0) = Ah^{2} + 2Bhk + Ck^{2}\,. $$
Negative in every direction. Since $g'(0)=0$ at a critical point, $g$ has a strict local maximum at $t=0$ as soon as $g''(0)<0.$ So $(x_{0},y_{0})$ is a strict local maximum point provided $Ah^{2}+2Bhk+Ck^{2}<0$ for every direction $(h,k),$ and completing the square, $$ \begin{aligned} &Ah^{2}+2Bhk+Ck^{2}\\ &= A\Bigl(h+\tfrac{B}{A}k\Bigr)^{2} + \frac{AC-B^{2}}{A}\,k^{2}\,, \end{aligned} $$ which is negative for all $(h,k)\neq (0,0)$ exactly when $A<0$ and $AC-B^{2}>0.$
Both signs. If instead $AC-B^{2}<0,$ the same expression takes both signs, which is Definition 11.2.
Note that $AC-B^{2}>0$ forces $AC>B^{2}\ge0,$ so $A$ and $C$ have the same sign. Testing the sign of $C$ instead of $A$ in (a) and (b) would do just as well. (The cases (a)–(d) are the four lines of the Fact.) What you may not do is look at $A$ and $C$ and skip $B{:}$ the cross derivative is how all the directions other than the two axes get into the test.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
At a critical point, $$f_{11}'' = -4, \qquad f_{12}'' = 3, \qquad f_{22}'' = -4$$
What is the point?
- Why is that answer tempting? Right about AC − B² but wrong about the sign of A. With A = −4 the surface curves downwards along the x-axis, so if it is anything it is a maximum.
- Why is that answer tempting? This is the verdict when AC − B² < 0. Here 16 − 9 = 7 > 0, so the twist is not large enough to open a valley in any direction.
- Why is that answer tempting? Reserved for AC − B² = 0 exactly. A positive value is a verdict, not a near-miss.
$$ \begin{aligned} AC - B^2 &= (-4)(-4) - 3^2\\ &= 16 - 9 = 7 > 0 \end{aligned} $$ and $A = -4 < 0,$ so the point is a strict local maximum.
Compare Example 10.7 of Lecture 10, $3xy - x^2 - y^2,$ where $A = C = -2$ and $B = 3$ gave $4 - 9 = -5 < 0$ — a saddle. Same $B,$ and the direct second derivatives only had to be a little smaller for the answer to flip.
Guess first. The test has a fourth case. Before you read the Watch out below, decide what $A=B=C=0$ tells you.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
At a critical point it turns out that $$A = B = C = 0$$
What can you conclude about the point?
- Why is that answer tempting? One of the three possibilities, chosen without evidence. The data are equally consistent with a minimum and with a saddle.
- Why is that answer tempting? Reads ‘the test failed’ as ‘the answer is the awkward one’. A vanishing quadratic form rules nothing in and nothing out.
- Why is that answer tempting? Still a verdict, and still unsupported. The test returning nothing is not evidence that the point is not an extremum.
All three functions have $A = B = C = 0$ at the origin, so $AC - B^2 = 0$ for each. And the origin is:
- a maximum for $-x^4-y^4$, which is negative everywhere else;
- a minimum for $x^4+y^4$, which is positive everywhere else;
- a saddle for $x^3+y^3$, which is positive along the positive diagonal and negative along the negative one.
Same numbers, three different answers. So the numbers cannot possibly determine the answer, and when the test is silent you must look at $f$.
Looking at $f$ itself settles each one in a line: $-x^{4}-y^{4}<0$ away from the origin, $x^{4}+y^{4}>0$ away from it, and $x^{3}+y^{3}$ is $2x^{3}$ on the diagonal $y=x,$ which is positive for $x>0$ and negative for $x<0.$
Two critical points, two verdicts
Classify the critical points of $f(x,y)=x^{3}-x^{2}-y^{2}+8$.
Try it yourself first. Then open one step at a time.
The first-order conditions are $f'_{1}=3x^{2}-2x=x(3x-2)=0$ and $f'_{2}=-2y=0,$ so the critical points are $(0,0)$ and $(2/3,\,0).$
Since $f''_{11}=6x-2,$ $f''_{12}=0$ and $f''_{22}=-2{:}$
$(0,0)$ $(2/3,0)$ $A$ $-2$ $2$ $B$ $0$ $0$ $C$ $-2$ $-2$ $AC-B^{2}$ $4$ $-4$ Verdict: $(0,0)$ is a local maximum, $(2/3,0)$ a saddle point.
$(0,0)$ is a strict local maximum point, with $f(0,0)=8;$ $(2/3,0)$ is a saddle point.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
At a critical point of a $C^{2}$ function, $$f''_{11}=-2,\qquad f''_{12}=3,\qquad f''_{22}=-3.$$ What is the point?
- Why is that answer tempting? Reads $A$ and $C$ and skips $B.$ Both direct second derivatives are negative, so the surface curves down along both axes; but the cross derivative is large enough to open a valley in another direction. That is Lecture 10's trap: two directions are not enough.
- Why is that answer tempting? A minimum needs $AC-B^{2}>0$ and $A>0.$ Neither holds here.
- Why is that answer tempting? That is the case $AC-B^{2}=0$ only. Here $AC-B^{2}=-3,$ which is a verdict.
$$ \begin{aligned} AC-B^{2}&=(-2)(-3)-3^{2}\\ &=6-9=-3<0\,, \end{aligned} $$ so by case (c) of Fact 11.4 the point is a saddle point, whatever the signs of $A$ and $C.$
Is a local maximum concave nearby?
Concavity on the whole domain certified a global maximum in Lecture 10. Must a local maximum at least be concave on some small disc around it?
Is a local maximum at least concave nearby? Lecture 10 used concavity on the whole domain to certify a global maximum. It is tempting to believe the local version of the converse: that at a local maximum point, $f$ must at least be concave on some small disc around the point. Half of this is true. If $f$ is $C^{2}$ and case (a) of Fact 11.4 holds, then $f''_{11}<0$ and $f''_{11}f''_{22}-(f''_{12})^{2}>0$ at the point; these functions are continuous, so the strict inequalities survive on a small disc around it, where they also force $f''_{22}<0.$ By Fact 10.11, $f$ is concave on that disc. The other half is false: when the test is silent, a local maximum can come without any concavity at all, however small the disc.
A local maximum with no concavity near it
Let $f(x,y) = -x^{2}y^{2} - x^{6} - y^{6}$ and $P=(0,0).$ We show that (i) $P$ is a strict local maximum point, but (ii) $f$ is not concave on any disc around $P,$ no matter how small.
Try it yourself first. Then open one step at a time.
Step 1: $P$ is a maximum point. Each of $x^{2}y^{2},$ $x^{6}$ and $y^{6}$ is $\ge0,$ so each of the three terms of $f$ is $\le0,$ and therefore $$ \begin{aligned} &f(x,y)\le 0 = f(0,0)\\ &\text{for every }(x,y)\,. \end{aligned} $$ Equality forces $x^{6}=0$ and $y^{6}=0,$ that is $(x,y)=(0,0).$ So $P$ is a strict maximum point — global, hence certainly local. As Fact 11.3 says it must be, $P$ is critical: $f'_{1}=-2xy^{2}-6x^{5}$ and $f'_{2}=-2x^{2}y-6y^{5}$ both vanish at $(0,0).$
Step 2: a chord that lies above the graph. Fix a number $t>0$ and look at the two points $Q_{1}=(2t,0)$ and $Q_{2}=(0,2t).$ Their midpoint is $M=(t,t).$ Compute $$ \begin{aligned} f(Q_{1}) &= -(2t)^{6} = -64t^{6}\,,\\ f(Q_{2}) &= -(2t)^{6} = -64t^{6}\,, \end{aligned} $$ and $$ \begin{aligned} f(M) &= -t^{2}\cdot t^{2} - t^{6} - t^{6}\\ &= -t^{4}-2t^{6}\,. \end{aligned} $$
Concavity (Definition 10.10 with $\lambda=\tfrac12$) would require the graph at the midpoint to be at least the average of the two end values: $$ \begin{aligned} &f(M)\ \ge\ \tfrac12 f(Q_{1})+\tfrac12 f(Q_{2}),\\ &\text{that is}\quad -t^{4}-2t^{6}\ \ge\ -64t^{6}\,. \end{aligned} $$ Add $64t^{6}$ to both sides and divide by $t^{4}>0{:}$ the requirement becomes $62t^{2}\ge1.$ For small $t$ this is false. For example $t=\tfrac1{20}$ gives $$ \begin{aligned} f(Q_{1})=f(Q_{2})&=-0.000001\,,\\ f(M)&\approx-0.0000063\,, \end{aligned} $$ so the graph above the midpoint is more than six times lower than at both ends: the chord lies above the graph. In general the inequality fails for every $t$ with $0<t<\tfrac18,$ because then $62t^{2}<\tfrac{62}{64}<1.$
Step 3: this happens in every disc. Take any disc around $P,$ of radius $r>0.$ Choose $t$ with $0<t<\tfrac18$ and $2t<r.$ Then $Q_{1},$ $Q_{2}$ and $M$ all lie in the disc (their distances from $P$ are $2t,$ $2t$ and $\sqrt2\,t$), and by Step 2 the concavity inequality fails for them. So $f$ is not concave on that disc. Since $r$ was arbitrary, $f$ is not concave on any disc around $P.$
Check with second derivatives. The same conclusion follows from Fact 10.11. Here $$ \begin{aligned} f''_{11}&=-2y^{2}-30x^{4}\,,\\ f''_{22}&=-2x^{2}-30y^{4}\,,\\ f''_{12}&=-4xy\,, \end{aligned} $$ and at $M=(t,t)$ $$ \begin{aligned} &f''_{11}f''_{22}-(f''_{12})^{2}\\ &= (2t^{2}+30t^{4})^{2} - 16t^{4}\\ &= t^{4}\bigl(-12+120t^{2}+900t^{4}\bigr)\,, \end{aligned} $$ which is negative for $0<t\le\tfrac1{10}$ (the bracket is at most $-12+1.2+0.09<0$). The third condition of (10.2) fails at points arbitrarily close to $P.$ At $P$ itself $A=B=C=0{:}$ this is case (d), where Fact 11.4 says nothing.
$P=(0,0)$ is a strict (even global) maximum point of $f,$ yet on every disc around $P$ there is a chord, from $Q_{1}=(2t,0)$ to $Q_{2}=(0,2t)$ with $0<t<\tfrac18,$ that lies above the graph. So $f$ is concave on no disc around $P.$
The notes draw a picture here, with $t=\tfrac1{20};$ the app gives it in numbers. Close to the origin the term $-x^{2}y^{2}$ is much larger in size than $-x^{6}$ and $-y^{6},$ except near the axes, where it vanishes. So the surface stays almost flat above the axes but drops quickly above the diagonals. The set of points where $f\ge f(Q_{1}),$ that is, where the surface is at least as high as at $Q_{1}$ and $Q_{2},$ is a cross, not a disc: it reaches more than twice as far along the axes as along the diagonals. The segment $Q_{1}Q_{2}$ starts and ends inside it but leaves it in between, and its midpoint $M$ lies well outside. For a concave function this could never happen: the chord condition of Definition 10.10 says that a segment with both ends at height $\ge c$ stays at height $\ge c$ throughout.
The numbers behind the picture (the app's). The cross reaches the distance $0.1$ along each axis, since $f(x,0)=-x^{6}$ equals $f(Q_{1})=-10^{-6}$ at $x=0.1,$ but only about $0.045$ along each diagonal, where $f(u,u)=-u^{4}-2u^{6}$ equals $-10^{-6}$ at $u\approx0.0316.$ Along the segment from $Q_{1}=(0.1,0)$ to $Q_{2}=(0,0.1),$ in millionths:
| on the segment | $f$ | chord |
|---|---|---|
| at $Q_{1}$ | $-1.00$ | $-1.00$ |
| a quarter of the way | $-3.69$ | $-1.00$ |
| at $M$ | $-6.28$ | $-1.00$ |
| three quarters | $-3.69$ | $-1.00$ |
| at $Q_{2}$ | $-1.00$ | $-1.00$ |
Plotted along the segment, $f$ sags below the chord, which is the one-variable picture of “not concave” from Lecture 6. The lesson is the logical one from Lecture 10: concavity is sufficient for a critical point to be a maximum, but it is not necessary — not even locally.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
What does the example A local maximum with no concavity near it show?
- Why is that answer tempting? That is the half that is false. It holds when case (a) of Fact 11.4 holds at the point, but here $A=B=C=0$ and no disc, however small, works.
- Why is that answer tempting? Step 1 shows $f(x,y)\le0=f(0,0)$ for every $(x,y),$ with equality only at the origin: a strict maximum, global even. Concavity is one way to certify a maximum, not the definition of one.
- Why is that answer tempting? At the origin $A=B=C=0,$ so $AC-B^{2}=0$ and the test says nothing at all (case (d)). It reports no verdict, and in particular not a saddle.
The origin is a strict maximum point, yet every disc around it contains a chord that lies above the graph. So "concave near the point" is not a necessary condition for a local maximum. It is sufficient (Lecture 10), and when case (a) of the test holds it comes for free; when the test is silent, a maximum can do without it.
Existence: the extreme value theorem
$f(x,y)=x^{2}+y^{2}+y-1$ has one critical point inside the unit disc. Is that where its maximum on the disc is?
Global questions in two variables need what Lecture 6 needed in one: a reason why a maximum exists at all, and a list of the places it can be. On an interval the reason was the closed, bounded interval of Fact 6.9; in the plane the interval becomes a set of the following kind.
If $g$ is continuous, the sets $\{g\ge c\},$ $\{g\le c\}$ and $\{g= c\}$ are closed, while $\{g>c\},$ $\{g<c\}$ and $\{g\ne c\}$ are open. So a set cut out by weak inequalities is closed; whether it is also bounded must be checked separately. The closed unit disc $x^{2}+y^{2}\le1$ is compact; the open disc $x^{2}+y^{2}<1$ is bounded but not closed; the half-plane $x\ge0$ is closed but not bounded.
If $f$ is continuous on a nonempty compact set $S\subseteq{\mathbb R}^{2}$, then there exist points $(a,b)$ and $(c,d)$ in $S$ with $$ \begin{aligned} &f(a,b)\le f(x,y)\le f(c,d)\\ &\qquad\text{for all }(x,y)\in S\,. \end{aligned} $$
This is Fact 6.9 of Lecture 6 word for word, with an interval replaced by a compact set in the plane.
When a piece of the boundary is a segment, step (2) is the one-variable problem of Lecture 10's substitution method: write the segment with one variable, find the critical points of the resulting function inside the interval, and do not forget the two endpoints (Method 6.15).
Guess first. Answer the question below before you read the worked example; it is the same problem.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
$f(x,y) = x^2 + y^2 + y - 1$ on the closed unit disc $x^2 + y^2 \le 1$.
Its only critical point is $(0,-\tfrac{1}{2})$, where $f = -\tfrac{5}{4}$.
Where does $f$ attain its maximum?
- Why is that answer tempting? That is where the boundary minimum is. On the boundary f = y, so y = −1 gives the smallest value there, not the largest.
- Why is that answer tempting? Assumes the maximum has to be a critical point. On a compact set it need not be, and here it is not: −5/4 is in fact the smallest value on the whole disc.
- Why is that answer tempting? The extreme value theorem forbids this: f is continuous and the closed disc is compact, so a maximum exists whether or not it is easy to find.
On the boundary $x^2+y^2=1,$ substitute: $f = 1 + y - 1 = y$ with $y \in [-1,1].$ So the boundary values run from $-1$ to $1.$
The three candidates are therefore $$ \begin{aligned} f(0,-\tfrac{1}{2}) &= -\tfrac{5}{4}\,,\\ f(0,1) &= 1\,,\\ f(0,-1) &= -1\,. \end{aligned} $$ The maximum is $1$ at $(0,1)$ — on the boundary and not a critical point. The minimum is $-\tfrac{5}{4},$ at the critical point.
The maximum is on the boundary
Find the extreme values of $f(x,y)=x^{2}+y^{2}+y-1$ on $S=\{(x,y):x^{2}+y^{2}\le1\}.$
Try it yourself first. Then open one step at a time.
$S$ is compact and $f$ is continuous, so by Fact 11.9 both extreme values are attained.
Interior. $f'_{1}=2x=0$ and $f'_{2}=2y+1=0$ give the single critical point $(0,-\tfrac12),$ which lies in the interior, with $f(0,-\tfrac12)=-\tfrac54.$
Boundary. On $x^{2}+y^{2}=1$ we may substitute, obtaining $$ \begin{aligned} f &= 1 + y - 1 = y\,,\\ y&\in[-1,1]\,, \end{aligned} $$ which is largest at $y=1,$ that is at $(0,1),$ and smallest at $y=-1,$ at $(0,-1).$
Compare. $f(0,-\tfrac12)=-\tfrac54,$ $f(0,1)=1,$ $f(0,-1)=-1.$ The maximum value is $1,$ attained at $(0,1),$ and the minimum value is $-\tfrac54,$ attained at $(0,-\tfrac12).$
Maximum $1$ at $(0,1),$ on the boundary; minimum $-\tfrac54$ at the critical point $(0,-\tfrac12).$
Note that the maximum sits on the boundary and is not a critical point of $f.$ Solving $f'_{1}=f'_{2}=0$ alone would have missed it entirely.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Which of these sets is compact?
- Why is that answer tempting? Bounded, but not closed: the strict inequality leaves out the boundary circle $x^{2}+y^{2}=4.$ On it, $f(x,y)=x$ has no maximum: it gets as close to $2$ as we like and never reaches it.
- Why is that answer tempting? Closed (an equality between continuous functions), but not bounded: the line goes on for ever in both directions. A segment of it, with $x\ge0$ and $y\ge0$ added, would be compact.
- Why is that answer tempting? Closed, since both inequalities are weak, but not bounded: the quarter-plane fits in no disc. Weak inequalities give closed; bounded must be checked separately.
The triangle with corners $(0,0),$ $(4,0)$ and $(0,4)$ is cut out by three weak inequalities, so it is closed, and it lies in the disc of radius $4$ around the origin, so it is bounded. By Definition 11.8 it is compact, and Fact 11.9 applies on it. The other three each fail one of the two conditions.
The Lagrange multiplier method
Maximise $x+y$ on the circle $x^{2}+y^{2}=50.$ Substituting needs a square root and two cases. Is there a way that does not?
We now treat problems of the form $$ \begin{aligned} &\max\;(\min)\quad f(x,y)\\ &\text{subject to}\qquad g(x,y)=c\,, \end{aligned} \tag{11.1} $$ where $f$ is the objective and $g(x,y)=c$ the constraint. If the constraint can be solved for one variable, substitution reduces (11.1) to a one-variable problem, as in Method 10.19. When it cannot — or when there are several constraints — the following method applies.
Since $g(x,y)-c=0$ on the constraint set, $\mathcal{L}$ and $f$ agree there, whatever $\lambda$ is. ($\lambda$ is the Greek letter lambda, and $\mathcal{L}$ is a script L.)
A note on signs (the app's). Some write the Lagrangian as $f+\lambda[g-c]$ instead. Then every $\lambda$ comes out with the opposite sign, and the candidate points $(x,y)$ are exactly the same. With the minus sign of Definition 11.13 a constraint that is worth relaxing gets a positive multiplier, which is what the last section of this lecture needs.
The conditions are identical for maximisation and minimisation, which is why (11.1) is written for both at once. A useful device: solve the first two equations for $\lambda$ and equate, which eliminates $\lambda$ immediately.
Why should the conditions say anything? Slide a point along the constraint. If the arrow of steepest increase of $f$ had any component along the constraint, a small step that way would improve $f.$ So at the optimum that arrow points straight across the constraint, the same way as the arrow for $g{:}$ the two are parallel, and that is what $f'_{1}=\lambda g'_{1},$ $f'_{2}=\lambda g'_{2}$ says.
The product on a line
Solve $\max xy$ subject to $2x+y=100.$
Try it yourself first. Then open one step at a time.
With $\mathcal{L}=xy-\lambda(2x+y-100)$ the first-order conditions are $$ \begin{aligned} y-2\lambda&=0\,,\\ x-\lambda&=0\,,\\ 2x+y&=100\,. \end{aligned} $$ The first two give $y=2\lambda$ and $x=\lambda,$ hence $y=2x;$ the constraint then gives $4x=100,$ so $x=25,$ $y=50$ and $\lambda=25.$
That this candidate is the maximum follows by substitution: $y=100-2x$ turns the problem into maximising $h(x)=x(100-2x)=-2x^{2}+100x,$ and $h''=-4<0,$ so the critical point $x=25$ is a maximum.
The maximum is at $(x,y)=(25,50),$ with $xy=1250$ and $\lambda=25.$
Slide along the constraint
Left, the level curves of $f$ and the constraint (pink), with the point you move and two arrows: green for $f,$ pink for $g.$ Right, the value of $f$ along the constraint.
- Drag the slider along the constraint. Watch the value graph and the two arrows at once: the graph peaks exactly when the arrows line up.
- Away from the best point the read-out shows two different ratios $f'_{1}/g'_{1}$ and $f'_{2}/g'_{2}.$ Press Go to the best point: they agree, and their common value is $\lambda=25,$ the multiplier of Example 11.16.
- Press the button with the problem's name to switch to $\max x+y$ on the circle $x^{2}+y^{2}=50.$ Find the best point and read off $\lambda.$ Check it by hand: $1=2\lambda x$ and $1=2\lambda y$ give $x=y=5$ and $\lambda=\tfrac1{10}.$
Recap The consumer's words
| word | what it is |
|---|---|
| utility $u(x,y)$ | how much the consumer likes the bundle of $x$ units of one good and $y$ of another |
| indifference curve | a level curve of $u{:}$ bundles the consumer likes equally (Lecture 9) |
| budget line | $px+qy=m{:}$ the bundles that cost exactly the income $m$ at prices $p,$ $q$ (Lecture 1) |
| demand | the quantities $x,$ $y$ that solve the problem, as functions of $p,$ $q,$ $m$ |
| marginal utility of income | the extra utility from one more unit of income: the $\lambda$ of the budget constraint (last section) |
Cobb–Douglas demand
Solve $\max Ax^{a}y^{b}$ subject to $px+qy=m,$ all constants positive.
Try it yourself first. Then open one step at a time.
The first-order conditions are $$ \begin{aligned} aAx^{a-1}y^{b}&=\lambda p\,,\\ bAx^{a}y^{b-1}&=\lambda q\,,\\ px+qy&=m\,. \end{aligned} $$
Dividing the first by the second removes $A$ and $\lambda$ and leaves $\dfrac{ay}{bx}=\dfrac{p}{q},$ that is $qy=\dfrac{b}{a}px.$ Substituting into the constraint gives $px\bigl(1+\tfrac{b}{a}\bigr)=m,$ and hence $$ \begin{aligned} x &= \frac{a}{a+b}\cdot\frac{m}{p}\,,\\ y &= \frac{b}{a+b}\cdot\frac{m}{q}\,. \end{aligned} $$
So the consumer spends the fixed fraction $a/(a+b)$ of income on the first good and $b/(a+b)$ on the second, whatever the prices are. Multiplying $p,$ $q$ and $m$ by the same factor leaves both demands unchanged.
$x=\dfrac{a}{a+b}\cdot\dfrac{m}{p}$ and $y=\dfrac{b}{a+b}\cdot\dfrac{m}{q}{:}$ the shares $a/(a+b)$ and $b/(a+b)$ of income go to the two goods.
Eliminating $\lambda$ in general has a reading worth recording.
At a solution of $\max u(x,y)$ subject to $px+qy=m$ with $u'_{y}\ne0$, $$ \frac{u'_{x}(x,y)}{u'_{y}(x,y)} = \frac{p}{q}\,. $$ Equivalently, the slope $-u'_{x}/u'_{y}$ of the level curve of $u$ equals the slope $-p/q$ of the budget line: at the optimum the budget line is tangent to an indifference curve.
This is the marginal rate of substitution of Lecture 9, Fact 9.15, set equal to the price ratio. It is the picture from that lecture — slide along the line and you can improve until the line only touches a level curve — turned into two equations.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Solve $\max xy$ subject to $x+4y=40$ with the Lagrange multiplier method. Where is the candidate?
- Why is that answer tempting? That solves the unconstrained first-order conditions, and $(0,0)$ is not even on the line: $0+0\ne40.$ With a constraint the partials of $f$ are not zero at the optimum; they are $\lambda$ times those of $g.$
- Why is that answer tempting? $(8,8)$ is on the line, but there $f'_{1}/f'_{2}=y/x=1,$ while $g'_{1}/g'_{2}=1/4.$ The arrows are not parallel, so moving along the line improves $xy{:}$ $8\cdot8=64<100=20\cdot5.$
- Why is that answer tempting? There $xy=0,$ the smallest value on the segment with $x,y\ge0.$ An endpoint is a candidate when the segment has ends, but it does not satisfy the Lagrange conditions here.
$\mathcal{L}=xy-\lambda(x+4y-40)$ gives $y=\lambda$ and $x=4\lambda,$ so $x=4y.$ The constraint then gives $8y=40,$ so $y=5,$ $x=20$ and $\lambda=5.$ The value is $xy=100.$ (It is the maximum: on the segment with $x,y\ge0$ the endpoints give $0.$)
Interpreting the multiplier
A firm's cheapest way to make $30$ units costs $500,$ and the method also hands it $\lambda=20.$ What does it cost to make $31?$
So far $\lambda$ has been a device: a third unknown, introduced to be eliminated. It is in fact the most useful number the method produces.
Guess first. The question below is the next example. Answer it before you read on.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A firm minimises cost subject to producing $30$ units. The Lagrange conditions give a minimum cost of $500$, with $\lambda = 20$.
It must now produce $31$ units. Approximately what is the new minimum cost?
- Why is that answer tempting? Assumes cost is proportional to output, which is exactly what a cost function is there to deny. It also makes λ irrelevant, and λ was computed for a reason.
- Why is that answer tempting? Treats the multiplier as scaffolding to be discarded once x and y are found. It is the one number in the answer a manager would actually ask for.
- Why is that answer tempting? Understandable caution, and wrong: λ exists precisely so that you do not have to. It is the derivative of the optimal value with respect to the constraint level.
$\lambda$ is the rate at which the optimal value changes as the constraint level $c$ is relaxed: $$\lambda \approx \frac{\text{change in optimal value}}{\text{change in } c}$$
One more unit of output therefore costs about $\lambda = 20$, giving $520$. Here it is exact: re-solving gives $520$ on the nose.
The units confirm it. $f$ is in dollars and $g$ in units of output, so $\lambda$ is in dollars per unit of output — a marginal cost. Nothing else in the problem has those units.
What $\lambda$ measures
Solve $\min K+20L$ subject to $\sqrt{K}+L=30.$
Try it yourself first. Then open one step at a time.
From $\mathcal{L}=K+20L-\lambda(\sqrt{K}+L-30)$ the first-order conditions are $1-\lambda/(2\sqrt{K})=0,$ $20-\lambda=0$ and $\sqrt{K}+L=30.$
The second gives $\lambda=20;$ the first then gives $\sqrt{K}=10,$ so $K=100,$ and the constraint gives $L=20.$ The minimum cost is $K+20L=500.$
Replacing $30$ by $31$ changes nothing except $L=21,$ with cost $520.$ The extra unit of output costs $20$ — which is exactly $\lambda.$
$K=100,$ $L=20,$ minimum cost $500,$ and $\lambda=20{:}$ the 31st unit of output costs exactly $20$ more.
That is not a coincidence. To say what it is, let the constraint level vary.
Under the assumptions of Definition 11.20, $$ \frac{df^{*}(c)}{dc} = \lambda(c)\,. $$ In particular, for a small change $dc$ in the constraint level, $$ f^{*}(c+dc) - f^{*}(c) \;\approx\; \lambda(c)\,dc\,. $$
Differentiate the value function. Take differentials in Definition 11.20: $$ df^{*} = f'_{1}\,dx^{*} + f'_{2}\,dy^{*}\,. $$
Use the first-order conditions. At the optimum the first-order conditions give $f'_{1}=\lambda g'_{1}$ and $f'_{2}=\lambda g'_{2},$ so $$ df^{*} = \lambda\bigl(g'_{1}\,dx^{*} + g'_{2}\,dy^{*}\bigr)\,. $$
Use the constraint. But $g\bigl(x^{*}(c),y^{*}(c)\bigr)=c$ holds identically in $c,$ and taking differentials of that gives $g'_{1}\,dx^{*}+g'_{2}\,dy^{*}=dc.$ Hence $df^{*}=\lambda\,dc.$
So $\lambda$ is a rate: the change in the optimal value per unit change in the constraint level. Its units are the units of $f$ divided by the units of $g,$ and that is usually enough to identify what it is. In Example 11.19, $f$ is a cost and $g$ an output, so $\lambda$ is cost per unit of output — a marginal cost, and indeed $\lambda=20$ was the cost of the thirty-first unit.
The value function of Example 11.16
Generalise Example 11.16: solve $\max xy$ subject to $2x+y=m.$
Try it yourself first. Then open one step at a time.
The first-order conditions again give $y=2x$ with $\lambda=x,$ and the constraint then gives $4x=m.$ So $$ \begin{aligned} x^{*}(m)&=\tfrac{1}{4}m\,,\\ y^{*}(m)&=\tfrac{1}{2}m\,,\\ \lambda(m)&=\tfrac{1}{4}m\,, \end{aligned} $$ and the value function is $f^{*}(m)=\tfrac{1}{4}m\cdot\tfrac{1}{2}m=\tfrac{1}{8}m^{2}.$ Differentiating, $df^{*}/dm = \tfrac{1}{4}m = \lambda(m),$ as Fact 11.21 claims.
At $m=100$ this is $\lambda=25,$ the value found in Example 11.16. So one extra unit of $m$ is worth about $25;$ exactly, $f^{*}(101)-f^{*}(100)=(101^{2}-100^{2})/8=25.125.$
$f^{*}(m)=\tfrac18m^{2}$ and $df^{*}/dm=\tfrac14m=\lambda(m);$ at $m=100$ the estimate $25$ against the exact change $25.125.$
In applications $c$ is typically the available stock of some resource and $f$ a profit or a utility. Then $\lambda$ is what one more unit of the resource is worth to the decision maker, and economists call it the shadow price of the resource: the price at which the firm would be indifferent between renting an extra unit and going without. It is frequently the number the client actually wants. On a consumer's budget constraint $\lambda$ is the marginal utility of income: about how much utility one more unit of money buys.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A consumer maximises utility subject to the budget $3x+2y=60$ and finds $\lambda=0.5$ at the optimum. Income rises from $60$ to $64.$ By approximately how much does the maximal utility change?
- Why is that answer tempting? $\lambda$ is the change per unit of income. Income rises by $4$ units, so the change is about $4$ times $\lambda.$
- Why is that answer tempting? Divides by $\lambda$ instead of multiplying: $4/0.5=8.$ The rate $\lambda$ has the units of utility per unit of income, so utility $=\lambda\cdot$ income change.
- Why is that answer tempting? That is what $\lambda$ is for: $df^{*}/dm=\lambda$ by Fact 11.21, so a small change $dm$ changes the optimum by about $\lambda\,dm$ without solving again.
By Fact 11.21, $$ \begin{aligned} f^{*}(64)-f^{*}(60)&\approx\lambda\cdot4\\ &=0.5\cdot4=2\,. \end{aligned} $$ Here $\lambda=0.5$ is the marginal utility of income. Four units of income is a small change compared with $60,$ so the estimate is reasonable (Watch out 11.23).
What you should take away
- A local maximum beats its immediate neighbours; a global one beats every point. Critical points come in exactly three kinds: local maximum, local minimum, and saddle point.
- With $A=f''_{11}$, $B=f''_{12}$, $C=f''_{22}$ at a critical point: $A<0$ and $AC-B^{2}>0$ give a strict local maximum; $A>0$ and $AC-B^{2}>0$ a strict local minimum; $AC-B^{2}<0$ a saddle point; and $AC-B^{2}=0$ gives no information at all.
- The test uses the candidate point only, and its verdict is local. Concavity on the whole domain is what gives a global verdict.
- Extreme value theorem: a continuous function on a nonempty compact (closed and bounded) set attains both a maximum and a minimum. It says they exist and not where they are.
- On a compact set: list the interior critical points, find the extremes on the boundary, and compare values. The maximum is frequently on the boundary, where $f'_{1}=f'_{2}=0$ need not hold.
- For $\max(\min) f$ subject to $g=c$, form $\mathcal{L}=f-\lambda[g-c]$ and solve $f'_{1}=\lambda g'_{1}$, $f'_{2}=\lambda g'_{2}$, $g=c$. These give candidates, the same ones for maximisation and minimisation.
- Eliminating $\lambda$ gives $u'_{x}/u'_{y}=p/q$: the marginal rate of substitution equals the price ratio, and the constraint line is tangent to a level curve at the optimum.
- Let $f^{*}(c)$ be the optimal value as a function of the constraint level. Then $df^{*}(c)/dc=\lambda(c)$, so $f^{*}(c+dc)-f^{*}(c)\approx\lambda\,dc$: $\lambda$ is the shadow price of the constraint, in units of $f$ per unit of $g$. It is not scaffolding to be discarded once $x$ and $y$ are found.
Think further
Questions without computation. Think on your own or with a classmate before opening the thought.
Discussion question 1 — how large the cross derivative may be
A critical point has $f''_{11}=-3$ and $f''_{22}=-3.$ For which values of $f''_{12}$ does the second-derivative test report a local maximum?
One way to think about it
For $-3<f''_{12}<3.$ With $A=C=-3$ and $B=f''_{12},$ $$AC-B^{2}=9-B^{2}\,,$$ which is positive exactly when $B^{2}<9,$ that is $|B|<3.$ Then $A<0$ gives a strict local maximum by case (a) of Fact 11.4. At $B=\pm3$ the test is silent, and for $|B|>3$ the point is a saddle. Only the size of the cross derivative matters, never its sign.
Discussion question 2 — a saddle inside, the extremes on the rim
Let $f(x,y)=x^{2}-y^{2}$ on $S=\{(x,y):x^{2}+y^{2}\le1\}.$ Where are the maximum and minimum values attained? Is either of them a critical point of $f$?
One way to think about it
By Method 11.11. Inside, $f'_{1}=2x$ and $f'_{2}=-2y$ vanish only at $(0,0),$ where $f=0;$ it is a saddle point. On the boundary $y^{2}=1-x^{2},$ so $f=x^{2}-(1-x^{2})=2x^{2}-1$ with $x\in[-1,1],$ which is largest, $1,$ at $x=\pm1$ and smallest, $-1,$ at $x=0.$
So the maximum $1$ is attained at $(1,0)$ and $(-1,0),$ and the minimum $-1$ at $(0,1)$ and $(0,-1).$ None of them is a critical point of $f{:}$ the only critical point is the saddle at the origin, with the value $0$ in between.
Discussion question 3 — when the constraint has no direction
In $\max f$ subject to $g=c,$ suppose $g'_{1}=g'_{2}=0$ at the optimum. What goes wrong with Recipe 11.14?
One way to think about it
At such a point the first two conditions read $f'_{1}=\lambda\cdot0$ and $f'_{2}=\lambda\cdot0,$ that is $f'_{1}=f'_{2}=0.$ But at a constrained optimum the partials of $f$ are generally not zero, so the three equations may have no solution there, and the method never lists the optimum as a candidate (Watch out 11.15).
An example (the app's): minimise $f=x$ subject to $g=y^{2}-x^{3}=0.$ On the curve $x^{3}=y^{2}\ge0,$ so $x\ge0,$ and the minimum is $0$ at $(0,0).$ There $g'_{1}=-3x^{2}=0$ and $g'_{2}=2y=0,$ and the first condition would say $1=\lambda\cdot0,$ which no $\lambda$ satisfies. The curve has a sharp point there instead of a direction.
Discussion question 4 — what λ = 7 buys
A firm solves $\max f$ subject to $g=c$ and finds $\lambda=7.$ Its budget $c$ rises by one unit. By roughly how much does the optimal value change?
(A) by $1;$
(B) by $7;$
(C) by $1/7;$
(D) impossible to say without solving again.
One way to think about it
(B). By Fact 11.21, $f^{*}(c+1)-f^{*}(c)\approx\lambda\cdot1=7.$ (A) ignores $\lambda;$ (C) turns the rate upside down; (D) is exactly what $\lambda$ saves you from. It is an approximation, because $\lambda$ is a derivative (Watch out 11.23): good when one unit is a small change in $c.$
Discussion question 5 — the largest wage worth paying
In that firm's problem $f$ is a profit in kronor and $g$ a quantity of labour in hours. What are the units of $\lambda,$ and what is the largest hourly wage at which the firm would want to hire an extra hour?
One way to think about it
$\lambda$ has the units of $f$ per unit of $g{:}$ kronor per hour. One more hour raises the optimal profit by about $\lambda=7$ kronor, so it is worth hiring at any wage below $7$ kronor an hour, and $7$ kronor is the largest wage at which the firm would still want it (it is then indifferent). That is the shadow price of an hour of labour.