Chapter 6 · Functions of Several Variables

6.2 Inverse and Implicit Function Theorems; Extrema

When an invertible derivative makes a map locally invertible, when an equation $F(x,y)=0$ can be solved for $y$, and how derivatives locate maxima and minima — the Hessian test for free extrema and Lagrange multipliers for constrained ones.

The total derivative of §6.1 is a linear map, and linear maps are easy: $Ax=y$ can be solved uniquely exactly when $\det A\ne0$, and a system of linear equations can be solved for some of its unknowns exactly when the corresponding block of coefficients is invertible. The two great theorems of this section say that the same is true, locally, for nonlinear $C^1$ maps: if $Df(a)$ is invertible, then $f$ is invertible near $a$ (the inverse function theorem); if the derivative of $F(x,y)$ with respect to $y$ is invertible, then $F(x,y)=0$ defines $y$ as a smooth function of $x$ near the point (the implicit function theorem). They turn "the linear approximation is good" into "the nonlinear problem behaves like its linear approximation", and they are the foundation for coordinate changes, curves and surfaces given by equations, and constrained optimisation.

The second half of the section uses derivatives to find extreme values. At an interior maximum or minimum the gradient vanishes; the Hessian matrix of second derivatives then decides — when it is definite — whether a critical point is a maximum, a minimum or a saddle. For extrema subject to constraints, the implicit function theorem produces Lagrange's multiplier rule $\nabla f=\lambda\nabla g$. In CSIR NET this section appears as Part B computations (classify the critical points, find a constrained maximum, compute an implicit derivative) and as Part C statements about when the theorems apply and what fails when their hypotheses do.

The Inverse Function Theorem

In one variable, if $f$ is $C^1$ and $f'(a)\ne0$, then $f'$ keeps one sign near $a$, so $f$ is strictly monotone on an interval around $a$ and has a differentiable inverse there with $(f^{-1})'(f(x))=1/f'(x)$ (§3.3). In several variables monotonicity is not available, and we need a genuinely new argument — the contraction principle.

📘 Definition 6.7 — Diffeomorphisms
Let $U,W\subseteq\mathbb{R}^n$ be open. A bijection $f:U\to W$ is a $C^1$-diffeomorphism if $f$ and $f^{-1}$ are both $C^1$. A $C^1$ map $f:U\to\mathbb{R}^n$ is a local diffeomorphism at $a\in U$ if there are open sets $V\ni a$ and $W\ni f(a)$ such that $f$ maps $V$ bijectively onto $W$ and $(f|_V)^{-1}:W\to V$ is $C^1$.

If $f$ has a differentiable inverse $g$ near $f(a)$, then $g\circ f=\mathrm{id}$ near $a$, and the chain rule (§6.1) gives $Dg(f(a))\,Df(a)=I$. So an invertible derivative is necessary for a differentiable inverse. It is not necessary for a continuous inverse: $f(x)=x^3$ is a homeomorphism of $\mathbb{R}$ with $f'(0)=0$, and its inverse $\sqrt[3]{y}$ is not differentiable at $0$.

📐 Theorem 6.11 — Contraction principle in $\mathbb{R}^n$
Let $K\subseteq\mathbb{R}^n$ be closed and $\varphi:K\to K$ a contraction: $\|\varphi(x)-\varphi(y)\|\le q\|x-y\|$ for all $x,y\in K$, with a constant $q\lt1$. Then $\varphi$ has exactly one fixed point $x^\ast\in K$, and for every $x_0\in K$ the iterates $x_{k+1}=\varphi(x_k)$ converge to $x^\ast$ with $\|x_k-x^\ast\|\le\dfrac{q^k}{1-q}\|x_1-x_0\|$.

