1.2 Maxima, Minima, Saddle Points and Lagrange Multipliers
Critical points and the Hessian test in two and three variables, saddle points and the degenerate cases the test cannot decide, absolute extrema on closed bounded regions, and Lagrange multipliers with one and two constraints — with the bordered Hessian for constrained problems.
Optimisation is where the calculus of several variables earns its keep. An engineer minimises the material in a pressure vessel of given volume, an economist maximises output on a fixed budget, a statistician maximises a likelihood, a physicist finds the equilibrium of a system by minimising its energy. In one variable you set $f'(x)=0$ and look at the sign of $f''$. In several variables the first step survives unchanged — the gradient vanishes at an interior extremum — but the second step becomes a question about a matrix: the Hessian of second partial derivatives, whose eigenvalues say whether the graph bends up in every direction (a minimum), down in every direction (a maximum), or up in some and down in others (a saddle). And when the variables are tied by constraints, the gradient no longer vanishes; instead it lines up with the gradients of the constraints, and Lagrange's multipliers measure by how much.
In GATE MA this section is a steady source of marks. MCQs ask you to classify the critical points of a polynomial or to find a constrained maximum quickly; MSQs list statements about saddle points, degenerate Hessians, global versus local extrema and the hypotheses of Lagrange's theorem, and expect you to decide each one; NATs ask for the extreme value of a function on a region or on a surface, correct to two decimal places. The tools are those of §1.1 — gradients, the chain rule, the implicit function theorem — together with the definiteness tests for symmetric matrices that Chapter 3 develops fully.
Critical Points and Local Extrema
Throughout, $U\subseteq\mathbb{R}^n$ is open and $f:U\to\mathbb{R}$. We write $\nabla f$ for the gradient and $f_{xx},f_{xy},\dots$ for second partials, as in §1.1.
- $a\in U$ is a local minimum (local maximum) of $f$ if $f(x)\ge f(a)$ ($f(x)\le f(a)$) for all $x$ in some ball $B(a,r)$; it is strict if the inequality is strict for $x\ne a$. A local extremum is either.
- For $f$ defined on a set $K$, $a\in K$ is a global (absolute) minimum on $K$ if $f(x)\ge f(a)$ for all $x\in K$; similarly for a maximum.
- If $f$ is differentiable at $a$ and $\nabla f(a)=0$, $a$ is a critical (stationary) point. A critical point that is not a local extremum is a saddle point: every ball about it contains points where $f\gt f(a)$ and points where $f\lt f(a)$.
Proof. Fix a unit vector $u$ and let $\varphi(t)=f(a+tu)$, defined for small $|t|$. Then $\varphi$ has a local extremum at $t=0$. (a) $\varphi'(0)=\nabla f(a)\cdot u$ (Theorem 1.3) and $\varphi'(0)=0$ by the one-variable Fermat theorem; with $u=e_1,\dots,e_n$ this gives every partial derivative $0$. (b) By the chain rule twice, $\varphi''(0)=\sum_{i,j}u_iu_j\,\partial_i\partial_jf(a)=u^{\mathsf T}H_f(a)u$. At a local minimum with $\varphi'(0)=0$ we cannot have $\varphi''(0)\lt0$ (that would make $0$ a strict local maximum of $\varphi$). So $u^{\mathsf T}H_f(a)u\ge0$ for every unit $u$, hence for every $h$. ∎
Fermat's condition is only necessary: $x^3$ at $0$ and $x^2-y^2$ at the origin have critical points that are not extrema. Points where $f$ is not differentiable can also be extrema ($\sqrt{x^2+y^2}$ has its minimum at the cone point), and they must be added to any list of candidates.
The Hessian and the Second Derivative Test
For $f\in C^2(U)$ the Hessian matrix at $a$ is the symmetric $n\times n$ matrix $H_f(a)=\left[\dfrac{\partial^2f}{\partial x_i\partial x_j}(a)\right]$ (symmetric by Schwarz's theorem, §1.1); in two variables $H_f=\begin{pmatrix}f_{xx}&f_{xy}\\f_{xy}&f_{yy}\end{pmatrix}$, and we write $D=\det H_f=f_{xx}f_{yy}-f_{xy}^2$. A real symmetric matrix $H$ (or its quadratic form $h\mapsto h^{\mathsf T}Hh$) is
- positive definite if $h^{\mathsf T}Hh\gt0$ for all $h\ne0$, i.e. all eigenvalues are $\gt0$;
- negative definite if $h^{\mathsf T}Hh\lt0$ for all $h\ne0$, i.e. all eigenvalues are $\lt0$;
- indefinite if $h^{\mathsf T}Hh$ takes both signs, i.e. there are eigenvalues of both signs;
- positive (negative) semidefinite if $h^{\mathsf T}Hh\ge0$ ($\le0$) for all $h$, i.e. all eigenvalues are $\ge0$ ($\le0$).
Leading-minor test (Sylvester; proved in §3.3). With $\Delta_k$ the determinant of the top-left $k\times k$ block: $H$ is positive definite iff $\Delta_1,\Delta_2,\dots,\Delta_n$ are all $\gt0$, and negative definite iff they alternate $\Delta_1\lt0,\ \Delta_2\gt0,\ \Delta_3\lt0,\dots$. For $n=2$: positive definite iff $f_{xx}\gt0$ and $D\gt0$; negative definite iff $f_{xx}\lt0$ and $D\gt0$; indefinite iff $D\lt0$.
The $2\times2$ case is just completing the square. If $p\ne0$, then $ph^2+2qhk+sk^2=p\left(h+\tfrac qpk\right)^2+\tfrac{ps-q^2}{p}k^2$: when $p\gt0$ and $ps-q^2\gt0$ both terms are $\ge0$ and vanish together only at $h=k=0$; when $ps-q^2\lt0$ the two terms have opposite signs and the form is indefinite (if $p=0$ and $q\ne0$, the form $k(2qh+sk)$ is indefinite as well). The determinant is the product of the eigenvalues and the trace their sum, so in two variables $D\gt0$ means "eigenvalues of the same sign" and $D\lt0$ means "opposite signs".
Let $f\in C^2(U)$ and let $a$ be a critical point, $H=H_f(a)$.
- $H$ positive definite $\Rightarrow$ $a$ is a strict local minimum.
- $H$ negative definite $\Rightarrow$ $a$ is a strict local maximum.
- $H$ indefinite $\Rightarrow$ $a$ is a saddle point.
- $H$ semidefinite and singular ($\det H=0$) $\Rightarrow$ no conclusion.
Two variables: $D\gt0,\ f_{xx}\gt0$: strict local minimum; $D\gt0,\ f_{xx}\lt0$: strict local maximum; $D\lt0$: saddle; $D=0$: test fails. Three variables: with $\Delta_1=f_{xx}$, $\Delta_2=f_{xx}f_{yy}-f_{xy}^2$, $\Delta_3=\det H$: all three $\gt0$: minimum; signs $-,+,-$: maximum; $\Delta_3\ne0$ with any other sign pattern: saddle; $\Delta_3=0$: no conclusion from the test.
Proof. (1) The continuous function $u\mapsto u^{\mathsf T}Hu$ is positive on the compact unit sphere, so it has a positive minimum $m$ there (in fact $m$ is the least eigenvalue of $H$); thus $h^{\mathsf T}Hh\ge m\|h\|^2$ for all $h$. By Taylor's theorem with the Lagrange remainder applied to $\varphi(t)=f(a+th)$ on $[0,1]$ — using $\varphi'(0)=\nabla f(a)\cdot h=0$ — we get $f(a+h)=f(a)+\tfrac12h^{\mathsf T}H_f(c)h$ for some $c$ on the segment from $a$ to $a+h$. Since the second partials are continuous, for $\|h\|$ small every entry of $H_f(c)-H$ is small, so $|h^{\mathsf T}(H_f(c)-H)h|\le\tfrac m2\|h\|^2$. Hence
$$f(a+h)-f(a)\ge\tfrac12\left(m-\tfrac m2\right)\|h\|^2\gt0$$for every small $h\ne0$.
(2) Apply (1) to $-f$. (3) Take eigenvectors $u,w$ of $H$ with eigenvalues $\lambda\gt0\gt\mu$. Along the line $t\mapsto a+tu$ the one-variable function has second derivative $\lambda\gt0$ at $0$, so it has a strict local minimum there; along $a+tw$ it has a strict local maximum. So every ball about $a$ contains points above and below $f(a)$. (4) is shown by the examples in Example 3. The two- and three-variable forms are Definition 1.8's minor tests (for three variables, if $\Delta_3\ne0$ and the pattern is neither $+,+,+$ nor $-,+,-$, the matrix is nonsingular and not definite, hence indefinite). ∎
When $\det H=0$ the quadratic part of $f$ vanishes in some direction (an eigenvector for the eigenvalue $0$), and the nature of the critical point is decided by the higher-order terms in that direction — and sometimes not even by them, but by curves (Example 3(c) and the pitfalls box).
- Solve $\nabla f=0$. Factorise; use sums and differences (as in Example 1); never divide by an expression that might be $0$ without treating that case separately.
- Write the Hessian once, in general; then substitute each critical point.
- Two variables: compute $D$ first. $D\lt0$: saddle, done. $D\gt0$: the sign of $f_{xx}$ (or of $f_{yy}$ — they agree) decides. Three variables: leading minors; or eigenvalues if the matrix is block-diagonal.
- $D=0$ (or $\det H=0$): restrict $f$ to the null direction and to a few curves; look for a sign argument such as a sum of squares.
- For global questions, look at the behaviour at infinity (e.g. $f(x,0)$ as $x\to\pm\infty$) — a single local minimum need not be global in two or more variables.
Absolute Extrema on Closed Bounded Regions
Proof. By the Heine–Borel theorem a closed bounded subset of $\mathbb{R}^n$ is compact (§4.1), and a continuous real function on a compact set is bounded and attains its supremum and infimum: if $f(x_k)\to\sup f$, a subsequence of $(x_k)$ converges to some $a\in K$ (Bolzano–Weierstrass), and $f(a)=\sup f$ by continuity. If an extremum $a$ is an interior point where $f$ is differentiable, it is a local extremum, so $\nabla f(a)=0$ by Theorem 1.10. ∎
- Check that the region is closed and bounded and $f$ continuous (then both extrema exist).
- Interior candidates: critical points inside the region, and points where $f$ is not differentiable. No second derivative test is needed.
- Boundary candidates: parametrise each piece (a segment by $x=$ const or $y=mx+c$, a circle by $(r\cos t,r\sin t)$) and solve the one-variable problem, including the endpoints and corners — or use Lagrange multipliers (next subsection).
- Evaluate $f$ at every candidate. The largest value is the maximum, the smallest the minimum.
Lagrange Multipliers
Now the variables are tied together: we look for extrema of $f$ on a constraint set $M=\{x:g(x)=0\}$ (or $\{g_1=\cdots=g_k=0\}$) — a curve in the plane, a surface or curve in space. At a constrained extremum $\nabla f$ need not vanish, but $f$ cannot change to first order along $M$. So $\nabla f$ must be perpendicular to $M$, and the normal directions to $M$ are spanned by the constraint gradients.
Proof (one constraint). Let $v$ be any vector with $\nabla g(a)\cdot v=0$. We show that $v$ is the velocity of a curve in $M$. Since $\nabla g(a)\ne0$, some partial derivative, say $\partial g/\partial x_n$, is nonzero at $a$. By the implicit function theorem (§1.1), near $a$ the set $M$ is a graph $x_n=\phi(x')$, $x'=(x_1,\dots,x_{n-1})$, with $\partial\phi/\partial x_j=-g_{x_j}/g_{x_n}$. Writing $v=(v',v_n)$, the curve $\gamma(t)=\left(a'+tv',\ \phi(a'+tv')\right)$ lies in $M$, passes through $a$ at $t=0$, and has $\gamma'(0)=(v',\nabla\phi(a')\cdot v')$; the last component equals $-\left(\sum_{j\lt n}g_{x_j}v_j\right)/g_{x_n}=v_n$ because $\nabla g(a)\cdot v=0$. So $\gamma'(0)=v$. Now $t\mapsto f(\gamma(t))$ has a local extremum at $0$, so $0=\nabla f(a)\cdot\gamma'(0)=\nabla f(a)\cdot v$. Thus $\nabla f(a)$ is orthogonal to every vector orthogonal to $\nabla g(a)$, which forces $\nabla f(a)=\lambda\nabla g(a)$ (decompose $\nabla f(a)$ into a multiple of $\nabla g(a)$ plus a part orthogonal to it, and take $v$ to be that part). For $k$ constraints the same argument runs with the $k\times k$ block of the Jacobian of $g$ in place of $g_{x_n}$. ∎
Two practical remarks. First, the multiplier has a meaning: if $M(c)$ is the extreme value of $f$ subject to $g=c$, then (under mild smoothness) $M'(c)=\lambda$ — the multiplier is the rate at which the optimum improves when the constraint is relaxed; economists call it a shadow price. Second, the independence hypothesis is essential: points of $M$ where the constraint gradients are dependent must be added to the candidate list by hand (Example 7).
- Make sure extrema exist: a closed bounded constraint set (ellipse, sphere, closed curve) guarantees both. Otherwise argue separately.
- Solve $\nabla f=\lambda\nabla g$ (or $\nabla f=\lambda\nabla g_1+\mu\nabla g_2$) together with the constraints. Eliminate the multipliers early: take ratios, or subtract equations, or sum them using the constraint.
- Add the points of $M$ where $\nabla g=0$ (or where $\nabla g_1,\nabla g_2$ are parallel).
- Evaluate $f$ at all candidates and compare. (For a local question, use the bordered Hessian below.)
Proof. $S$ is closed and bounded, so the extrema exist; $\nabla(\|x\|^2-1)=2x\ne0$ on $S$, and $\nabla Q=2Ax$ (because $A$ is symmetric). Theorem 1.13 gives $2Ax=\lambda\cdot2x$ at every constrained critical point, so $x$ is a unit eigenvector and $Q(x)=x^{\mathsf T}\lambda x=\lambda$. Every unit eigenvector is such a candidate, so the maximum of $Q$ on $S$ is the largest eigenvalue and the minimum the smallest. For the second statement, write $x=\rho u$ with $\|u\|=1$: $Q(x)=c$ means $\rho^2=c/Q(u)$, which is smallest when $Q(u)=\lambda_{\max}$ and largest when $Q(u)=\lambda_{\min}$. ∎
Lagrange's theorem gives candidates; to decide whether a candidate is a local maximum or minimum on the constraint set without comparing values, use the second derivative of the Lagrangian along the constraint, packaged as a bordered determinant.
Let $f,g\in C^2$ on an open set of $\mathbb{R}^2$, let $g(a)=0$, $\nabla g(a)\ne0$ and $\nabla f(a)=\lambda\nabla g(a)$, and put $\mathcal{L}=f-\lambda g$. Form the bordered Hessian
$$\bar H=\begin{pmatrix}0&g_x&g_y\\g_x&\mathcal{L}_{xx}&\mathcal{L}_{xy}\\g_y&\mathcal{L}_{xy}&\mathcal{L}_{yy}\end{pmatrix}\ \text{ at }a.$$If $\det\bar H\gt0$, $a$ is a strict local maximum of $f$ subject to $g=0$; if $\det\bar H\lt0$, a strict local minimum. (In general, for $n$ variables and $m$ constraints one borders $H_x\mathcal{L}$ by the $m\times n$ Jacobian of $g$ and examines the last $n-m$ leading principal minors: all of the sign of $(-1)^m$ gives a minimum; alternating signs, with $\det\bar H$ of the sign of $(-1)^n$, gives a maximum.)
Proof (two variables). Expanding along the first row, $\det\bar H=-g_x^2\mathcal{L}_{yy}+2g_xg_y\mathcal{L}_{xy}-g_y^2\mathcal{L}_{xx}=-\,t^{\mathsf T}H_\mathcal{L}t$ with $t=(-g_y,g_x)$, a tangent vector to the curve $g=0$ at $a$. By the implicit function theorem the curve is, near $a$, a $C^2$ curve $\gamma$ with $\gamma(0)=a$ and $\gamma'(0)=t$. Along it $f(\gamma(s))=\mathcal{L}(\gamma(s))$, and differentiating twice,
$$\begin{aligned}\frac{d^2}{ds^2}f(\gamma(s))\Big|_{s=0}&=t^{\mathsf T}H_\mathcal{L}(a)\,t+\nabla\mathcal{L}(a)\cdot\gamma''(0)\\&=-\det\bar H,\end{aligned}$$since $\nabla\mathcal{L}(a)=0$. Also $\frac{d}{ds}f(\gamma(s))=0$ at $s=0$. So $s\mapsto f(\gamma(s))$ has a strict local maximum at $0$ when $\det\bar H\gt0$ and a strict local minimum when $\det\bar H\lt0$ (one-variable second derivative test). ∎
In Example 5, at $(1,1)$ with $\lambda=\tfrac23$: $\mathcal{L}_{xx}=\mathcal{L}_{yy}=2-2\lambda=\tfrac23$, $\mathcal{L}_{xy}=-\lambda=-\tfrac23$ and $g_x=g_y=3$, so $\det\bar H=-9\cdot\tfrac23+2\cdot9\cdot\left(-\tfrac23\right)-9\cdot\tfrac23=-24\lt0$: a local minimum of the distance, as found. At $(\sqrt3,-\sqrt3)$ with $\lambda=2$ the same computation gives $\det\bar H=24\gt0$: a local maximum.
- Critical point $\not\Rightarrow$ extremum. $x^2-y^2$ and $xy$ at the origin are saddles; $x^3-3xy^2$ is a monkey saddle.
- $D=0$ decides nothing. $(x+y)^2+x^4$ (strict minimum) and $(x+y)^2-y^4$ (saddle) have the same Hessian; so do $x^4+y^4$, $-x^4-y^4$ and $x^4-y^4$ (all with $H=0$).
- Positive semidefinite Hessian at a critical point $\not\Rightarrow$ local minimum. $x^2+y^3$: $H=\mathrm{diag}(2,0)$, but $f\lt0$ on the negative $y$-axis.
- A minimum along every line $\not\Rightarrow$ a local minimum. $(y-x^2)(y-3x^2)$ is positive near $0$ on every line through the origin (except at $0$), yet negative on $y=2x^2$.
- Semidefiniteness needs all principal minors. $\begin{pmatrix}0&0\\0&-1\end{pmatrix}$ has leading minors $0,0$ — "all $\ge0$" — and is negative semidefinite, not positive.
- The sign of $f_{xx}$ matters only when $D\gt0$. $D\lt0$ is a saddle whatever $f_{xx}$ is.
- A unique critical point that is a local minimum need not be a global minimum in two variables: $e^{3x}+y^3-3ye^x$ has its only critical point at $(0,1)$, a strict local minimum, and is unbounded below. In one variable this cannot happen.
- Two strict local minima need not have a critical point between them that is a maximum: $\sin x+y^2$ has infinitely many strict local minima and no local maximum (its other critical points are saddles).
- Closed and bounded matters. $x$ on the open unit disc has no maximum; $x+y$ on the branch $xy=1$, $x\gt0$ has a minimum $2$ but no maximum.
- Lagrange needs $\nabla g\ne0$ (independent gradients). The nearest point of $y^2=(x-1)^3$ to the origin is the cusp $(1,0)$, missed by the multiplier equations.
- Multiplier points are only candidates. $x^2+2y^2-x$ on the unit circle has four constrained critical points; one, $(-1,0)$, is a local minimum along the circle but neither the global maximum nor the global minimum.
- CSIR Unit 1 · §6.2 Inverse and Implicit Function Theorems; Extrema — the second derivative test proved from Taylor's theorem in several variables, Peano's surface with a minimum on every line, the full proof of the Lagrange multiplier theorem for several constraints via the rank condition, and the eigenvalue characterisation of extrema of quadratic forms.
Two Labs
Exercises
- 1 $f=x^2+xy+y^2-3x$.
- 2 $f=x^3-3x+y^3-12y$.
- 3 $f=4xy-x^2y-2xy^2$.
- 4 $f=(x-y)\,e^{-x^2-y^2}$.
- 5 $f=x^2+2y^2+3z^2+2xy+2yz-2x$.
- 6 $f=xy+yz+zx$.
- 7 Each function has $D=0$ at the origin. Decide the nature of the origin: (a) $x^4+2y^4$; (b) $x^2-y^3$; (c) $(x-y^2)^2$.
- 8 Show that $f=e^{3x}+y^3-3ye^x$ has exactly one critical point, that it is a strict local minimum, and that $f$ has no global minimum.
- 9 For which real $k$ does $f=x^2+kxy+4y^2$ have a strict local minimum at the origin? What happens for the other values of $k$?
- 1 $f=x^2+y^2-2x-4y$ on the closed triangle with vertices $(0,0)$, $(4,0)$, $(0,4)$.
- 2 $f=xy$ on the closed disc $x^2+y^2\le2$.
- 3 $f=x^2+y^2-xy-x$ on the square $[0,1]\times[0,1]$.
- 4 Modelling. An open-top rectangular tank must hold $4\ \text{m}^3$. The base material costs twice as much per square metre as the side material. Find the dimensions of the cheapest tank.
- 5 Give a continuous function on the open unit disc with no maximum, and explain which hypothesis of Theorem 1.12 fails.
- 6 Find the maximum of $x+y+z$ on the closed ball $x^2+y^2+z^2\le3$.
- 1 Find the extreme values of $3x+4y$ on the circle $x^2+y^2=25$.
- 2 Maximise $xy^2z^3$ subject to $x+y+z=12$, $x,y,z\gt0$.
- 3 Use Lagrange multipliers to find the distance from the origin to the plane $x+2y+2z=9$.
- 4 Find the extreme values of $x^2-y^2$ on the circle $x^2+y^2=4$.
- 5 Find the maximum and minimum of $5x^2+4xy+2y^2$ on the unit circle.
- 6 Find the point of the line $\{x+y+z=1,\ x-y+2z=2\}$ nearest to the origin, and the distance.
- 7 Find the critical point of $f=xy$ subject to $x+2y=4$ and classify it with the bordered Hessian.
- 8 Show that the minimum of $f=y$ on the curve $y^3=x^2$ is not found by the Lagrange equations, and explain why.
- 9 Economics. A firm's output is $P=10\sqrt{KL}$, where capital $K$ costs $4$ per unit and labour $L$ costs $1$ per unit, and the budget is $400$. Maximise $P$, find the multiplier, and interpret it.
- 1 If $f\in C^1(\mathbb{R}^2)$ has a local maximum at $a$, then $D_uf(a)=0$ for every unit vector $u$.
- 2 If $f\in C^2(\mathbb{R}^2)$ has exactly one critical point and it is a local maximum, then it is a global maximum.
- 3 If $a$ is a critical point of $f\in C^2(\mathbb{R}^2)$ and $H_f(a)$ is positive semidefinite, then $a$ is a local minimum.
- 4 If $a$ is a saddle point of $f\in C^2(\mathbb{R}^2)$ and $\det H_f(a)\ne0$, then $\det H_f(a)\lt0$.
- 5 Let $A$ be a real symmetric $3\times3$ matrix with eigenvalues $1,2,-3$ and $f(x)=x^{\mathsf T}Ax$. Then the origin is a saddle point of $f$, and $\max_{\|x\|=1}f=2$, $\min_{\|x\|=1}f=-3$.
- 6 A $C^2$ function on $\mathbb{R}^2$ with two strict local minima must have a local maximum.
E1. GATE MA · MCQ The critical points of $f(x,y)=2x^3-6xy+3y^2$ are $(0,0)$ and $(1,1)$. Which is correct? (A) $(0,0)$ is a local minimum and $(1,1)$ a saddle point; (B) $(0,0)$ is a saddle point and $(1,1)$ a local minimum; (C) both are saddle points; (D) $(0,0)$ is a saddle point and $(1,1)$ a local maximum.
E2. GATE MA · MCQ The maximum value of $x+2y+3z$ on the ellipsoid $x^2+2y^2+3z^2=6$ is (A) $\sqrt6$; (B) $6$; (C) $2\sqrt6$; (D) $12$.
E3. GATE MA · MSQ Let $f(x,y)=x^4-2x^2+y^2$. Which of the following is/are true? (One or more options may be correct.) (A) $f$ has exactly three critical points. (B) $(0,0)$ is a saddle point of $f$. (C) $f$ attains its global minimum value $-1$ at exactly two points. (D) $f$ has a local maximum.
E4. GATE MA · MSQ For a real parameter $a$ let $f_a(x,y)=x^2+2axy+y^2+y^4$. Which of the following is/are true? (One or more options may be correct.) (A) If $|a|\lt1$, the origin is a strict local minimum of $f_a$. (B) If $|a|\gt1$, the origin is a saddle point of $f_a$. (C) If $a=1$, the origin is a strict local minimum of $f_a$. (D) If $a=1$, the second derivative test decides the nature of the origin.
E5. GATE MA · NAT The maximum value of $f(x,y)=x^2y$ on the closed region $x^2+2y^2\le6$ is ______ (correct to two decimal places).
E6. GATE MA · NAT The maximum of $xyz$ over the points of the ellipsoid $\dfrac{x^2}{4}+\dfrac{y^2}{9}+z^2=1$ with $x,y,z\gt0$ is ______ (correct to two decimal places).
Suggested plan — 3 lectures × 60 min.
- Free extrema. Definition 1.7, Theorem 1.10 with proof, Definition 1.8 (complete the square on the board for the $2\times2$ case). Theorem 1.11 with the compactness proof of (1). Example 1 as a class exercise; then project Interactive 1 and let students drive $(D,f_{xx})$ across the regions before formalising the rules. Example 2.
- Degenerate cases and global extrema. Example 3 (ask the class to predict each answer from the Hessian alone — and then show they cannot). Interactive 1 with $D=0$ and each extra term. The strategy box, Theorem 1.12, Example 4. Exercise I.8 as a discussion piece.
- Constraints. Theorem 1.13 with the tangent-curve proof; Interactive 2 on problems 1 and 2 (stop the walk at each turning point and look at the arrows). Examples 5 and 6, Theorem 1.14, Example 7 with Interactive 2 problem 4. Theorem 1.15 briefly with Example 5's numbers. GATE corner E4 and E6 live.
Discussion questions. (1) Why can a single local minimum fail to be global in two variables but not in one? What one-variable argument breaks? (2) In Example 5 the multipliers were $\tfrac23$ and $2$, the reciprocals of the eigenvalues. Explain why, starting from $\nabla f=\lambda\nabla g$ with $f=\|x\|^2$, $g=x^{\mathsf T}Ax-3$. (3) The multiplier is a "shadow price". In Exercise III.9, what would the firm pay, at most, for one extra unit of budget?
Misconceptions to watch for. Using $D\gt0$ alone to declare a minimum; declaring "no extremum" when $D=0$; checking only leading minors for semidefiniteness; forgetting boundary pieces or corners in closed-region problems; dividing by $x-y$ or by $\lambda$ without treating the zero case; trusting multiplier equations at points where $\nabla g=0$; concluding that a lone local minimum is global.
Suggested homework. I(2, 3, 5, 7, 9), II(1, 3, 4), III(2, 5, 6, 8, 9), IV(2, 3, 6); GATE corner E1, E3, E5.
Research question. How should an investor split money between three assets to reach a target expected return with the smallest possible risk — and what do the Lagrange multipliers say about the price of extra return?
Why it matters. Harry Markowitz's mean–variance model (1952) underlies how pension funds, insurers and index providers worldwide build portfolios. With weights $w=(w_1,w_2,w_3)$, expected returns $\mu$ and covariance matrix $\Sigma$, one minimises the variance $w^{\mathsf T}\Sigma w$ subject to two linear constraints, $w_1+w_2+w_3=1$ and $\mu^{\mathsf T}w=r$ — exactly the two-constraint Lagrange problem of Theorem 1.13 with a quadratic objective.
What to do.
- Take $\mu=(0.06,\ 0.10,\ 0.14)$ and $\Sigma=\begin{pmatrix}0.010&0.002&0.001\\0.002&0.040&0.010\\0.001&0.010&0.090\end{pmatrix}$ (annual returns and covariances of a bond fund, a domestic equity fund and an emerging-markets fund). Write the Lagrange equations $2\Sigma w=\lambda\mathbf 1+\gamma\mu$ together with the two constraints, a $5\times5$ linear system.
- Solve it for $r=0.08$ and $r=0.10$. Report the weights, the variance and the standard deviation (the risk).
- Repeat for twenty values of $r$ between $0.05$ and $0.15$ and plot risk against return: the efficient frontier. Show that the variance is a quadratic function of $r$.
- Check numerically that $\gamma=\frac{d}{dr}\left(\min w^{\mathsf T}\Sigma w\right)$: the multiplier of the return constraint is the marginal variance of extra return.
Tools: Python with numpy (a $5\times5$ solve) and any plotting tool; a spreadsheet works too.
Hand in: the two weight vectors with their risks; the frontier plot; a short paragraph on negative weights (short selling) and what changes if they are forbidden (the problem then has inequality constraints).
Going further. Find the global minimum-variance portfolio (drop the return constraint): show that $w=\Sigma^{-1}\mathbf1/(\mathbf1^{\mathsf T}\Sigma^{-1}\mathbf1)$. Read about the Karush–Kuhn–Tucker conditions, which extend Lagrange multipliers to inequality constraints such as $w_i\ge0$.
🧪 Self-check quiz
Q1. At the origin, $f(x,y)=x^2-4xy+y^2$ has
Q2. At a critical point of a $C^2$ function of two variables, $f_{xx}f_{yy}-f_{xy}^2=0$. Then
Q3. The maximum of $xy$ subject to $x+y=10$ is
Q4. At a critical point of a $C^2$ function of three variables the Hessian is $\mathrm{diag}(2,-1,3)$. The point is
Q5. The maximum of $2x^2+2xy+2y^2$ on the unit circle $x^2+y^2=1$ is