Chapter 1 · Calculus of Several Variables

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.

📘 Definition 1.7 — Local and global extrema; critical and saddle points
  • $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)$.
📐 Theorem 1.10 — Necessary conditions for a local extremum
Let $a\in U$ be a local extremum of $f$. (a) (Fermat) If $f$ is differentiable at $a$, then $\nabla f(a)=0$. (b) If $f\in C^2(U)$ and $a$ is a local minimum (maximum), then for every $h$, $h^{\mathsf T}H_f(a)h\ge0$ ($\le0$), where $H_f$ is the Hessian matrix of Definition 1.8.

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

📘 Definition 1.8 — Hessian matrix; definiteness

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".

📐 Theorem 1.11 — Second derivative (Hessian) test

Let $f\in C^2(U)$ and let $a$ be a critical point, $H=H_f(a)$.

  1. $H$ positive definite $\Rightarrow$ $a$ is a strict local minimum.
  2. $H$ negative definite $\Rightarrow$ $a$ is a strict local maximum.
  3. $H$ indefinite $\Rightarrow$ $a$ is a saddle point.
  4. $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). ∎

✏️ Example 1 — Four critical points
Find and classify all critical points of $f(x,y)=x^3+3xy^2-15x-12y$, and decide whether $f$ has a global extremum on $\mathbb{R}^2$.
Critical points $f_x=3x^2+3y^2-15=0$ and $f_y=6xy-12=0$ give $x^2+y^2=5$ and $xy=2$. Then $(x+y)^2=9$ and $(x-y)^2=1$, so $(x,y)\in\{(2,1),(1,2),(-1,-2),(-2,-1)\}$.
Hessian $f_{xx}=6x$, $f_{yy}=6x$, $f_{xy}=6y$, so $D=36(x^2-y^2)$.
Classify $(2,1)$: $D=108\gt0$, $f_{xx}=12\gt0$ — strict local minimum, $f=-28$. $(-2,-1)$: $D=108$, $f_{xx}=-12$ — strict local maximum, $f=28$. $(1,2)$ and $(-1,-2)$: $D=-108\lt0$ — saddle points (values $-26$ and $26$).
Global? No: $f(x,0)=x^3-15x$ is unbounded above and below. The local minimum $-28$ is not the global minimum, and there is none.
✏️ Example 2 — Three variables
Classify the critical points of $f(x,y,z)=x^3-3x+y^2+z^2-yz$.
Critical points $f_x=3x^2-3=0$ gives $x=\pm1$; $f_y=2y-z=0$ and $f_z=2z-y=0$ give $y=z=0$. Critical points $(\pm1,0,0)$.
Hessian $H=\begin{pmatrix}6x&0&0\\0&2&-1\\0&-1&2\end{pmatrix}$, with $\Delta_1=6x$, $\Delta_2=12x$, $\Delta_3=6x(4-1)=18x$.
Classify At $(1,0,0)$: $\Delta=6,12,18$, all positive — strict local minimum, $f=-2$. At $(-1,0,0)$: $\Delta=-6,-12,-18$; $\Delta_3\ne0$ and the pattern is not $-,+,-$, so $H$ is indefinite: a saddle point (its eigenvalues are $-6,1,3$).
Check The $(y,z)$ block $\begin{pmatrix}2&-1\\-1&2\end{pmatrix}$ has eigenvalues $1$ and $3$, so $f$ bends up in the $(y,z)$ directions at both points; only the $x$-direction differs, where $x^3-3x$ has a minimum at $1$ and a maximum at $-1$.

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).