Proof. By induction $\|x_{k+1}-x_k\|\le q^k\|x_1-x_0\|$, so for $l\gt k$, $\|x_l-x_k\|\le(q^k+\cdots+q^{l-1})\|x_1-x_0\|$, which is at most $\frac{q^k}{1-q}\|x_1-x_0\|$. Thus $(x_k)$ is Cauchy; it converges in $\mathbb{R}^n$ (completeness, applied coordinatewise, §2.1) to some $x^\ast$, which lies in $K$ because $K$ is closed. A contraction is continuous, so $x^\ast=\lim x_{k+1}=\lim\varphi(x_k)=\varphi(x^\ast)$. If also $\varphi(y^\ast)=y^\ast$, then $\|x^\ast-y^\ast\|\le q\|x^\ast-y^\ast\|$ forces $x^\ast=y^\ast$. Letting $l\to\infty$ in the Cauchy estimate gives the error bound. ∎ (The same proof works in any complete metric space — Banach's fixed point theorem, §7.1.)

📐 Theorem 6.12 — Inverse function theorem
Let $U\subseteq\mathbb{R}^n$ be open, $f:U\to\mathbb{R}^n$ of class $C^1$, $a\in U$, and suppose $Df(a)$ is invertible, i.e. $\det J_f(a)\ne0$. Then there are open sets $V\ni a$ and $W\ni f(a)$ such that $f$ maps $V$ bijectively onto $W$, the inverse $g=(f|_V)^{-1}:W\to V$ is $C^1$, and $$Dg(y)=\left[Df(g(y))\right]^{-1}\qquad(y\in W).$$ If $f$ is $C^k$ ($1\le k\le\infty$), so is $g$.

Proof (with all key steps). Let $A=Df(a)$. Step 1 (a contraction for each target). For $y\in\mathbb{R}^n$ put $\varphi_y(x)=x+A^{-1}\left(y-f(x)\right)$. Then $f(x)=y$ if and only if $x$ is a fixed point of $\varphi_y$, and $D\varphi_y(x)=I-A^{-1}Df(x)$, which is $0$ at $x=a$. Since $Df$ is continuous, choose $r\gt0$ with $\overline B(a,r)\subseteq U$ and $\|I-A^{-1}Df(x)\|\le\tfrac12$ for $\|x-a\|\le r$. By the mean value inequality (Theorem 6.8),

$$\|\varphi_y(x_1)-\varphi_y(x_2)\|\le\tfrac12\|x_1-x_2\|\qquad(x_1,x_2\in\overline B(a,r)).$$

Step 2 (injectivity and a Lipschitz inverse). For $x_1,x_2\in\overline B(a,r)$,

$$x_1-x_2=\left(\varphi_y(x_1)-\varphi_y(x_2)\right)+A^{-1}\left(f(x_1)-f(x_2)\right),$$

so $\|x_1-x_2\|\le\tfrac12\|x_1-x_2\|+\|A^{-1}\|\,\|f(x_1)-f(x_2)\|$, that is,

$$\|x_1-x_2\|\le2\|A^{-1}\|\,\|f(x_1)-f(x_2)\|.$$

In particular $f$ is injective on $\overline B(a,r)$, and its inverse, defined on the image, is Lipschitz with constant $2\|A^{-1}\|$.

Step 3 (the image is open). Let $x_0\in B(a,r)$, $y_0=f(x_0)$, and choose $\rho\gt0$ with $\overline B(x_0,\rho)\subseteq B(a,r)$. Suppose $\|y-y_0\|\lt\rho/(2\|A^{-1}\|)$ and $\|x-x_0\|\le\rho$. Since $\varphi_y(x_0)-x_0=A^{-1}(y-y_0)$,

$$\|\varphi_y(x)-x_0\|\le\|\varphi_y(x)-\varphi_y(x_0)\|+\|A^{-1}(y-y_0)\|,$$

which is less than $\tfrac12\rho+\tfrac12\rho=\rho$. So $\varphi_y$ maps the closed ball $\overline B(x_0,\rho)$ into itself and is a contraction there; by Theorem 6.11 it has a fixed point, i.e. $y=f(x)$ for some $x$ in that ball. Hence $f(B(a,r))$ is open, and we take $W=f(B(a,r))$, $V=B(a,r)$.

Step 4 (differentiability of $g$). Shrinking $r$ if necessary, $Df(x)$ is invertible for $x\in V$ (the determinant is continuous and nonzero at $a$). Fix $y\in W$, $x=g(y)$, $B=Df(x)$, and for small $k$ let $h=g(y+k)-x$, so $f(x+h)=y+k$ and $\|h\|\le2\|A^{-1}\|\,\|k\|$. Then

$$g(y+k)-g(y)-B^{-1}k=h-B^{-1}\left(f(x+h)-f(x)\right)=-B^{-1}\left(f(x+h)-f(x)-Bh\right),$$

whose norm divided by $\|k\|$ is at most $\|B^{-1}\|\cdot\dfrac{\|f(x+h)-f(x)-Bh\|}{\|h\|}\cdot2\|A^{-1}\|\to0$ as $k\to0$ (then $h\to0$). So $Dg(y)=Df(g(y))^{-1}$. Step 5 (continuity of $Dg$). $y\mapsto Dg(y)$ is the composite of the continuous maps $g$, $Df$ and matrix inversion (whose entries are rational functions of the entries, by the adjugate formula), hence continuous; the $C^k$ statement follows by induction from the same formula. ∎

The theorem is strictly local. An invertible derivative at every point does not give a global inverse, and the $C^1$ hypothesis cannot be weakened to mere differentiability (Exercise I.4).

✏️ Example 1 — Locally invertible everywhere, globally not
(a) Let $F(x,y)=(x^2-y^2,\ 2xy)$. Find where $F$ is a local diffeomorphism, compute $DG(-3,4)$ for the local inverse $G$ with $G(-3,4)=(1,2)$, and show that $F$ is not injective on $\mathbb{R}^2\setminus\{0\}$. (b) Do the same analysis for $E(x,y)=(e^x\cos y,\ e^x\sin y)$.
(a) Jacobian $J_F=\begin{pmatrix}2x&-2y\\2y&2x\end{pmatrix}$, $\det J_F=4(x^2+y^2)$. By Theorem 6.12, $F$ is a local diffeomorphism at every point except the origin. (At the origin it is not: $F(-p)=F(p)$ for all $p$, so $F$ is not injective on any neighbourhood of $0$.)
(a) Inverse $F(1,2)=(1-4,\ 4)=(-3,4)$ and $J_F(1,2)=\begin{pmatrix}2&-4\\4&2\end{pmatrix}$ with determinant $20$. Hence $$DG(-3,4)=\frac1{20}\begin{pmatrix}2&4\\-4&2\end{pmatrix}=\begin{pmatrix}0.1&0.2\\-0.2&0.1\end{pmatrix}.$$ Check: the product with $J_F(1,2)$ is $I$.
(a) Not injective $F(1,2)=F(-1,-2)$. In complex notation $F$ is $z\mapsto z^2$: every nonzero $w$ has two square roots. So $F$ is locally but not globally invertible on $\mathbb{R}^2\setminus\{0\}$; it is injective on the half-plane $x\gt0$ (Exercise I.2).
(b) $J_E=\begin{pmatrix}e^x\cos y&-e^x\sin y\\e^x\sin y&e^x\cos y\end{pmatrix}$, $\det J_E=e^{2x}\gt0$ everywhere: a local diffeomorphism at every point of $\mathbb{R}^2$. Yet $E(x,y+2\pi)=E(x,y)$, so $E$ is infinitely-many-to-one; its image is $\mathbb{R}^2\setminus\{0\}$ ($e^x$ is any positive radius, $y$ any angle). In complex notation $E(z)=e^z$, and its local inverses are the branches of the logarithm.

The Implicit Function Theorem

A curve such as $x^3+y^3=3xy$ is given by an equation, not as a graph. Near which of its points can we solve for $y$ as a function of $x$? For a linear equation $ax+by=0$ the answer is "when $b\ne0$". For $F(x,y)=0$ the implicit function theorem gives the same answer with $b$ replaced by $\partial F/\partial y$; and it does so for systems. We write points of $\mathbb{R}^{n+m}$ as $(x,y)$ with $x\in\mathbb{R}^n$, $y\in\mathbb{R}^m$, and for $F:\mathbb{R}^{n+m}\to\mathbb{R}^m$ we split the Jacobian into the $m\times n$ block $D_xF$ and the square $m\times m$ block $D_yF=\left[\partial F_i/\partial y_j\right]$.

📐 Theorem 6.13 — Implicit function theorem
Let $\Omega\subseteq\mathbb{R}^{n+m}$ be open, $F:\Omega\to\mathbb{R}^m$ of class $C^1$, $(a,b)\in\Omega$ with $F(a,b)=0$, and suppose $D_yF(a,b)$ is invertible. Then there are open sets $A\ni a$ in $\mathbb{R}^n$ and $B\ni b$ in $\mathbb{R}^m$ and a unique function $g:A\to B$ such that $$\{(x,y)\in A\times B:F(x,y)=0\}=\{(x,g(x)):x\in A\}.$$ Moreover $g$ is $C^1$, $g(a)=b$, and $Dg(x)=-\left[D_yF(x,g(x))\right]^{-1}D_xF(x,g(x))$. If $F$ is $C^k$, so is $g$. For one equation in two variables: if $F(a,b)=0$ and $F_y(a,b)\ne0$, then near $(a,b)$ the zero set is a graph $y=g(x)$ with $g'(x)=-\dfrac{F_x}{F_y}$; for $F(x,y,z)=0$ with $F_z\ne0$: $z_x=-\dfrac{F_x}{F_z}$, $z_y=-\dfrac{F_y}{F_z}$.

Proof. Define $\Phi:\Omega\to\mathbb{R}^{n+m}$ by $\Phi(x,y)=(x,F(x,y))$. It is $C^1$, $\Phi(a,b)=(a,0)$, and in block form

$$J_\Phi(a,b)=\begin{pmatrix}I_n&0\\D_xF(a,b)&D_yF(a,b)\end{pmatrix},$$

whose determinant is $\det D_yF(a,b)\ne0$. By the inverse function theorem there are open sets $V\ni(a,b)$, $W\ni(a,0)$ with $\Phi:V\to W$ a $C^1$-diffeomorphism; shrinking, we may take $V=A'\times B$ to be a product of open balls. Since $\Phi$ does not change the first component, its inverse has the form $\Psi(u,v)=(u,h(u,v))$ with $h$ of class $C^1$. Let $A=\{x\in A':(x,0)\in W\}$ (open, contains $a$) and $g(x)=h(x,0)$. For $x\in A$, $\Phi(x,g(x))=\Phi(\Psi(x,0))=(x,0)$, so $F(x,g(x))=0$ and $g(x)\in B$. Conversely, if $(x,y)\in A\times B$ and $F(x,y)=0$, then $\Phi(x,y)=(x,0)$, hence $(x,y)=\Psi(x,0)=(x,g(x))$. So the zero set in $A\times B$ is exactly the graph of $g$, which also proves uniqueness. Finally, differentiating $F(x,g(x))=0$ by the chain rule gives $D_xF+D_yF\,Dg=0$; $D_yF(x,g(x))$ stays invertible for $x$ near $a$ (shrink $A$ if needed), which yields the formula for $Dg$. ∎

✏️ Example 2 — Where can the folium be solved for $y$?
Let $F(x,y)=x^3+y^3-3xy$. (a) Find all points of the curve $F=0$ at which the implicit function theorem does not let us write $y=g(x)$. (b) Check that $\left(\tfrac32,\tfrac32\right)$ is on the curve and find $g'\!\left(\tfrac32\right)$ and $g''\!\left(\tfrac32\right)$ for the local solution through it.
(a) We need $F=0$ and $F_y=3y^2-3x=0$, i.e. $x=y^2$. Substituting, $y^6+y^3-3y^3=y^3(y^3-2)=0$: $y=0$ (point $(0,0)$) or $y=2^{1/3}$ (point $(2^{2/3},2^{1/3})\approx(1.587,1.260)$). At the second point $F_x=3x^2-3y=3\cdot2^{1/3}(2-1)\ne0$, so $x$ is a $C^1$ function of $y$ there — the tangent is vertical. At the origin $F_x=F_y=0$: two branches of the curve cross, and neither variable is a function of the other near $0$.
(b) Slope $\tfrac{27}8+\tfrac{27}8-\tfrac{27}4=0$ ✓. $g'=-\dfrac{F_x}{F_y}=-\dfrac{x^2-y}{y^2-x}$, which at $\left(\tfrac32,\tfrac32\right)$ is $-\dfrac{3/4}{3/4}=-1$ (as the symmetry $x\leftrightarrow y$ of the curve predicts).
(b) Second derivative Differentiate $x^2+y^2y'-y-xy'=0$ (that is, $F_x+F_yy'=0$ divided by $3$) once more: $2x+2y(y')^2+y^2y''-y'-y'-xy''=0$. At the point, with $y'=-1$: $3+3+\tfrac94y''+2-\tfrac32y''=0$, so $\tfrac34y''=-8$ and $g''\!\left(\tfrac32\right)=-\tfrac{32}3$.
Check A numerical root-finder applied to $F(x,y)=0$ near $x=1.5\pm0.001$ reproduces $g'\approx-1$ and $g''\approx-10.67$.
✏️ Example 3 — A system of two equations
Show that near $(x,y,u,v)=(1,1,0,1)$ the system $u^3+xv-y=0$, $\ v^3+yu-x=0$ defines $u,v$ as $C^1$ functions of $(x,y)$, and compute $u_x,u_y,v_x,v_y$ at $(1,1)$.
Check the point $0+1-1=0$ and $1+0-1=0$ ✓.
Blocks With unknowns $(u,v)$: $D_{(u,v)}F=\begin{pmatrix}3u^2&x\\y&3v^2\end{pmatrix}=\begin{pmatrix}0&1\\1&3\end{pmatrix}$, determinant $-1\ne0$; so Theorem 6.13 applies. $D_{(x,y)}F=\begin{pmatrix}v&-1\\-1&u\end{pmatrix}=\begin{pmatrix}1&-1\\-1&0\end{pmatrix}$.
Formula $\begin{pmatrix}0&1\\1&3\end{pmatrix}^{-1}=\begin{pmatrix}-3&1\\1&0\end{pmatrix}$, so $$\begin{pmatrix}u_x&u_y\\v_x&v_y\end{pmatrix}=-\begin{pmatrix}-3&1\\1&0\end{pmatrix}\begin{pmatrix}1&-1\\-1&0\end{pmatrix}=\begin{pmatrix}4&-3\\-1&1\end{pmatrix}.$$
Check Differentiate the first equation in $x$: $3u^2u_x+v+xv_x=0$, i.e. $0+1+v_x=0$, so $v_x=-1$ ✓; the second: $3v^2v_x+yu_x-1=0$, i.e. $-3+u_x-1=0$, so $u_x=4$ ✓.
✏️ Example 4 — When $F_y=0$: anything can happen
In each case $F(0,0)=0$ and $F_y(0,0)=0$. Describe the zero set of $F$ near the origin: (a) $F=y^3-x$; (b) $F=(y-x)^2$; (c) $F=x^2-y^2$; (d) $F=x^2+y^2$. What does this say about the hypothesis of Theorem 6.13?
(a) The zero set is the graph of $y=\sqrt[3]{x}$: a unique continuous solution, which is not differentiable at $0$. ($F_x=-1\ne0$, so $x=y^3$ is a smooth function of $y$.)
(b) The zero set is the line $y=x$, the graph of a $C^\infty$ function, although $\nabla F(0,0)=0$. The theorem's conclusion holds without its hypothesis.
(c) Two crossing lines $y=\pm x$: for every $x\ne0$ near $0$ there are two values of $y$, so the zero set is not a graph over $x$ (nor over $y$) on any neighbourhood.
(d) A single point: for $x\ne0$ there is no solution at all.
Moral $D_yF(a,b)$ invertible is sufficient, not necessary. When it fails, the zero set may be a smooth graph, a non-differentiable graph, several branches, or a point. A CSIR option "the IFT fails, so $y$ is not a function of $x$" is always false as a general implication.
Interactive 1 — Walking Along a Curve $F(x,y)=0$

A point travels along the curve; the purple line is the tangent, perpendicular to $\nabla F$ (green). Where $F_y\ne0$ the implicit function theorem writes the curve locally as $y=g(x)$ with slope $-F_x/F_y$. The animation pauses at the special points: amber rings mark vertical tangents ($F_y=0\ne F_x$, so $x=h(y)$ instead), red rings mark singular points ($\nabla F=0$, where the theorem is silent). The right panel zooms in: at regular points the curve looks like its tangent line.

point (x, y)—
F_x—
F_y—
dy/dx = −F_x/F_y—

Two consequences are used constantly. First, if $F:\mathbb{R}^n\to\mathbb{R}$ is $C^1$ and $\nabla F\ne0$ at every point of the level set $S=\{F=c\}$, then near each of its points $S$ is the graph of a $C^1$ function of $n-1$ of the variables (solve for a variable whose partial derivative is nonzero): $S$ is a smooth hypersurface, and its tangent plane at $p$ is $\nabla F(p)\cdot(x-p)=0$. Second, the same holds for $k$ equations $G=(G_1,\dots,G_k)=0$ at points where $DG$ has rank $k$: some $k\times k$ minor is invertible, and Theorem 6.13 solves for those $k$ variables.

Local Extrema and the Hessian Test

📘 Definition 6.8 — Local extrema, critical points, saddle points
Let $f:U\to\mathbb{R}$, $U\subseteq\mathbb{R}^n$ open. $a\in U$ is a local minimum (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$. If $f$ is differentiable at $a$ and $\nabla f(a)=0$, $a$ is a critical (stationary) point. A critical point that is neither a local maximum nor a local minimum is a saddle point.
📘 Definition 6.9 — Definiteness of a symmetric matrix

A real symmetric $n\times n$ matrix $H$, or its quadratic form $Q(h)=h^{\mathsf T}Hh$, is positive definite if $Q(h)\gt0$ for all $h\ne0$; negative definite if $Q(h)\lt0$ for all $h\ne0$; positive (negative) semidefinite if $Q\ge0$ ($Q\le0$); and indefinite if $Q$ takes both signs. Equivalently (spectral theorem, §10.2): all eigenvalues $\gt0$; all $\lt0$; all $\ge0$ (all $\le0$); eigenvalues of both signs. Sylvester's criterion (§10.3): $H$ is positive definite iff all leading principal minors are positive, and negative definite iff they alternate in sign starting with a negative one. For $n=2$, $H=\begin{pmatrix}p&q\\q&s\end{pmatrix}$ is positive definite iff $p\gt0$ and $ps-q^2\gt0$, and indefinite iff $ps-q^2\lt0$.

The $2\times2$ case follows by completing the square: for $p\ne0$, $\ ph^2+2qhk+sk^2=p\left(h+\tfrac qpk\right)^2+\tfrac{ps-q^2}{p}k^2$. If $p\gt0$ and $ps-q^2\gt0$ both terms are $\ge0$ and they vanish together only for $h=k=0$. If $ps-q^2\lt0$ and $p\ne0$, the values $Q(1,0)=p$ and $Q(-q,p)=p(ps-q^2)$ have opposite signs; if $p=0$, then $q\ne0$ and $Q(h,k)=k(2qh+sk)$ takes both signs. Either way $Q$ is indefinite.

📐 Theorem 6.14 — Necessary conditions for a local extremum
Let $f:U\to\mathbb{R}$ have a local extremum at $a\in U$. (a) If $f$ is differentiable at $a$, then $\nabla f(a)=0$ (Fermat). (b) If $f\in C^2(U)$ and $a$ is a local minimum (maximum), then $H_f(a)$ is positive (negative) semidefinite.

Proof. For a unit vector $u$, $\varphi(t)=f(a+tu)$ has a local extremum at $t=0$. (a) $\varphi$ is differentiable at $0$ with $\varphi'(0)=\nabla f(a)\cdot u$, which vanishes by the one-variable interior extremum theorem (§3.3); taking $u=e_1,\dots,e_n$ gives $\nabla f(a)=0$. (b) Here $\varphi$ is $C^2$ with $\varphi'(0)=0$ and $\varphi''(0)=u^{\mathsf T}H_f(a)u$ (Theorem 6.10's computation). If $\varphi''(0)\lt0$ at a local minimum, Taylor's theorem would give $\varphi(t)\lt\varphi(0)$ for small $t\ne0$. So $u^{\mathsf T}H_f(a)u\ge0$ for every $u$. ∎

📐 Theorem 6.15 — Second derivative test
Let $f\in C^2(U)$ and let $a\in U$ be a critical point, $H=H_f(a)$.
  1. If $H$ is positive definite, $a$ is a strict local minimum.
  2. If $H$ is negative definite, $a$ is a strict local maximum.
  3. If $H$ is indefinite, $a$ is a saddle point.
  4. If $H$ is semidefinite but singular ($\det H=0$), the test is inconclusive.
In two variables, with $D=f_{xx}f_{yy}-f_{xy}^2$ evaluated at $a$: $D\gt0,\ f_{xx}\gt0\Rightarrow$ strict local minimum; $D\gt0,\ f_{xx}\lt0\Rightarrow$ strict local maximum; $D\lt0\Rightarrow$ saddle; $D=0\Rightarrow$ no conclusion.

Proof. (1) The unit sphere $\{\|u\|=1\}$ is compact and $u\mapsto u^{\mathsf T}Hu$ is continuous and positive on it, so it has a positive minimum $m$ (extreme value theorem; in fact $m$ is the smallest eigenvalue of $H$). Since the second partials are continuous, choose $r\gt0$ with $B(a,r)\subseteq U$ and $\|H_f(c)-H\|\lt m/2$ for $c\in B(a,r)$. For $0\lt\|h\|\lt r$, Taylor's theorem (Theorem 6.10, $k=1$) gives $f(a+h)=f(a)+\tfrac12h^{\mathsf T}H_f(c)h$ for some $c$ on the segment, and

$$h^{\mathsf T}H_f(c)h\ge h^{\mathsf T}Hh-\|H_f(c)-H\|\,\|h\|^2\ge m\|h\|^2-\tfrac m2\|h\|^2\gt0.$$

So $f(a+h)\gt f(a)$. (2) Apply (1) to $-f$. (3) If $u^{\mathsf T}Hu\gt0$ and $w^{\mathsf T}Hw\lt0$, then $t\mapsto f(a+tu)$ has a strict local minimum at $0$ and $t\mapsto f(a+tw)$ a strict local maximum (one-variable second derivative test), so every ball about $a$ contains points with $f\gt f(a)$ and points with $f\lt f(a)$. (4) $x^2+y^4$, $x^2-y^4$ and $x^2+y^3$ all have Hessian $\begin{pmatrix}2&0\\0&0\end{pmatrix}$ at the origin; the first has a minimum there, the second a saddle, and the third takes both signs (no extremum). The two-variable form follows from the $2\times2$ criterion of Definition 6.9 (note $D=\det H$). ∎

✏️ Example 5 — Classifying critical points
Find and classify the critical points of $f(x,y)=x^3+y^3-3xy$. Is any of them a global extremum?
Critical points $f_x=3x^2-3y=0$ and $f_y=3y^2-3x=0$ give $y=x^2$ and $x=y^2=x^4$, so $x(x^3-1)=0$: $x=0$ or $x=1$. Critical points $(0,0)$ and $(1,1)$.
Hessian $f_{xx}=6x$, $f_{yy}=6y$, $f_{xy}=-3$, so $D=36xy-9$.
Classify At $(0,0)$: $D=-9\lt0$, a saddle (indeed $f(t,t)=2t^3-3t^2\lt0$ and $f(t,-t)=3t^2\gt0$ for small $t\ne0$). At $(1,1)$: $D=27\gt0$, $f_{xx}=6\gt0$: a strict local minimum with $f(1,1)=-1$.
Global? No: $f(x,0)=x^3$ is unbounded in both directions, so $f$ has neither a global minimum nor a global maximum. A local minimum that is the only critical point of a function on $\mathbb{R}^2$ need not even be global (Exercise III.8) — unlike in one variable.
✏️ Example 6 — A minimum on every line, but not a minimum (Peano)
Let $f(x,y)=(y-x^2)(y-2x^2)=y^2-3x^2y+2x^4$. Show that the origin is the only critical point, that the restriction of $f$ to every line through the origin has a strict local minimum at $0$, and yet $f$ has no local minimum at $(0,0)$.
Critical point $f_y=2y-3x^2=0$ gives $y=\tfrac32x^2$, and then $f_x=-6xy+8x^3=-9x^3+8x^3=-x^3=0$ forces $x=0$. Only $(0,0)$. There $H=\begin{pmatrix}0&0\\0&2\end{pmatrix}$: positive semidefinite and singular — Theorem 6.15 is silent.
Every line On $y=mx$: $f=x^2(m-x)(m-2x)=m^2x^2-3mx^3+2x^4$. For $m\ne0$ the $x^2$ term dominates near $0$, so $f\gt0=f(0,0)$ for small $x\ne0$. For $m=0$, $f=2x^4\gt0$; on the $y$-axis $f=y^2\gt0$. So every line has a strict local minimum at the origin.
Not a minimum Between the parabolas, on $y=\tfrac32x^2$: $f=\left(\tfrac12x^2\right)\left(-\tfrac12x^2\right)=-\tfrac14x^4\lt0$, at points arbitrarily close to $0$.
Moral Lines through $a$ see only the restriction of $f$ to straight lines; the region $x^2\lt y\lt2x^2$ where $f\lt0$ is a thin "horn" that every line leaves before $f$ becomes negative. Interactive 2 shows the horn and the slices.
Interactive 2 — Slicing a Surface Through a Critical Point

Left: the sign of $f(a+h)-f(a)$ near the critical point $a$ (red: above $f(a)$, blue: below). The purple line through $a$ turns with angle $\theta$; on the right is the slice $g(t)=f(a+tu)-f(a)$ along it, with the parabola $\tfrac12(u^{\mathsf T}Hu)\,t^2$ predicted by the Hessian (dashed green). Positive definite $H$: every slice bends up. Indefinite: some up, some down. Semidefinite: the Hessian cannot decide — compare the Peano surface with the monkey saddle.

θ—
uᵀHu = g″(0)—
det H—
along this line—
🧭 Global extrema on a closed bounded set
  1. A continuous $f$ on a closed bounded $K\subseteq\mathbb{R}^n$ attains a maximum and a minimum (extreme value theorem; $K$ is compact by Heine–Borel, §7.2).
  2. Candidates in the interior of $K$: critical points of $f$ (and points where $f$ is not differentiable). No second-derivative test is needed — you will compare values.
  3. Candidates on the boundary: parametrise it (a circle by $(\cos t,\sin t)$, a segment by $a+t(b-a)$) and solve a one-variable problem, or use Lagrange multipliers (below). Include corners.
  4. Evaluate $f$ at all candidates; the largest value is the maximum and the smallest the minimum.

Constrained Extrema and Lagrange Multipliers

We now look for extrema of $f$ not on an open set but on a constraint set $M=\{x:g_1(x)=\cdots=g_k(x)=0\}$ — the hottest point of a metal sphere, the cheapest design of given volume, the largest value of a quadratic form on the unit sphere. At such a point the gradient of $f$ need not vanish; it must only be perpendicular to $M$, which means that it is a combination of the normals $\nabla g_i$.

📐 Theorem 6.16 — Lagrange multiplier theorem
Let $U\subseteq\mathbb{R}^n$ be open, $f,g_1,\dots,g_k\in C^1(U)$ with $k\lt n$, $M=\{x\in U:g(x)=0\}$ where $g=(g_1,\dots,g_k)$, and let $a\in M$ be a local extremum of $f|_M$ (i.e. $f(x)\le f(a)$, or $\ge$, for all $x\in M$ near $a$). If the gradients $\nabla g_1(a),\dots,\nabla g_k(a)$ are linearly independent (equivalently $Dg(a)$ has rank $k$), then there are unique $\lambda_1,\dots,\lambda_k\in\mathbb{R}$ 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 the Lagrangian $\mathcal{L}(x,\lambda)=f(x)-\lambda\cdot g(x)$.

Proof. Let $T=\ker Dg(a)=\{v:\nabla g_i(a)\cdot v=0\text{ for all }i\}$, a subspace of dimension $n-k$ (rank–nullity, §8.2). Claim: every $v\in T$ is the velocity of a $C^1$ curve in $M$. Because $Dg(a)$ has rank $k$, some $k$ columns of it form an invertible matrix; renumbering the coordinates, write $x=(x',x'')$ with $x''\in\mathbb{R}^k$ and $D_{x''}g(a)$ invertible. By Theorem 6.13, near $a$ the set $M$ is the graph $x''=\varphi(x')$ of a $C^1$ map, and differentiating $g(x',\varphi(x'))=0$ gives $D_{x'}g+D_{x''}g\,D\varphi=0$ at $a'$. For $v=(v',v'')\in T$ we have $D_{x'}g\,v'+D_{x''}g\,v''=0$, hence $v''=-(D_{x''}g)^{-1}D_{x'}g\,v'=D\varphi(a')v'$. The curve $\gamma(t)=\left(a'+tv',\ \varphi(a'+tv')\right)$ lies in $M$, $\gamma(0)=a$ and $\gamma'(0)=(v',D\varphi(a')v')=v$.