✏️ Example 3 — When $D=0$: decide by hand
Each function has a critical point at the origin with $D=0$ there. Decide its nature: (a) $f=(x+y)^2+x^4$; (b) $g=(x+y)^2-y^4$; (c) $p=x^2y^2$; (d) $q=x^3-3xy^2$.
(a) strict minimum $H=\begin{pmatrix}2&2\\2&2\end{pmatrix}$, $D=0$; the null direction is $(1,-1)$. But $f\ge0$, and $f=0$ forces $x+y=0$ and $x=0$, i.e. the origin. Strict local (indeed global) minimum.
(b) saddle Same Hessian. On the null line $x=-y$: $g=-y^4\lt0$; on the $x$-axis $g=x^2\gt0$. Saddle point.
(c) non-strict minimum $H=0$. $p\ge0=p(0,0)$, so the origin is a local minimum, but not strict: $p=0$ on both axes. (Every point of the axes is a critical point, and none is isolated.)
(d) saddle $H=0$. In polar form $q=r^3\cos3\theta$, which takes both signs on every circle: a "monkey saddle" with three valleys and three ridges.
Moral (a) and (b) have the same Hessian and different natures: the second derivative test has nothing to say when $D=0$. Look along the null direction, then (if needed) along curves.
🧭 Classifying critical points — GATE routine
  1. 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.
  2. Write the Hessian once, in general; then substitute each critical point.
  3. 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.
  4. $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.
  5. 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

📐 Theorem 1.12 — Extreme value theorem and where extrema can occur
Let $K\subseteq\mathbb{R}^n$ be closed and bounded, and $f:K\to\mathbb{R}$ continuous. Then $f$ attains a global maximum and a global minimum on $K$. If $a\in K$ is a global extremum, then either $a$ lies on the boundary of $K$, or $a$ is an interior point at which $f$ is not differentiable, or $a$ is an interior critical point.

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. ∎

🧭 Closed-region method
  1. Check that the region is closed and bounded and $f$ continuous (then both extrema exist).
  2. Interior candidates: critical points inside the region, and points where $f$ is not differentiable. No second derivative test is needed.
  3. 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).
  4. Evaluate $f$ at every candidate. The largest value is the maximum, the smallest the minimum.
✏️ Example 4 — Extremes on a disc
Find the absolute maximum and minimum of $f(x,y)=x^2+2y^2-x$ on the closed disc $x^2+y^2\le1$.
Interior $f_x=2x-1=0$, $f_y=4y=0$: the point $\left(\tfrac12,0\right)$, inside the disc, with $f=-\tfrac14$.
Boundary On $x^2+y^2=1$ substitute $y^2=1-x^2$: $f=x^2+2-2x^2-x=2-x^2-x$ for $x\in[-1,1]$. Its derivative $-2x-1$ vanishes at $x=-\tfrac12$ (value $2-\tfrac14+\tfrac12=\tfrac94$); at the ends, $f(-1)=2$ and $f(1)=0$.
Compare Candidates: $-\tfrac14$, $\tfrac94$, $2$, $0$.
Answer Maximum $\tfrac94$ at $\left(-\tfrac12,\pm\tfrac{\sqrt3}{2}\right)$; minimum $-\tfrac14$ at $\left(\tfrac12,0\right)$. (The boundary point $(-1,0)$ is a local minimum of $f$ along the circle, but not a global extremum — Interactive 2, first problem, shows all four constrained critical points.)

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.

📘 Definition 1.9 — Constrained extrema and the Lagrangian
Let $g=(g_1,\dots,g_k):U\to\mathbb{R}^k$ and $M=\{x\in U:g(x)=0\}$. A point $a\in M$ is a local maximum of $f$ subject to $g=0$ if $f(x)\le f(a)$ for all $x\in M$ near $a$ (similarly for a minimum). The Lagrangian is $\mathcal{L}(x,\lambda)=f(x)-\lambda_1g_1(x)-\cdots-\lambda_kg_k(x)$, and the $\lambda_i$ are Lagrange multipliers.
📐 Theorem 1.13 — Lagrange multiplier theorem
Let $f,g_1,\dots,g_k\in C^1(U)$ with $k\lt n$, and let $a\in M$ be a local extremum of $f$ subject to $g=0$. If $\nabla g_1(a),\dots,\nabla g_k(a)$ are linearly independent (for one constraint: $\nabla g(a)\ne0$), then there are unique numbers $\lambda_1,\dots,\lambda_k$ with $$\nabla f(a)=\lambda_1\nabla g_1(a)+\cdots+\lambda_k\nabla g_k(a).$$ Equivalently, $(a,\lambda)$ is a critical point of $\mathcal{L}$: the $n+k$ equations $\nabla_x\mathcal{L}=0$, $g_1=\cdots=g_k=0$ hold.

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).