Now $t\mapsto f(\gamma(t))$ has a local extremum at $t=0$, so $0=(f\circ\gamma)'(0)=\nabla f(a)\cdot v$. Thus $\nabla f(a)$ is orthogonal to $T$. But $T$ is the orthogonal complement of the span $R$ of $\nabla g_1(a),\dots,\nabla g_k(a)$, and $T^\perp=(R^\perp)^\perp=R$ in finite dimensions (§10.1). Hence $\nabla f(a)\in R$, which is the multiplier equation; the $\lambda_i$ are unique because the $\nabla g_i(a)$ are independent. ∎

The rank condition matters. Minimise $f(x,y)=x$ on $M=\{y^2=x^3\}$. On $M$, $x=y^{2/3}\ge0$, so the minimum is at $(0,0)$. But $\nabla g=(-3x^2,2y)$ vanishes there, and $\nabla f=(1,0)=\lambda(0,0)$ is impossible: a pure multiplier search misses the answer. Always add the points of $M$ where the $\nabla g_i$ are dependent to the candidate list. (For a second-order check, one examines the Hessian of $\mathcal{L}$ in $x$ restricted to $T$: positive definite there gives a strict local minimum on $M$. In practice, on a compact $M$ one simply compares values.)

🧭 The Lagrange method
  1. Check that the constraint set is closed and bounded (then the extrema exist) — or argue existence otherwise.
  2. Solve the $n+k$ equations $\nabla f=\sum\lambda_i\nabla g_i$, $g_1=\cdots=g_k=0$ for $x$ (and $\lambda$). Eliminating $\lambda$ early (by ratios or cross-multiplication) usually helps.
  3. Add the points of $M$ where $\nabla g_1,\dots,\nabla g_k$ are linearly dependent.
  4. Evaluate $f$ at all candidates and compare.
📐 Theorem 6.17 — Extrema of a quadratic form on the sphere (Rayleigh)
Let $A$ be a real symmetric $n\times n$ matrix and $Q(x)=x^{\mathsf T}Ax$. On the unit sphere $S=\{\|x\|=1\}$, $Q$ attains its maximum and minimum; every constrained critical point $x$ of $Q|_S$ is a unit eigenvector, $Ax=\lambda x$, with $Q(x)=\lambda$. Hence $\max_SQ=\lambda_{\max}$ and $\min_SQ=\lambda_{\min}$, the largest and smallest eigenvalues of $A$; in particular every real symmetric matrix has a real eigenvalue.

Proof. $S$ is closed and bounded and $Q$ is continuous, so the extrema are attained. With $g(x)=\|x\|^2-1$, $\nabla g=2x\ne0$ on $S$, and $\nabla Q=2Ax$ (because $A$ is symmetric: $Q(x+h)=Q(x)+2h^{\mathsf T}Ax+Q(h)$). Theorem 6.16 gives $2Ax=\lambda\cdot2x$ at every constrained critical point, and then $Q(x)=x^{\mathsf T}(\lambda x)=\lambda$. The maximum point is therefore an eigenvector whose eigenvalue is the maximum value; since every eigenvalue $\mu$ with unit eigenvector $v$ satisfies $\mu=Q(v)\le\max_SQ$, the maximum is $\lambda_{\max}$. The minimum is similar. ∎