🧭 The Lagrange method
  1. Make sure extrema exist: a closed bounded constraint set (ellipse, sphere, closed curve) guarantees both. Otherwise argue separately.
  2. 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.
  3. Add the points of $M$ where $\nabla g=0$ (or where $\nabla g_1,\nabla g_2$ are parallel).
  4. Evaluate $f$ at all candidates and compare. (For a local question, use the bordered Hessian below.)
📐 Theorem 1.14 — Quadratic forms on the sphere (Rayleigh)
Let $A$ be a real symmetric $n\times n$ matrix, $Q(x)=x^{\mathsf T}Ax$, and $S=\{x:\|x\|=1\}$. Then $\max_SQ=\lambda_{\max}$ and $\min_SQ=\lambda_{\min}$, the largest and smallest eigenvalues of $A$, attained at the corresponding unit eigenvectors. Consequently, on the conic or quadric $Q(x)=c$ with $c\gt0$ and $A$ positive definite, the distance from the origin ranges from $\sqrt{c/\lambda_{\max}}$ to $\sqrt{c/\lambda_{\min}}$.

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}$. ∎

✏️ Example 5 — Nearest and farthest points of a tilted ellipse
Find the points of the ellipse $x^2+xy+y^2=3$ nearest to and farthest from the origin, (a) with Lagrange multipliers and (b) with Theorem 1.14.
Set-up Optimise $f=x^2+y^2$ subject to $g=x^2+xy+y^2-3=0$. The ellipse is closed and bounded, and $\nabla g=(2x+y,\ x+2y)$ vanishes only at the origin, which is not on it.
(a) Equations $2x=\lambda(2x+y)$ and $2y=\lambda(x+2y)$. Subtracting: $2(x-y)=\lambda(x-y)$; adding: $2(x+y)=3\lambda(x+y)$. Since $x,y$ are not both $0$, either $x=y$ (then $\lambda=\tfrac23$) or $x=-y$ (then $\lambda=2$).
(a) Candidates $x=y$: $3x^2=3$, points $\pm(1,1)$ with $f=2$. $x=-y$: $x^2=3$, points $\pm(\sqrt3,-\sqrt3)$ with $f=6$. Nearest points $\pm(1,1)$ at distance $\sqrt2$; farthest $\pm(\sqrt3,-\sqrt3)$ at distance $\sqrt6$.
(b) Eigenvalues $x^2+xy+y^2=x^{\mathsf T}Ax$ with $A=\begin{pmatrix}1&\tfrac12\\\tfrac12&1\end{pmatrix}$, eigenvalues $\tfrac32$ (eigenvector $(1,1)$) and $\tfrac12$ (eigenvector $(1,-1)$). Distances $\sqrt{3/\tfrac32}=\sqrt2$ and $\sqrt{3/\tfrac12}=\sqrt6$, along the eigenvectors. ✓ Notice $\lambda=\tfrac23=1/\tfrac32$ and $\lambda=2=1/\tfrac12$.
✏️ Example 6 — Two constraints
Find the maximum and minimum of $f=x+2y+3z$ on the circle $x^2+y^2+z^2=1$, $x+y+z=0$.
Set-up $g_1=x^2+y^2+z^2-1$, $g_2=x+y+z$. The circle is closed and bounded. $\nabla g_1=2(x,y,z)$ and $\nabla g_2=(1,1,1)$ are parallel only if $x=y=z$, which with $x+y+z=0$ gives the origin — not on the circle. So Theorem 1.13 applies everywhere.
Equations $(1,2,3)=2\lambda(x,y,z)+\mu(1,1,1)$. Add the three components and use $x+y+z=0$: $6=3\mu$, so $\mu=2$ and $2\lambda(x,y,z)=(-1,0,1)$.
Solve $(x,y,z)=\pm\tfrac1{\sqrt2}(-1,0,1)$ (unit length), giving $f=\pm\tfrac{-1+3}{\sqrt2}=\pm\sqrt2$.
Answer Maximum $\sqrt2$ at $\tfrac1{\sqrt2}(-1,0,1)$, minimum $-\sqrt2$ at $\tfrac1{\sqrt2}(1,0,-1)$. Geometric check: on the plane $x+y+z=0$, $f(x)=c\cdot x$ only sees the projection of $c=(1,2,3)$ onto the plane, $c-2(1,1,1)=(-1,0,1)$, of length $\sqrt2$.
✏️ Example 7 — When the multiplier rule finds nothing
Find the point of the curve $y^2=(x-1)^3$ nearest to the origin, and show that the Lagrange system for $f=x^2+y^2$, $g=y^2-(x-1)^3$ has no solution at all. Explain.
Direct On the curve $(x-1)^3=y^2\ge0$, so $x\ge1$ and $x^2+y^2\ge1$, with equality only at $(1,0)$. The nearest point is $(1,0)$, at distance $1$.
Lagrange $\nabla f=\lambda\nabla g$ reads $2x=-3\lambda(x-1)^2$, $2y=2\lambda y$. If $y\ne0$ then $\lambda=1$ and $3x^2-4x+3=0$, whose discriminant $16-36$ is negative. If $y=0$ then $x=1$ and the first equation says $2=0$. No solutions.
Explanation At $(1,0)$, $\nabla g=\left(-3(x-1)^2,\ 2y\right)=(0,0)$: the hypothesis of Theorem 1.13 fails exactly at the minimum (the curve has a cusp there). The theorem is not contradicted — it simply does not apply.
Lesson Always add the points where $\nabla g=0$ to the candidates. Interactive 2, fourth problem, shows the cusp and the two gradients.

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.

📐 Theorem 1.15 — Bordered Hessian test

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.

⚠️ Counterexamples and pitfalls
  1. Critical point $\not\Rightarrow$ extremum. $x^2-y^2$ and $xy$ at the origin are saddles; $x^3-3xy^2$ is a monkey saddle.
  2. $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$).
  3. 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.
  4. 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$.
  5. 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.
  6. The sign of $f_{xx}$ matters only when $D\gt0$. $D\lt0$ is a saddle whatever $f_{xx}$ is.
  7. 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.
  8. 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).
  9. 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.
  10. 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.
  11. 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.
📚 Go deeper — full proofs in the CSIR NET course
  • 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

Interactive 1 — The Hessian Decides (Until It Doesn't)

Here $f(x,y)=\tfrac12\left(ax^2+2bxy+cy^2\right)+(\text{extra term})$, so the origin is a critical point with Hessian $\begin{pmatrix}a&b\\b&c\end{pmatrix}$. Left: the sign of $f$ near $0$ (red above $f(0)=0$, blue below) with level curves and the eigen-directions. Right: the point $(D,\ f_{xx})=(ac-b^2,\ a)$ in the classification plane. Move the sliders, or press Play to sweep $b$; set $D=0$ and switch the extra term to watch the higher-order terms take over.

f_xx = a—
D = ac − b²—
eigenvalues—
Hessian test says—
Interactive 2 — Walking Along a Constraint

A point $P$ walks along the constraint curve $g=0$ (thick) over the level curves of $f$ (thin). Arrows: $\nabla f(P)$ in green, $\nabla g(P)$ in amber (both scaled to the same length). Right: the value of $f$ along the walk, with its turning points marked. At every turning point the two arrows are parallel — $\nabla f=\lambda\nabla g$ — unless $\nabla g=0$ there.

P—
f(P)—
sin(angle between ∇f, ∇g)—
λ = ∇f·∇g / ‖∇g‖²—

Exercises

I
Critical points and the Hessian test. In parts 1–6 find and classify all critical points.
  • 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 $2x+y-3=0$, $x+2y=0$: $(2,-1)$. $f_{xx}=2$, $D=4-1=3\gt0$: strict local (and global) minimum, $f=-3$.
2 $x=\pm1$, $y=\pm2$; $f_{xx}=6x$, $f_{yy}=6y$, $f_{xy}=0$, $D=36xy$. $(1,2)$: minimum, $f=-18$. $(-1,-2)$: maximum, $f=18$. $(1,-2)$ and $(-1,2)$: $D\lt0$, saddles.
3 $f_x=y(4-2x-2y)$, $f_y=x(4-x-4y)$. Critical points $(0,0)$, $(4,0)$, $(0,2)$ and $\left(\tfrac43,\tfrac23\right)$. $f_{xx}=-2y$, $f_{yy}=-4x$, $f_{xy}=4-2x-4y$. At $(0,0)$: $D=-16$; at $(4,0)$: $D=0-(-4)^2=-16$; at $(0,2)$: $D=0-(-4)^2=-16$ — three saddles. At $\left(\tfrac43,\tfrac23\right)$: $f_{xx}=-\tfrac43$, $f_{yy}=-\tfrac{16}3$, $f_{xy}=-\tfrac43$, $D=\tfrac{64}9-\tfrac{16}9=\tfrac{16}3\gt0$: strict local maximum, $f=\tfrac{32}{27}$.
4 $f_x=e^{-r^2}\left(1-2x(x-y)\right)$, $f_y=e^{-r^2}\left(-1-2y(x-y)\right)$. Adding the two brackets: $(x-y)(x+y)=0$; $x=y$ makes the first bracket $1$, so $y=-x$ and $4x^2=1$. Critical points $\pm\left(\tfrac12,-\tfrac12\right)$. At $\left(\tfrac12,-\tfrac12\right)$ the Hessian has eigenvalues $\approx-2.43,-1.21$: maximum $e^{-1/2}\approx0.607$; at $\left(-\tfrac12,\tfrac12\right)$: minimum $-e^{-1/2}$. (They are global, since $f\to0$ at infinity.)
5 $2x+2y-2=0$, $2x+4y+2z=0$, $2y+6z=0$ give $\left(\tfrac52,-\tfrac32,\tfrac12\right)$. $H=\begin{pmatrix}2&2&0\\2&4&2\\0&2&6\end{pmatrix}$, $\Delta=2,4,16$: strict minimum, $f=-\tfrac52$.
6 Only $(0,0,0)$. $H=\begin{pmatrix}0&1&1\\1&0&1\\1&1&0\end{pmatrix}$ has eigenvalues $2,-1,-1$: indefinite, a saddle (e.g. $f(t,t,t)=3t^2\gt0$, $f(t,-t,0)=-t^2\lt0$).
7 (a) $x^4+2y^4\gt0$ for $(x,y)\ne0$: strict minimum. (b) On the $y$-axis $-y^3$ changes sign at $0$: no extremum (a saddle). (c) $(x-y^2)^2\ge0$ with equality on the whole parabola $x=y^2$: a non-strict minimum.
8 $f_x=3e^{3x}-3ye^x=0$ gives $y=e^{2x}$; $f_y=3y^2-3e^x=0$ gives $y^2=e^x$. Then $e^{4x}=e^x$, so $x=0$, $y=1$. There $f_{xx}=9-3=6$, $f_{yy}=6$, $f_{xy}=-3$, $D=27\gt0$: strict local minimum, $f(0,1)=-1$. But $f(0,y)=1+y^3-3y\to-\infty$ as $y\to-\infty$.
9 $H=\begin{pmatrix}2&k\\k&8\end{pmatrix}$, $D=16-k^2$. $|k|\lt4$: strict minimum. $|k|\gt4$: saddle. $k=\pm4$: $f=(x\pm2y)^2$, a non-strict minimum (zero along a line) — the test is silent there but a direct look decides.
II
Absolute extrema on closed bounded sets.
  • 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 Interior critical point $(1,2)$, $f=-5$. Edge $y=0$: $x^2-2x$, candidates $x=1$ ($-1$), $x=0$ ($0$), $x=4$ ($8$). Edge $x=0$: $y^2-4y$, $y=2$ ($-4$), $y=4$ ($0$). Edge $x+y=4$: substituting $y=4-x$ gives $f=x^2+(4-x)^2-2x-4(4-x)=2x^2-6x$, smallest at $x=\tfrac32$ (value $-\tfrac92$). Maximum $8$ at $(4,0)$; minimum $-5$ at $(1,2)$.
2 Interior: $(0,0)$, $f=0$. Boundary $x=\sqrt2\cos t$, $y=\sqrt2\sin t$: $f=\sin2t\in[-1,1]$. Maximum $1$ at $\pm(1,1)$, minimum $-1$ at $\pm(1,-1)$.
3 Interior: $2x-y-1=0$, $2y-x=0$, so $\left(\tfrac23,\tfrac13\right)$, $f=-\tfrac13$. Edges: $y=0$: $x^2-x$ (min $-\tfrac14$ at $x=\tfrac12$); $x=0$: $y^2$; $x=1$: $y^2-y$ (min $-\tfrac14$); $y=1$: $(x-1)^2$. Corners: $f(0,0)=0$, $f(1,0)=0$, $f(0,1)=1$, $f(1,1)=0$. Maximum $1$ at $(0,1)$; minimum $-\tfrac13$ at $\left(\tfrac23,\tfrac13\right)$.
4 With base $a\times b$, height $h$ and side material cost $1$ per $\text{m}^2$: minimise $C=2ab+2h(a+b)$ subject to $abh=4$. Lagrange: $2b+2h=\lambda bh$, $2a+2h=\lambda ah$, $2a+2b=\lambda ab$. The first two give $a=b$ (subtract: $2(b-a)=\lambda h(b-a)$, and $\lambda h=2$ would force $b+h=b$); then the third gives $4a=\lambda a^2$, and the first $2a+2h=\lambda ah=4h$, so $h=a$. Hence $a=b=h=4^{1/3}\approx1.587$ m: a cube, with cost $6\cdot4^{2/3}\approx15.12$ (in units of the side price per $\text{m}^2$).
5 $f(x,y)=x$ on $x^2+y^2\lt1$: $\sup f=1$ is not attained. The disc is bounded but not closed.
6 No interior critical points ($\nabla f=(1,1,1)$). On the sphere, Lagrange (or Cauchy–Schwarz: $x+y+z\le\sqrt3\sqrt{x^2+y^2+z^2}=3$) gives the maximum $3$ at $(1,1,1)$.
III
Lagrange multipliers.
  • 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 $(3,4)=2\lambda(x,y)$, so $(x,y)$ is parallel to $(3,4)$: $\pm(3,4)$. Maximum $25$, minimum $-25$.
2 Maximise $\log f=\log x+2\log y+3\log z$: $\frac1x=\frac2y=\frac3z=\lambda$, so $x:y:z=1:2:3$ and $(x,y,z)=(2,4,6)$, $f=2\cdot16\cdot216=6912$. (A maximum exists: $f\to0$ on the boundary of the open triangle.)
3 $(2x,2y,2z)=\lambda(1,2,2)$, so $(x,y,z)=t(1,2,2)$ and $9t=9$: the point $(1,2,2)$, distance $3$ (agreeing with $\frac{9}{\sqrt{1+4+4}}$).
4 $(2x,-2y)=\lambda(2x,2y)$: $x=0$ or $\lambda=1$; $\lambda=1$ forces $y=0$. Points $(\pm2,0)$ with value $4$ (maximum) and $(0,\pm2)$ with $-4$ (minimum) — the eigenvalues $\pm1$ of $\mathrm{diag}(1,-1)$ times $4$.
5 Matrix $\begin{pmatrix}5&2\\2&2\end{pmatrix}$, characteristic polynomial $\lambda^2-7\lambda+6$: eigenvalues $6$ and $1$. Maximum $6$ (at $\pm\tfrac1{\sqrt5}(2,1)$), minimum $1$ (at $\pm\tfrac1{\sqrt5}(1,-2)$), by Theorem 1.14.
6 $2(x,y,z)=\lambda(1,1,1)+\mu(1,-1,2)$ with the two constraints gives $\lambda=\tfrac27$, $\mu=\tfrac47$ and $(x,y,z)=\left(\tfrac37,-\tfrac17,\tfrac57\right)$. Distance $\sqrt{\tfrac{9+1+25}{49}}=\tfrac{\sqrt{35}}{7}\approx0.845$.
7 $y=\lambda$, $x=2\lambda$, and $x+2y=4$ give $\lambda=1$, the point $(2,1)$, $f=2$. $\bar H=\begin{pmatrix}0&1&2\\1&0&1\\2&1&0\end{pmatrix}$, $\det\bar H=4\gt0$: a local maximum (indeed $f=(4-2y)y$ has its maximum at $y=1$).
8 On the curve $y=x^{2/3}\ge0$, so the minimum is $0$ at $(0,0)$. With $g=y^3-x^2$: $(0,1)=\lambda(-2x,3y^2)$ requires $3\lambda y^2=1$ and $\lambda x=0$, so $x=0$, then $y=0$ (from the curve), contradicting $3\lambda y^2=1$. The minimum is at the cusp, where $\nabla g=(0,0)$.
9 $5\sqrt{L/K}=4\lambda$, $5\sqrt{K/L}=\lambda$ give $L=4K$; then $8K=400$: $K=50$, $L=200$, $P=10\sqrt{10000}=1000$, $\lambda=\tfrac52$. Interpretation: each extra unit of budget raises the maximal output by about $2.5$ units (check: with budget $B$ the optimum is $P=2.5B$).
IV
Prove or disprove.
  • 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.
1 True. By Theorem 1.10, $\nabla f(a)=0$, and $f$ is differentiable, so $D_uf(a)=\nabla f(a)\cdot u=0$.
2 False. $-\left(e^{3x}+y^3-3ye^x\right)$ has only the critical point $(0,1)$, a strict local maximum with value $1$, but $f(0,y)\to+\infty$ as $y\to-\infty$ (Exercise I.8).
3 False. $x^2+y^3$ at the origin: $H=\mathrm{diag}(2,0)$ is positive semidefinite, but $f(0,y)=y^3\lt0$ for $y\lt0$.
4 True. If $\det H\gt0$, then $H$ is definite (eigenvalues of the same sign, both nonzero) and Theorem 1.11 makes $a$ a strict local extremum, not a saddle.
5 True. $\nabla f=2Ax$ vanishes at $0$, the Hessian $2A$ has eigenvalues of both signs, so $0$ is a saddle; Theorem 1.14 gives the extreme values $\lambda_{\max}=2$, $\lambda_{\min}=-3$.
6 False. $f=\sin x+y^2$: critical points $(\tfrac\pi2+k\pi,0)$. At $x=-\tfrac\pi2+2k\pi$: $f_{xx}=1$, $f_{yy}=2$ — strict minima; at $x=\tfrac\pi2+2k\pi$: $f_{xx}=-1$, $f_{yy}=2$, $D\lt0$ — saddles. No local maximum. (In one variable the statement is true.)
🎯 GATE corner GATE MA · MCQGATE MA · MSQGATE MA · NAT

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.

Idea $D=f_{xx}f_{yy}-f_{xy}^2$ with $f_{xx}=12x$, $f_{yy}=6$, $f_{xy}=-6$, so $D=72x-36$.
Check $(0,0)$: $D=-36\lt0$, a saddle. $(1,1)$: $D=36\gt0$ and $f_{xx}=12\gt0$, a strict local minimum ($f=-1$). (Critical points: $f_x=6x^2-6y$, $f_y=-6x+6y$ give $y=x=x^2$.)
Answer (B).

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$.

Lagrange $(1,2,3)=\lambda(2x,4y,6z)$ gives $x=y=z=\frac1{2\lambda}$; the constraint gives $6x^2=6$, $x=\pm1$. Values $\pm6$.
Check Cauchy–Schwarz for the vectors $(1,\sqrt2,\sqrt3)$ and $(x,\sqrt2y,\sqrt3z)$: their dot product is $x+2y+3z$ and the squared lengths are $6$ and $x^2+2y^2+3z^2=6$, so $(x+2y+3z)^2\le6\cdot6=36$.
Answer (B).

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.

(A) True $f_x=4x^3-4x=0$, $f_y=2y=0$: $(0,0)$, $(\pm1,0)$.
(B) True $H(0,0)=\mathrm{diag}(-4,2)$, $D=-8\lt0$.
(C) True $f=(x^2-1)^2-1+y^2\ge-1$, with equality iff $x=\pm1$, $y=0$.
(D) False A local maximum would be a critical point; the three critical points are a saddle and two minima. ($f\to\infty$ in every direction, consistent with this.)
Answer (A), (B) and (C).

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.

Hessian At the origin $\nabla f_a=0$ and $H=\begin{pmatrix}2&2a\\2a&2\end{pmatrix}$, $D=4(1-a^2)$.
(A) True, (B) True $|a|\lt1$: $D\gt0$, $f_{xx}=2\gt0$ — strict minimum. $|a|\gt1$: $D\lt0$ — saddle.
(C) True $f_1=(x+y)^2+y^4\ge0$, and $f_1=0$ forces $y=0$ and then $x=0$.
(D) False $D=0$ at $a=1$: the test is inconclusive; (C) was decided by hand.
Answer (A), (B) and (C).

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).