✏️ Example 7 — Two constraints
Find the points of the curve $C=\{x^2+y^2=1,\ x+y+z=1\}$ (a cylinder cut by a plane) nearest to and farthest from the origin.
Set-up Minimise and maximise $f=x^2+y^2+z^2$ on $C$, which is closed and bounded ($|x|,|y|\le1$, $|z|\le3$), so both extrema exist. With $g_1=x^2+y^2-1$, $g_2=x+y+z-1$: $\nabla g_1=(2x,2y,0)$ and $\nabla g_2=(1,1,1)$ are independent on $C$ (the first is nonzero, and it has third component $0$).
Equations $(2x,2y,2z)=\lambda(2x,2y,0)+\mu(1,1,1)$. The third component gives $\mu=2z$; then $2x(1-\lambda)=2z=2y(1-\lambda)$. Either $\lambda=1$ and $z=0$, or $\lambda\ne1$ and $x=y$.
Candidates $z=0$: $x+y=1$ and $x^2+y^2=1$, so $xy=0$: the points $(1,0,0)$ and $(0,1,0)$, with $f=1$. $x=y$: $x=y=\pm\tfrac1{\sqrt2}$, $z=1\mp\sqrt2$, with $f=1+(1\mp\sqrt2)^2=4\mp2\sqrt2$, i.e. $\approx1.172$ and $\approx6.828$.
Answer Nearest points $(1,0,0)$ and $(0,1,0)$, at distance $1$; farthest point $\left(-\tfrac1{\sqrt2},-\tfrac1{\sqrt2},1+\sqrt2\right)$, at distance $\sqrt{4+2\sqrt2}\approx2.613$. The fourth candidate $\left(\tfrac1{\sqrt2},\tfrac1{\sqrt2},1-\sqrt2\right)$ is a local maximum of the distance along $C$, but not a global extremum. (Check without multipliers: on $C$, $f=1+z^2$ with $z=1-(x+y)$ and $x+y\in[-\sqrt2,\sqrt2]$.)
⚠️ Counterexamples and pitfalls
  1. Local, not global inversion. $(e^x\cos y,e^x\sin y)$ has $\det J=e^{2x}\gt0$ everywhere and is not injective; $(x^2-y^2,2xy)$ is a local diffeomorphism off the origin and two-to-one.
  2. $C^1$ is needed. $f(x)=x+2x^2\sin\frac1x$, $f(0)=0$: $f'(0)=1$ but $f$ is not injective on any interval about $0$ ($f'$ takes the value $-1$ arbitrarily close to $0$).
  3. Invertible derivative is not necessary for a (continuous) inverse. $x^3$ is a homeomorphism of $\mathbb{R}$ with $f'(0)=0$; its inverse is not differentiable at $0$.
  4. $F_y=0$ does not mean "no implicit function". $(y-x)^2=0$ is the smooth graph $y=x$; $y^3=x$ is a continuous graph; $x^2=y^2$ is two branches; $x^2+y^2=0$ is a point.
  5. Critical point $\not\Rightarrow$ extremum. $x^3$ at $0$; $x^2-y^2$ at the origin (saddle).
  6. Semidefinite Hessian decides nothing. $x^2+y^4$ (minimum), $x^2-y^4$ (saddle), $x^2+y^3$ (no extremum) share the Hessian $\mathrm{diag}(2,0)$ at $0$.
  7. Minimum on every line $\not\Rightarrow$ local minimum. $(y-x^2)(y-2x^2)$ at the origin (Peano).
  8. A unique critical point that is a local minimum need not be global in two variables: $x^2+y^2(1-x)^3$ (Exercise III.8). In one variable it must be.
  9. $D\gt0$ alone does not give a minimum — the sign of $f_{xx}$ decides between minimum and maximum; and $D\lt0$ never gives an extremum.
  10. Lagrange needs independent constraint gradients. The minimum of $x$ on $y^2=x^3$ is at the cusp $(0,0)$, where $\nabla g=0$ and no multiplier exists.
  11. Multiplier points are only candidates. In Example 7 one of the four is neither the nearest nor the farthest point; on non-compact constraint sets an extremum may not exist at all ($x+y$ on the hyperbola $xy=1$, $x\gt0$, has a minimum $2$ and no maximum).

Exercises

I
The inverse function theorem.
  • 1 Let $F(x,y)=(x+y,\ xy)$. Where does the inverse function theorem apply? Show that $F$ is injective on $\{x\gt y\}$, find $F(\{x\gt y\})$, and compute $D(F^{-1})(3,2)$ for the inverse of $F|_{\{x\gt y\}}$.
  • 2 For $F(x,y)=(x^2-y^2,\ 2xy)$, show that $F$ is injective on the half-plane $\{x\gt0\}$ and that $F(\{x\gt0\})=\mathbb{R}^2\setminus\{(u,0):u\le0\}$.
  • 3 For spherical coordinates, $(r,\varphi,\theta)\mapsto(x,y,z)$ with $x=r\sin\varphi\cos\theta$, $y=r\sin\varphi\sin\theta$, $z=r\cos\varphi$, compute the Jacobian determinant and find where the map is a local diffeomorphism.
  • 4 Let $f(x)=x+2x^2\sin\frac1x$ for $x\ne0$, $f(0)=0$. Show that $f'(0)=1$ but $f$ is not injective on any open interval containing $0$. Which hypothesis of Theorem 6.12 fails?
  • 5 Prove that if $f:U\to\mathbb{R}^n$ is differentiable at $a$ and has an inverse $g$ near $f(a)$ that is differentiable at $f(a)$, then $\det J_f(a)\ne0$. Use $f(x)=x^3$ to show that a continuous inverse can exist when $\det J_f(a)=0$.
  • 6 Let $F(x,y)=\left(x+\tfrac12\sin y,\ y+\tfrac12\sin x\right)$. Show that $\det J_F\ge\tfrac34$ everywhere and that $F$ is a bijection of $\mathbb{R}^2$ onto itself, hence a global $C^1$-diffeomorphism.
  • 7 Prove that if $F:U\to\mathbb{R}^n$ is $C^1$ with $\det J_F(x)\ne0$ for every $x\in U$, then $F(U)$ is open. Deduce that $E(x,y)=(e^x\cos y,e^x\sin y)$ has open image, and identify it.