Interior $f_x=2xy=0$, $f_y=x^2=0$: critical points $(0,y)$, where $f=0$.
Boundary $x^2=6-2y^2$ with $|y|\le\sqrt3$: $f=(6-2y^2)y$, derivative $6-6y^2=0$ at $y=\pm1$; $f=4$ at $y=1$ (points $(\pm2,1)$), $-4$ at $y=-1$; $0$ at $y=\pm\sqrt3$.
Answer $4.00$ (accept $3.99$ to $4.01$).

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).

Lagrange $yz=\lambda\frac x2$, $xz=\lambda\frac{2y}{9}$, $xy=2\lambda z$. Multiplying by $x$, $y$, $z$ respectively: $xyz=\lambda\frac{x^2}{2}=\lambda\frac{2y^2}{9}=2\lambda z^2$, so $\frac{x^2}{4}=\frac{y^2}{9}=z^2=\frac13$.
Compute $x=\frac2{\sqrt3}$, $y=\sqrt3$, $z=\frac1{\sqrt3}$, and $xyz=\frac{2}{\sqrt3}\approx1.1547$. (AM–GM check: $\left(\frac{x^2}4\cdot\frac{y^2}9\cdot z^2\right)^{1/3}\le\frac13$ gives $xyz\le6\cdot3^{-3/2}=\frac2{\sqrt3}$.)
Answer $1.15$ (accept $1.14$ to $1.16$).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. 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.
  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.
  3. 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–Teaching NexusResearch-tutored · optional, about 60 minutes

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.

  1. 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.
  2. Solve it for $r=0.08$ and $r=0.10$. Report the weights, the variance and the standard deviation (the risk).
  3. 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$.
  4. 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$.

Instructor note: for $r=0.08$ the optimal weights are about $(0.643,\ 0.215,\ 0.143)$, variance $0.00915$, standard deviation about $0.0957$; for $r=0.10$ they are about $(0.318,\ 0.365,\ 0.318)$, variance $0.01839$, standard deviation about $0.1356$. At $r=0.10$ the multiplier is $\gamma\approx0.708$, matching a central-difference derivative of the minimal variance. The global minimum-variance portfolio is about $(0.785,\ 0.150,\ 0.066)$, with expected return $0.0713$ and standard deviation $0.0906$. All three weights are nonnegative only for targets between about $0.064$ and $0.120$; outside that band the optimal portfolio sells something short (e.g. at $r=0.15$ the bond weight is about $-0.49$).

🧪 Self-check quiz

0/5 correct

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