1 $J_F=\begin{pmatrix}1&1\\y&x\end{pmatrix}$, $\det=x-y$: the theorem applies off the diagonal $x=y$. If $F(x,y)=(s,p)$, then $x,y$ are the roots of $t^2-st+p$; with $x\gt y$ they are $x=\frac{s+\sqrt{s^2-4p}}2$, $y=\frac{s-\sqrt{s^2-4p}}2$, uniquely determined. So $F$ is injective on $\{x\gt y\}$ with image $\{(s,p):s^2\gt4p\}$. $F(2,1)=(3,2)$ and $J_F(2,1)=\begin{pmatrix}1&1\\1&2\end{pmatrix}$ (determinant $1$), so $D(F^{-1})(3,2)=\begin{pmatrix}2&-1\\-1&1\end{pmatrix}$.
2 In complex form $F(z)=z^2$. If $z^2=w^2$ then $z=\pm w$, and $z,w$ cannot both have positive real part unless $z=w$: injective. Writing $z=re^{i\theta}$ with $|\theta|\lt\frac\pi2$, $z^2=r^2e^{2i\theta}$ with $|2\theta|\lt\pi$: every nonzero $w$ off the negative real axis, and nothing else (no $z$ with $x\gt0$ has $z^2\le0$).
3 Expanding the $3\times3$ determinant (in the order $r,\varphi,\theta$) gives $r^2\sin\varphi$; in the order $(r,\theta,\varphi)$ the sign changes. The map is a local diffeomorphism exactly where $r\ne0$ and $\sin\varphi\ne0$, i.e. at all points whose image is off the $z$-axis.
4 $\frac{f(h)-f(0)}h=1+2h\sin\frac1h\to1$. For $x\ne0$, $f'(x)=1+4x\sin\frac1x-2\cos\frac1x$; at $x_k=\frac1{2\pi k}$ this is $-1$, and at $y_k=\frac1{(2k+1)\pi}$ it is $3$. So every interval about $0$ contains points where $f'\lt0$; there $f$ is strictly decreasing on a small interval, while $f$ is increasing on small intervals around the $y_k$; a continuous injective function on an interval would be monotone. $f'$ is not continuous at $0$: the $C^1$ hypothesis fails.
5 $g\circ f=\mathrm{id}$ near $a$; the chain rule gives $Dg(f(a))Df(a)=I$, so $\det J_g(f(a))\det J_f(a)=1$. For $x^3$: $g(y)=\sqrt[3]y$ is a continuous inverse on all of $\mathbb{R}$, $f'(0)=0$, and $g$ is not differentiable at $0$ — consistent with the first part.
6 $\det J_F=\det\begin{pmatrix}1&\frac12\cos y\\\frac12\cos x&1\end{pmatrix}=1-\tfrac14\cos x\cos y\ge\tfrac34$. Let $\phi(p)=\left(\tfrac12\sin y,\tfrac12\sin x\right)$ for $p=(x,y)$; $\|D\phi\|\le\tfrac12$ (an anti-diagonal matrix with entries of size $\le\frac12$), so $\phi$ is a contraction with $q=\tfrac12$ by Theorem 6.8. $F(p)=w$ iff $p=w-\phi(p)$, and $p\mapsto w-\phi(p)$ is a contraction of $\mathbb{R}^2$: exactly one solution (Theorem 6.11). So $F$ is bijective; by Theorem 6.12 its inverse is $C^1$ near every point, hence on $\mathbb{R}^2$.
7 Each $a\in U$ has, by Theorem 6.12, an open $W\ni F(a)$ with $W=F(V)\subseteq F(U)$: so $F(U)$ is a union of open sets. For $E$: $\det J_E=e^{2x}\ne0$, and $E(\mathbb{R}^2)=\mathbb{R}^2\setminus\{0\}$ (polar coordinates with radius $e^x$), which is indeed open.
II
The implicit function theorem.
  • 1 Show that $xe^y+ye^x=0$ defines $y=g(x)$ near $(0,0)$, and find $g'(0)$ and $g''(0)$.
  • 2 At which points of the ellipse $x^2+xy+y^2=3$ does Theorem 6.13 fail to give $y$ as a $C^1$ function of $x$? Near those points, is $x$ a $C^1$ function of $y$?
  • 3 Show that $z^3+xz+y=0$ defines $z=g(x,y)$ near $(x,y,z)=(0,-1,1)$, and find $g_x(0,-1)$ and $g_y(0,-1)$.
  • 4 Show that $xu+yv^2=2$, $\ xv+yu^2=2$ define $u,v$ as $C^1$ functions of $(x,y)$ near $(x,y,u,v)=(1,1,1,1)$, and compute $u_x,u_y,v_x,v_y$ at $(1,1)$.
  • 5 Show that for every $x\in\mathbb{R}$ the equation $y^5+y=x$ has exactly one real solution $y=g(x)$, that $g\in C^\infty(\mathbb{R})$, and compute $g'(2)$ and $g''(2)$.
  • 6 Show that the hyperboloid $x^2+y^2-z^2=1$ is, near each of its points, the graph of a $C^1$ function of two of the coordinates, and find its tangent plane at $(1,1,1)$.
  • 7 Prove or disprove: if $F\in C^1(\mathbb{R}^2)$, $F(0,0)=0$ and $F_y(0,0)=0$, then there is no function $g$ on an interval about $0$ whose graph is the zero set of $F$ near the origin.
  • 8 Suppose $F(x,y,z)=0$ defines each variable as a $C^1$ function of the other two near a point where $F_x,F_y,F_z\ne0$. Prove that $\dfrac{\partial x}{\partial y}\cdot\dfrac{\partial y}{\partial z}\cdot\dfrac{\partial z}{\partial x}=-1$, and check it for $pV=nRT$ (an ideal gas, with $n,R$ constant).
1 $F_y=xe^y+e^x=1\ne0$ at $(0,0)$, so $g$ exists; $g'(0)=-F_x/F_y=-(e^y+ye^x)/1=-1$. Differentiating $xe^g+ge^x=0$ twice and putting $x=0$, $g=0$, $g'=-1$: $2e^gg'+xe^g(g')^2+xe^gg''+g''e^x+2g'e^x+ge^x=0$ becomes $-2+g''-2=0$, so $g''(0)=4$. (Series check: $g(x)=-x+2x^2-4x^3+\cdots$.)
2 $F_y=x+2y=0$ with $F=0$: $x=-2y$, $4y^2-2y^2+y^2=3$, $y=\pm1$: the points $(-2,1)$ and $(2,-1)$ (vertical tangents). There $F_x=2x+y=\mp3\ne0$, so $x$ is a $C^1$ function of $y$ near them.
3 $F(0,-1,1)=1+0-1=0$, $F_z=3z^2+x=3\ne0$. $g_x=-F_x/F_z=-z/3=-\tfrac13$ and $g_y=-F_y/F_z=-\tfrac13$.
4 Both equations hold at the point. $D_{(u,v)}F=\begin{pmatrix}x&2yv\\2yu&x\end{pmatrix}=\begin{pmatrix}1&2\\2&1\end{pmatrix}$, $\det=-3\ne0$; $D_{(x,y)}F=\begin{pmatrix}u&v^2\\v&u^2\end{pmatrix}=\begin{pmatrix}1&1\\1&1\end{pmatrix}$. Then $-\begin{pmatrix}1&2\\2&1\end{pmatrix}^{-1}\begin{pmatrix}1&1\\1&1\end{pmatrix}=-\tfrac{-1}{3}\begin{pmatrix}1&-2\\-2&1\end{pmatrix}\begin{pmatrix}1&1\\1&1\end{pmatrix}$, which gives $u_x=u_y=v_x=v_y=-\tfrac13$.
5 $h(y)=y^5+y$ is strictly increasing ($h'=5y^4+1\gt0$) and $h(y)\to\pm\infty$ as $y\to\pm\infty$, so $h$ is a bijection of $\mathbb{R}$ and $g=h^{-1}$. Since $h'\ne0$, $g$ is $C^\infty$ by Theorem 6.12 (with $n=1$). $g(2)=1$, $g'(2)=1/h'(1)=\tfrac16$, and differentiating $g'=1/h'(g)$: $g''=-h''(g)g'/h'(g)^2=-\dfrac{20\cdot\frac16}{36}=-\tfrac5{54}$.
6 $\nabla F=(2x,2y,-2z)$; on the surface $x^2+y^2=1+z^2\ge1$, so $(x,y)\ne0$ and $F_x$ or $F_y$ is nonzero: solve for $x$ or $y$. Tangent plane at $(1,1,1)$: $2(x-1)+2(y-1)-2(z-1)=0$, i.e. $x+y-z=1$.
7 False. $F=(y-x)^2$ has $F_y(0,0)=0$ and zero set the graph of $g(x)=x$. So does $F=y^3-x$ with the (non-differentiable) $g(x)=\sqrt[3]x$.
8 By Theorem 6.13, $\frac{\partial x}{\partial y}=-\frac{F_y}{F_x}$, $\frac{\partial y}{\partial z}=-\frac{F_z}{F_y}$, $\frac{\partial z}{\partial x}=-\frac{F_x}{F_z}$; the product is $(-1)^3=-1$. For $F=pV-nRT$: $\frac{\partial p}{\partial V}=-\frac pV$, $\frac{\partial V}{\partial T}=\frac{nR}p$, $\frac{\partial T}{\partial p}=\frac V{nR}$, with product $-1$ ✓ — not $+1$, as cancelling "$\partial$'s" would suggest.
III
Local and global extrema.
  • 1 Find and classify the critical points of $x^2+xy+y^2-3x$.
  • 2 Find and classify the critical points of $x^3-3x+y^2$.
  • 3 Find and classify the critical points of $x^4+y^4-4xy$, and find the global minimum.
  • 4 Find and classify the critical points of $f(x,y,z)=x^2+y^2+z^2-xy+x-2z$.
  • 5 Classify the origin for $x^2+y^4$, $x^2-y^4$ and $x^2+y^3$, and explain why the Hessian test cannot.
  • 6 Find the maximum and minimum of $f(x,y)=x^2+y^2-x-y$ on the closed disc $x^2+y^2\le1$.
  • 7 Let $U\subseteq\mathbb{R}^n$ be open and convex and $f\in C^2(U)$ with $H_f(x)$ positive definite for every $x\in U$. Prove that $f$ has at most one critical point, and that a critical point is a global minimum on $U$.
  • 8 Show that $f(x,y)=x^2+y^2(1-x)^3$ has exactly one critical point, that it is a strict local minimum, and that it is not a global minimum.
1 $2x+y-3=0$, $x+2y=0$ give $(2,-1)$. $H=\begin{pmatrix}2&1\\1&2\end{pmatrix}$, $D=3\gt0$, $f_{xx}\gt0$: strict local (in fact global, $f$ being a convex quadratic) minimum, $f(2,-1)=-3$.
2 $3x^2-3=0$, $2y=0$: $(\pm1,0)$. $H=\mathrm{diag}(6x,2)$. At $(1,0)$: positive definite, local minimum $f=-2$. At $(-1,0)$: $D=-12\lt0$, saddle.
3 $x^3=y$, $y^3=x$ give $x^9=x$, so $x\in\{0,1,-1\}$: points $(0,0)$, $(1,1)$, $(-1,-1)$. $H=\begin{pmatrix}12x^2&-4\\-4&12y^2\end{pmatrix}$: at $0$, $D=-16$ (saddle); at $\pm(1,1)$, $D=128\gt0$, $f_{xx}=12\gt0$ (minima, $f=-2$). Global: $4xy\le2(x^2+y^2)$ and $t^2-2t\ge-1$ give $f\ge(x^4-2x^2)+(y^4-2y^2)\ge-2$. So the global minimum is $-2$, attained at $\pm(1,1)$.
4 $2x-y+1=0$, $2y-x=0$, $2z-2=0$: $(x,y,z)=\left(-\tfrac23,-\tfrac13,1\right)$. $H=\begin{pmatrix}2&-1&0\\-1&2&0\\0&0&2\end{pmatrix}$ has leading minors $2,3,6\gt0$ (eigenvalues $1,2,3$): positive definite, strict local (and global) minimum, value $-\tfrac43$.
5 All three have $\nabla f(0)=0$ and $H=\mathrm{diag}(2,0)$, semidefinite and singular. $x^2+y^4\gt0$ off $0$: strict minimum. $x^2-y^4$ is positive on the $x$-axis and negative on the $y$-axis: saddle. $x^2+y^3$ is negative at $(0,y)$ for $y\lt0$ and positive at $(x,0)$: no extremum. The quadratic term $x^2$ does not see the $y$-direction, where higher-order terms decide.
6 Interior: $\nabla f=(2x-1,2y-1)=0$ at $(\tfrac12,\tfrac12)$, inside the disc, $f=-\tfrac12$. Boundary $x=\cos t$, $y=\sin t$: $f=1-(\cos t+\sin t)$, ranging over $[1-\sqrt2,\,1+\sqrt2]$. Compare: minimum $-\tfrac12$ at $(\tfrac12,\tfrac12)$; maximum $1+\sqrt2$ at $\left(-\tfrac1{\sqrt2},-\tfrac1{\sqrt2}\right)$.
7 For $a\ne b$ in $U$ let $\varphi(t)=f(a+t(b-a))$, $t\in[0,1]$ (the segment is in $U$ by convexity). $\varphi''(t)=(b-a)^{\mathsf T}H_f(a+t(b-a))(b-a)\gt0$, so $\varphi'$ is strictly increasing. If $a,b$ were both critical, $\varphi'(0)=\varphi'(1)=0$, a contradiction. If $a$ is critical, $\varphi'(0)=0$, so $\varphi'\gt0$ on $(0,1]$ and $f(b)=\varphi(1)\gt\varphi(0)=f(a)$.
8 $f_y=2y(1-x)^3=0$ gives $y=0$ or $x=1$. If $x=1$: $f_x=2x-3y^2(1-x)^2=2\ne0$. If $y=0$: $f_x=2x=0$. So $(0,0)$ is the only critical point; $H=\mathrm{diag}(2,2)$, a strict local minimum with $f=0$. But $f(4,1)=16-27=-11\lt0$. (In one variable a lone strict local minimum is global, by the intermediate and mean value theorems; in two variables the function can "go around" it.)
IV
Lagrange multipliers.
  • 1 Find the extreme values of $xy$ on the circle $x^2+y^2=8$.
  • 2 Maximise $xyz$ subject to $x+y+z=12$, $x,y,z\gt0$.
  • 3 Find the point of the plane $2x-y+2z=9$ nearest to the origin, and the distance.
  • 4 Find the maximum and minimum of $5x^2+4xy+2y^2$ on $x^2+y^2=1$, and the points where they are attained.
  • 5 Find the points of the ellipse $\frac{x^2}4+y^2=1$ nearest to and farthest from $(1,0)$.
  • 6 Show that the minimum of $f(x,y)=y$ on the curve $y^3=x^2$ is attained at a point where no Lagrange multiplier exists, and explain which hypothesis of Theorem 6.16 fails.
  • 7 Maximise $x_1x_2\cdots x_n$ subject to $x_1+\cdots+x_n=n$, $x_i\ge0$, and deduce the inequality between the arithmetic and geometric means.
1 $(y,x)=\lambda(2x,2y)$ gives $y=2\lambda x$, $x=2\lambda y$, so $x=4\lambda^2x$; $x=0$ would force $y=0$, off the circle, so $\lambda=\pm\tfrac12$ and $y=\pm x$. Points $(\pm2,\pm2)$: maximum $4$ at $(2,2),(-2,-2)$, minimum $-4$ at $(2,-2),(-2,2)$.
2 $(yz,xz,xy)=\lambda(1,1,1)$ gives $yz=xz=xy$, hence (all positive) $x=y=z=4$ and $xyz=64$. It is a maximum: the closed triangle $x,y,z\ge0$, $x+y+z=12$ is compact, the maximum is positive, so it is not on the boundary (where $xyz=0$) and must be a multiplier point.
3 $2(x,y,z)=\lambda(2,-1,2)$, so the point is $t(2,-1,2)$ with $9t=9$: $(2,-1,2)$, at distance $3$. (Formula check: $|{-9}|/\sqrt{4+1+4}=3$.)
4 By Theorem 6.17 the answers are the eigenvalues of $\begin{pmatrix}5&2\\2&2\end{pmatrix}$: trace $7$, determinant $6$, so $6$ and $1$. Maximum $6$ at $\pm\frac1{\sqrt5}(2,1)$, minimum $1$ at $\pm\frac1{\sqrt5}(1,-2)$.
5 On the ellipse, $(x-1)^2+y^2=(x-1)^2+1-\frac{x^2}4=\tfrac34x^2-2x+2$ for $x\in[-2,2]$. Its minimum is at $x=\tfrac43$, value $\tfrac23$; its maximum is at $x=-2$, value $9$. Nearest points $\left(\tfrac43,\pm\tfrac{\sqrt5}3\right)$ at distance $\sqrt{2/3}$; farthest point $(-2,0)$ at distance $3$. (The multiplier equations give these and also $(2,0)$, a local maximum of the distance.)
6 On $y^3=x^2$ we have $y=x^{2/3}\ge0$, with $y=0$ only at the origin: the minimum is at $(0,0)$. With $g=y^3-x^2$, $\nabla g=(-2x,3y^2)=(0,0)$ there, while $\nabla f=(0,1)$; $\nabla f=\lambda\nabla g$ has no solution. The hypothesis "$\nabla g(a)\ne0$" (rank $1$) fails at the cusp.
7 The set is compact and the product is positive inside, so the maximum is at an interior point with all $x_i\gt0$. There $\prod_{j\ne i}x_j=\lambda$ for every $i$; multiplying by $x_i$ gives $x_i\lambda=P$ (the product) for all $i$, so all $x_i$ are equal, $x_i=1$, and $\max\prod x_i=1$. For positive $a_i$ with mean $A$, apply this to $x_i=a_i/A$: $\prod a_i\le A^n$, i.e. $\sqrt[n]{a_1\cdots a_n}\le\frac{a_1+\cdots+a_n}n$.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA The function $f(x,y)=x^3-12x+y^3-3y$ has (A) exactly one local maximum, one local minimum and two saddle points; (B) two local minima and two saddle points; (C) four saddle points; (D) one local minimum and three saddle points.

Idea The variables separate: $f_x=3x^2-12$, $f_y=3y^2-3$, and $H=\mathrm{diag}(6x,6y)$.
Classify Critical points $(\pm2,\pm1)$. $(2,1)$: $H=\mathrm{diag}(12,6)$, minimum. $(-2,-1)$: $\mathrm{diag}(-12,-6)$, maximum. $(2,-1)$ and $(-2,1)$: mixed signs, saddles.
Answer (A).

E2. CSIR Part B Near $(x,y,z)=(0,1,0)$ the equation $xz+ye^z=1$ defines $z$ as a function $z(x,y)$. Then at $(0,1)$: (A) $z_x=0,\ z_y=-1$; (B) $z_x=-1,\ z_y=0$; (C) $z_x=z_y=-1$; (D) the equation does not define $z$ as a $C^1$ function near this point.

Idea Theorem 6.13 with $F=xz+ye^z-1$: $F(0,1,0)=0$ and $F_z=x+ye^z=1\ne0$, so (D) is false.
Compute $z_x=-F_x/F_z=-z/1=0$ and $z_y=-F_y/F_z=-e^z/1=-1$.
Answer (A).

E3. CSIR Part B The maximum value of $x^2+4xy+y^2$ on the circle $x^2+y^2=1$ is (A) $1$; (B) $2$; (C) $3$; (D) $5$.

Idea Rayleigh (Theorem 6.17): the maximum is the largest eigenvalue of $\begin{pmatrix}1&2\\2&1\end{pmatrix}$.
Compute Eigenvalues $1\pm2$, i.e. $3$ and $-1$; the maximum $3$ is at $\pm\frac1{\sqrt2}(1,1)$. Check: $\tfrac12+2+\tfrac12=3$.
Answer (C).

E4. CSIR Part C Let $F:\mathbb{R}^2\to\mathbb{R}^2$, $F(x,y)=(e^x\cos y,\ e^x\sin y)$. Which of the following are true? (A) $DF(p)$ is invertible for every $p\in\mathbb{R}^2$. (B) $F$ is injective on $\mathbb{R}^2$. (C) $F$ is injective on the strip $\{(x,y):0\lt y\lt2\pi\}$. (D) $F(\mathbb{R}^2)=\mathbb{R}^2$.

(A) True $\det J_F=e^{2x}\gt0$.
(B) False $F(0,0)=F(0,2\pi)$.
(C) True If $F(x,y)=F(x',y')$, the moduli give $e^x=e^{x'}$, so $x=x'$, and then $(\cos y,\sin y)=(\cos y',\sin y')$ with $y,y'\in(0,2\pi)$ forces $y=y'$.
(D) False $\|F(x,y)\|=e^x\gt0$: the origin is never attained. The image is $\mathbb{R}^2\setminus\{0\}$.
Answer (A) and (C).

E5. CSIR Part C Let $f(x,y)=(y-x^2)(y-3x^2)$. Which of the following are true? (A) $(0,0)$ is a critical point at which the Hessian is positive semidefinite. (B) For every line $L$ through the origin, $f|_L$ has a strict local minimum at $(0,0)$. (C) $(0,0)$ is a local minimum of $f$. (D) $f$ has a critical point other than $(0,0)$.

(A) True $f=y^2-4x^2y+3x^4$, $\nabla f(0,0)=0$, $H=\begin{pmatrix}0&0\\0&2\end{pmatrix}$, positive semidefinite.
(B) True On $y=mx$: $f=m^2x^2-4mx^3+3x^4$, positive for small $x\ne0$ if $m\ne0$; for $m=0$, $f=3x^4$; on the $y$-axis $f=y^2$.
(C) False On $y=2x^2$: $f=(x^2)(-x^2)=-x^4\lt0$ arbitrarily close to $0$.
(D) False $f_y=2y-4x^2=0$ gives $y=2x^2$; then $f_x=-8xy+12x^3=-16x^3+12x^3=-4x^3=0$, so $x=0$.
Answer (A) and (B).

E6. CSIR Part C Let $S$ be the set of points $(x,y,z)\in\mathbb{R}^3$ with $x^2+y^2+z^2=1$ and $x+y+z=0$. Which of the following are true? (A) $S$ is compact. (B) Near each of its points, $S$ is the graph of a $C^1$ function expressing two of the coordinates in terms of the third. (C) The maximum of $z$ on $S$ is $\sqrt{2/3}$. (D) The maximum of $xyz$ on $S$ is attained at a point with a zero coordinate.

(A) True $S$ is closed (an intersection of zero sets of continuous functions) and bounded (inside the unit sphere).
(B) True The matrix $\begin{pmatrix}2x&2y&2z\\1&1&1\end{pmatrix}$ has rank $2$ unless $(x,y,z)$ is a multiple of $(1,1,1)$, which on $S$ would give $3x=0$ and then $x=y=z=0$, off the sphere. So some $2\times2$ minor is nonzero at each point, and Theorem 6.13 solves for those two coordinates.
(C) True $x+y=-z$ and $x^2+y^2=1-z^2$; since $(x+y)^2\le2(x^2+y^2)$, $z^2\le2(1-z^2)$, i.e. $z^2\le\tfrac23$. Equality at $x=y=-\frac{z}{2}$, $z=\sqrt{2/3}$, a point of $S$.
(D) False At a point with a zero coordinate $xyz=0$, but $xyz\gt0$ at $\left(-\tfrac1{\sqrt6},-\tfrac1{\sqrt6},\tfrac2{\sqrt6}\right)\in S$. (In fact the maximum is $\tfrac1{3\sqrt6}\approx0.136$, attained there: $x,y,z$ are the roots of $t^3-\tfrac12t-xyz$, which are all real only when $27(xyz)^2\le\tfrac12$.)
Answer (A), (B) and (C).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Inverse function theorem. Start from the one-variable case and the linear case. Contraction principle (Theorem 6.11) in ten minutes; then Theorem 6.12 — draw the ball, the contraction $\varphi_y$ and the "image is open" step; skip Step 5 in class. Example 1 on the board ($z^2$ and $e^z$ in real coordinates), the counterexample $x+2x^2\sin\frac1x$.
  2. Implicit function theorem. Theorem 6.13 proved from 6.12 via $\Phi(x,y)=(x,F(x,y))$. Project Interactive 1 on the folium and let the class predict where the animation will stop; then the lemniscate and the cusp. Examples 2–4; insist on Example 4's moral. Level sets as surfaces and tangent planes.
  3. Extrema. Theorems 6.14–6.15 with the $2\times2$ completing-the-square argument; Example 5; Interactive 2 (Peano surface, then the monkey saddle) and Example 6. Lagrange multipliers with the tangent-curve proof, the cusp counterexample, Rayleigh's theorem, Example 7. Finish with Exam-corner E5 and E6.

Discussion questions. (1) Why does a local diffeomorphism at every point fail to be injective for $e^z$, and what extra hypothesis would give global injectivity? (Hint: Exercise I.6, or properness.) (2) In Example 6, why can no straight line detect the negative region, and would a parabola $y=cx^2$ detect it? (3) The Lagrange condition says $\nabla f\perp T_aM$. Draw level curves of $f$ and the constraint curve, and explain the condition as "the level curve is tangent to the constraint".

Misconceptions to watch for. Treating the inverse/implicit function theorems as global; believing that $F_y=0$ rules out an implicit function; using $D\gt0$ without checking $f_{xx}$; concluding "minimum" from a semidefinite Hessian or from minima along all lines; forgetting points where the constraint gradients are dependent; treating every multiplier point as an extremum.

Suggested homework. I(1, 4, 6), II(1, 2, 4, 7, 8), III(3, 5, 6, 8), IV(2, 4, 5, 6); Exam corner E2, E4, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. When can a robot controller reliably compute the joint angles that put a robot's hand at a prescribed point — and why does it struggle near the edge of the robot's reach?

Why it matters. Industrial arms in car factories, surgical robots and planetary rovers solve this "inverse kinematics" problem hundreds of times per second. The forward map from joint angles to hand position is smooth; inverting it is exactly the inverse function theorem, and the configurations where its Jacobian is singular are where real robots jerk, stall or lose precision.

What to do.

  1. For a planar two-link arm with link lengths $\ell_1=1$, $\ell_2=0.8$, the hand is at $$P(\theta_1,\theta_2)=\begin{pmatrix}\ell_1\cos\theta_1+\ell_2\cos(\theta_1+\theta_2)\\ \ell_1\sin\theta_1+\ell_2\sin(\theta_1+\theta_2)\end{pmatrix}.$$ Compute $J_P$ and show that $\det J_P=\ell_1\ell_2\sin\theta_2$. Describe the singular configurations and their images (the reachable set is an annulus).
  2. Solve $P(\theta)=p$ by Newton's method $\theta_{k+1}=\theta_k-J_P(\theta_k)^{-1}\left(P(\theta_k)-p\right)$ for targets $p=(r,0)$ with $r=1.0,1.5,1.75,1.79$, starting from $\theta_0=(0.3,1.0)$. Record the number of iterations to reach an error below $10^{-10}$.
  3. Compute the operator norm $\|J_P^{-1}\|$ at the solutions and relate it to the sensitivity of the joint angles to a small error in $p$ (Theorem 6.12: $Dg=(DP)^{-1}$). What happens as $r\to1.8$?
  4. Replace Newton's step by the damped least-squares step $\left(J^{\mathsf T}J+\mu^2I\right)^{-1}J^{\mathsf T}(p-P)$ and compare the behaviour near the boundary of the annulus.

Tools: Python with numpy (or any language with $2\times2$ linear solves); a plotting tool for the arm and the iterates.

Hand in: The Jacobian computation, a table of iteration counts and $\|J_P^{-1}\|$ against $r$, and a paragraph explaining the results with the inverse function theorem.

Going further. A three-link planar arm has a $2\times3$ Jacobian: infinitely many joint solutions. Use the implicit function theorem to describe the solution set as a curve, and Lagrange multipliers to pick the solution closest to a preferred posture.

Instructor note: the reachable set is $0.2\le r\le1.8$; singular configurations are $\theta_2=0$ (arm straight, image $r=1.8$) and $\theta_2=\pi$ (folded, image $r=0.2$). For $p=(r,0)$ the elbow angle satisfies $\cos\theta_2=\frac{r^2-\ell_1^2-\ell_2^2}{2\ell_1\ell_2}$: $\theta_2\approx113.6^\circ,\,67.6^\circ,\,27.2^\circ,\,12.2^\circ$ for $r=1,1.5,1.75,1.79$, with $\|J_P^{-1}\|\approx1.49,\,2.22,\,5.23,\,11.6$ — the sensitivity grows like $1/\sin\theta_2$. Newton converges quadratically for the inner targets; close to $r=1.8$ it needs many more steps and can overshoot into the unreachable region, which damping cures.

🧪 Self-check quiz

0/5 correct

Q1. The inverse function theorem guarantees that $f:U\to\mathbb{R}^n$ has a $C^1$ inverse near $a$ provided that

Q2. For the circle $x^2+y^2=25$, the implicit function $y=g(x)$ through $(3,4)$ has $g'(3)=$

Q3. At a critical point of a $C^2$ function of two variables, $f_{xx}f_{yy}-f_{xy}^2\lt0$. Then the point is

Q4. The maximum of $xy$ subject to $x+y=10$ is

Q5. For $f(x,y)=(y-x^2)(y-2x^2)$, the origin is