Chapter 1 · Calculus of Several Variables

1.1 Partial, Directional and Total Derivatives; Inverse and Implicit Functions

Limits and continuity in $\mathbb{R}^n$, partial and directional derivatives, the total derivative and its Jacobian, the chain rule, Euler's theorem and mixed partials, and the inverse and implicit function theorems — the derivative toolkit that GATE MA tests in MCQ, MSQ and NAT form.

A function of one variable is differentiable at a point when, under a strong enough magnifying glass, its graph looks like a straight line. For a function of several variables the graph is a surface (or something of higher dimension), and differentiability means that it looks like a plane: near $a$, the change $f(a+h)-f(a)$ is a linear function of the displacement $h$, up to an error that is small compared with $\|h\|$. That linear function is the total derivative; its matrix is the Jacobian; and almost every computation of this chapter — directional derivatives, tangent planes, the chain rule, implicit differentiation, the change of variables in a multiple integral (§1.3), the second derivative test (§1.2) — is a statement about it.

GATE MA examines this material in two quite different ways. Some questions are pure computation, answered in a minute if you know the right formula: the directional derivative of $x e^{yz}+y^2$ towards a given point, the angle between two surfaces, $dy/dx$ for a curve given by an equation, the value of $x^2u_{xx}+2xyu_{xy}+y^2u_{yy}$ for a homogeneous $u$. Others are "which of the following are true" questions about a function such as $\frac{x^3-2y^3}{x^2+y^2}$ at the origin — is it continuous, do its directional derivatives exist, is it differentiable, are its mixed partials equal? Those are answered by knowing exactly which implications hold and having a counterexample ready for each one that does not. This section gives you both.

Limits and Continuity in $\mathbb{R}^n$

Throughout, $\mathbb{R}^n$ carries the Euclidean norm $\|x\|=\left(x_1^2+\cdots+x_n^2\right)^{1/2}$, and $U\subseteq\mathbb{R}^n$ is an open set. Because $\max_i|x_i|\le\|x\|\le\sqrt n\,\max_i|x_i|$, a sequence converges in this norm exactly when each coordinate converges; nothing depends on which of the usual norms we use.

📘 Definition 1.1 — Limits and continuity in $\mathbb{R}^n$

The open ball of radius $r\gt0$ about $a$ is $B(a,r)=\{x:\|x-a\|\lt r\}$; $U$ is open if each of its points is the centre of a ball contained in $U$. Let $E\subseteq\mathbb{R}^n$, $f:E\to\mathbb{R}^m$, and let $a$ be a limit point of $E$.

  • $\displaystyle\lim_{x\to a}f(x)=L$ means: for every $\varepsilon\gt0$ there is $\delta\gt0$ such that $\|f(x)-L\|\lt\varepsilon$ for every $x\in E$ with $0\lt\|x-a\|\lt\delta$.
  • $f$ is continuous at $a\in E$ if for every $\varepsilon\gt0$ there is $\delta\gt0$ with $\|f(x)-f(a)\|\lt\varepsilon$ whenever $x\in E$ and $\|x-a\|\lt\delta$; and continuous on $E$ if it is continuous at every point of $E$.

In the plane, $\lim_{(x,y)\to(a,b)}f(x,y)$ is called the double (simultaneous) limit; the iterated (repeated) limits are $\lim_{x\to a}\left(\lim_{y\to b}f(x,y)\right)$ and $\lim_{y\to b}\left(\lim_{x\to a}f(x,y)\right)$.

📐 Theorem 1.1 — Working with limits: sequences, paths, squeezing

Let $f:E\to\mathbb{R}$ and let $a$ be a limit point of $E\subseteq\mathbb{R}^n$.

  1. Sequences. $\lim_{x\to a}f(x)=L$ if and only if $f(x_k)\to L$ for every sequence $(x_k)$ in $E\setminus\{a\}$ with $x_k\to a$.
  2. Two-path test. If there are two curves in $E\setminus\{a\}$ tending to $a$ along which $f$ has different limits — or one curve along which $f$ has no limit — then $\lim_{x\to a}f(x)$ does not exist.
  3. Squeeze test. If $|f(x)-L|\le g(\|x-a\|)$ for $x\in E$, $0\lt\|x-a\|\lt r_0$, where $g(\rho)\to0$ as $\rho\to0^+$, then $\lim_{x\to a}f(x)=L$. In the plane, with $x=a+\rho\cos\theta$, $y=b+\rho\sin\theta$, it is enough that $|f-L|\le g(\rho)$ with $g$ independent of $\theta$.
  4. Algebra. Sums, products and quotients (with nonzero limit of the denominator) of functions with limits have the expected limits. Hence polynomials, rational functions (where the denominator is nonzero) and compositions of continuous functions such as $e^{xy}$, $\sin(x^2+z)$ are continuous.

Proof. (1) If $f\to L$ and $x_k\to a$, $x_k\ne a$, then for a given $\varepsilon$ take $\delta$ from the definition; eventually $0\lt\|x_k-a\|\lt\delta$, so $|f(x_k)-L|\lt\varepsilon$. Conversely, if $f\not\to L$, some $\varepsilon\gt0$ has, for each $k$, a point $x_k\in E$ with $0\lt\|x_k-a\|\lt1/k$ and $|f(x_k)-L|\ge\varepsilon$; this sequence breaks the sequential condition. (2) If the limit $L$ existed, then by (1) applied to points $\gamma(t_k)$ with $t_k\to0$, $f$ would tend to $L$ along both curves. (3) Given $\varepsilon$, choose $\delta\le r_0$ with $g(\rho)\lt\varepsilon$ for $0\lt\rho\lt\delta$. (4) follows from (1) and the algebra of limits of sequences. ∎

The logic of (2) and (3) is asymmetric, and exam questions exploit it. Paths can only disprove a limit: agreement along every straight line through $a$ proves nothing. A limit is proved by a bound that holds in all directions at once.

✏️ Example 1 — Four limits at the origin
Decide whether the limit as $(x,y)\to(0,0)$ exists and find it if it does: (a) $\dfrac{2xy}{x^2+3y^2}$; (b) $\dfrac{xy^3}{x^2+y^6}$; (c) $\dfrac{x^3+2y^4}{x^2+y^2}$; (d) $\dfrac{\sin(xy)}{y}$ (defined for $y\ne0$).
(a) No limit On the line $y=mx$, $x\ne0$, the value is $\dfrac{2mx^2}{x^2+3m^2x^2}=\dfrac{2m}{1+3m^2}$: it is $0$ for $m=0$ and $\tfrac12$ for $m=1$. Two paths, two limits.
(b) No limit On $y=mx$: $\dfrac{m^3x^4}{x^2+m^6x^6}=\dfrac{m^3x^2}{1+m^6x^4}\to0$, and $f=0$ on both axes; so every line gives $0$. On the curve $x=y^3$: $\dfrac{y^6}{y^6+y^6}=\tfrac12$. The limit does not exist — the lines simply miss the curve where $f$ stays at $\tfrac12$.
(c) Limit $0$ With $\rho=\sqrt{x^2+y^2}$ we have $|x|,|y|\le\rho$, so $|x^3+2y^4|\le\rho^3+2\rho^4$ and $\left|\dfrac{x^3+2y^4}{x^2+y^2}\right|\le\rho+2\rho^2\to0$, a bound independent of the direction.
(d) Limit $0$ Since $|\sin s|\le|s|$ for all real $s$, $\left|\dfrac{\sin(xy)}{y}\right|\le\dfrac{|xy|}{|y|}=|x|\le\rho$ on the whole domain $\{y\ne0\}$. Squeeze: the limit is $0$. (The origin is a limit point of the domain, so the question makes sense even though $f$ is undefined on the $x$-axis.)
Pattern For a quotient of homogeneous polynomials with denominator vanishing only at $0$, compare degrees: numerator degree $\gt$ denominator degree gives limit $0$; equal degrees give no limit (unless the quotient is constant). When the denominator mixes degrees, as $x^2+y^6$ in (b), look for the curve that balances its two terms ($x=y^3$).
📐 Theorem 1.2 — Double limit versus iterated limits
Suppose $\lim_{(x,y)\to(a,b)}f(x,y)=L$, and that for each $y\ne b$ near $b$ the inner limit $\varphi(y)=\lim_{x\to a}f(x,y)$ exists. Then $\lim_{y\to b}\varphi(y)=L$. Consequently, if both iterated limits exist and are different, the double limit does not exist.

Proof. Given $\varepsilon$, take $\delta$ with $|f(x,y)-L|\lt\varepsilon$ for $0\lt\|(x,y)-(a,b)\|\lt\delta$. For fixed $y$ with $0\lt|y-b|\lt\delta/2$ and every $x$ with $|x-a|\lt\delta/2$ this inequality holds; letting $x\to a$ gives $|\varphi(y)-L|\le\varepsilon$. ∎

The converse is false in every possible way: $\frac{xy}{x^2+y^2}$ has both iterated limits equal to $0$ but no double limit, and $x\sin\frac1y+y\sin\frac1x$ has double limit $0$ (it is at most $|x|+|y|$) although neither iterated limit exists. The only safe use of iterated limits is the negative one in the theorem.

Partial, Directional and Total Derivatives

📘 Definition 1.2 — Partial derivatives, directional derivatives, gradient

Let $f:U\to\mathbb{R}$, $a\in U$, and let $e_1,\dots,e_n$ be the standard basis. For a vector $v$, the derivative of $f$ at $a$ along $v$ is

$$D_vf(a)=\lim_{t\to0}\frac{f(a+tv)-f(a)}{t}$$

when the limit exists (a two-sided limit). For a unit vector $u$, $D_uf(a)$ is the directional derivative of $f$ at $a$ in the direction $u$; GATE questions always mean a unit vector, so a direction given as $v$ must first be normalised to $u=v/\|v\|$. The partial derivatives are $\dfrac{\partial f}{\partial x_j}(a)=D_{e_j}f(a)$, written $f_x,f_y,f_z$ in two or three variables. When all of them exist, the gradient is $\nabla f(a)=\left(\dfrac{\partial f}{\partial x_1}(a),\dots,\dfrac{\partial f}{\partial x_n}(a)\right)$.

Since $D_vf(a)$ is the ordinary derivative at $t=0$ of the one-variable function $t\mapsto f(a+tv)$, all one-variable rules apply, and $D_{cv}f(a)=c\,D_vf(a)$. But partial and directional derivatives only examine $f$ along straight lines through $a$, so on their own they do not even give continuity: for $f=\frac{xy}{x^2+y^2}$ with $f(0,0)=0$, $f$ vanishes on both axes, so $f_x(0,0)=f_y(0,0)=0$, yet $f=\tfrac12$ on the line $y=x$ and $f$ is discontinuous at the origin. The correct notion of differentiability asks for one linear approximation that works in all directions simultaneously.

📘 Definition 1.3 — Differentiability, total derivative, Jacobian

Let $f:U\to\mathbb{R}^m$ and $a\in U$. $f$ is differentiable at $a$ if there is a linear map $T:\mathbb{R}^n\to\mathbb{R}^m$ with

$$\lim_{h\to0}\frac{\|f(a+h)-f(a)-Th\|}{\|h\|}=0 .$$

$T$ is the total derivative $Df(a)$. Its matrix in the standard bases is the $m\times n$ Jacobian matrix $J_f(a)$; for $m=n$ its determinant is the Jacobian $\det J_f(a)$, also written $\dfrac{\partial(f_1,\dots,f_n)}{\partial(x_1,\dots,x_n)}$. For $f:U\subseteq\mathbb{R}^2\to\mathbb{R}$ differentiable at $(a,b)$, the plane $z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b)$ is the tangent plane to the graph.

📐 Theorem 1.3 — What differentiability gives

Let $f=(f_1,\dots,f_m)$ be differentiable at $a$ with $T=Df(a)$. Then:

  1. $f$ is continuous at $a$, and $T$ is unique.
  2. $D_vf(a)$ exists for every $v$, and $D_vf(a)=Tv$; in particular $v\mapsto D_vf(a)$ is linear.
  3. All partial derivatives exist and $J_f(a)=\left[\dfrac{\partial f_i}{\partial x_j}(a)\right]$, the $i$-th row being $\nabla f_i(a)$.
  4. For real-valued $f$ and a unit vector $u$: $D_uf(a)=\nabla f(a)\cdot u$. If $\nabla f(a)\ne0$, the largest directional derivative is $\|\nabla f(a)\|$, attained only for $u=\nabla f(a)/\|\nabla f(a)\|$; the smallest is $-\|\nabla f(a)\|$; and $D_uf(a)=0$ exactly when $u\perp\nabla f(a)$.
  5. For real-valued $f$, $\nabla f(a)$ is orthogonal to every differentiable curve in the level set $\{f=f(a)\}$ through $a$; hence for a level surface $f(x,y,z)=c$ the tangent plane at $a$ is $\nabla f(a)\cdot(x-a)=0$ and the normal line is $a+t\,\nabla f(a)$.

Proof. (2) For $v\ne0$ put $h=tv$; as $t\to0$,

$$\begin{aligned}&\left\|\frac{f(a+tv)-f(a)}{t}-Tv\right\|\\&\qquad=\frac{\|f(a+tv)-f(a)-T(tv)\|}{\|tv\|}\,\|v\|\to0.\end{aligned}$$

(1) Uniqueness: two such maps agree on every $v$ by (2). Continuity: $\|f(a+h)-f(a)\|$ is at most $\|Th\|+\|h\|\,\rho(h)$, where $\rho(h)=\|f(a+h)-f(a)-Th\|/\|h\|\to0$; both terms tend to $0$ because $\|Th\|\le C\|h\|$ for a linear map on $\mathbb{R}^n$. (3) The $j$-th column of the matrix of $T$ is $Te_j=D_{e_j}f(a)$, whose $i$-th entry is $\partial f_i/\partial x_j(a)$. (4) For real $f$ the matrix of $T$ is the row $\nabla f(a)$, so $D_uf(a)=\nabla f(a)\cdot u=\|\nabla f(a)\|\cos\phi$, where $\phi$ is the angle between $u$ and $\nabla f(a)$; this is largest for $\phi=0$, smallest for $\phi=\pi$, and zero for $\phi=\pi/2$. (5) If $\gamma(t)$ lies in the level set with $\gamma(0)=a$, then $f(\gamma(t))=f(a)$ for all $t$, and by the chain rule (Theorem 1.5 below) $0=\nabla f(a)\cdot\gamma'(0)$. ∎

✏️ Example 2 — Gradient, directional derivative and tangent plane
Let $f(x,y,z)=xy^2+z^3-2xz$ and $P=(1,-1,2)$. Find (a) $\nabla f(P)$; (b) the directional derivative at $P$ in the direction of $v=(2,1,-2)$; (c) the maximum and minimum rates of change of $f$ at $P$ and the directions in which they occur; (d) the tangent plane and normal line at $P$ to the level surface through $P$.
(a) $f_x=y^2-2z$, $f_y=2xy$, $f_z=3z^2-2x$. These are polynomials, so $f$ is differentiable (Theorem 1.4 below), and $\nabla f(P)=(1-4,\ -2,\ 12-2)=(-3,-2,10)$.
(b) $\|v\|=\sqrt{4+1+4}=3$, $u=\tfrac13(2,1,-2)$, and $D_uf(P)=\tfrac13(-6-2-20)=-\tfrac{28}{3}\approx-9.333$. (The trap answer $-28$ comes from forgetting to normalise.)
(c) Maximum rate $\|\nabla f(P)\|=\sqrt{9+4+100}=\sqrt{113}\approx10.630$, in the direction $(-3,-2,10)/\sqrt{113}$; minimum rate $-\sqrt{113}$ in the opposite direction. Check: $|{-\tfrac{28}{3}}|\le\sqrt{113}$.
(d) $f(P)=1+8-4=5$. The tangent plane to $f=5$ at $P$ is $-3(x-1)-2(y+1)+10(z-2)=0$, i.e. $3x+2y-10z=-19$ (check at $P$: $3-2-20=-19$). The normal line is $(x,y,z)=(1-3t,\ -1-2t,\ 2+10t)$.
🧭 Deciding differentiability at a point
  1. Continuity first. Not continuous at $a$ $\Rightarrow$ not differentiable (Theorem 1.3(1)).
  2. Partial derivatives at $a$ from the definition — never by differentiating a formula valid only away from $a$. If one is missing, $f$ is not differentiable. Otherwise the only candidate is $Th=\nabla f(a)\cdot h$.
  3. Quick test: compute $D_uf(a)$ from the definition. If it fails to exist for some $u$, or differs from $\nabla f(a)\cdot u$, $f$ is not differentiable.
  4. Decisive test: look at $\rho(h)=\dfrac{f(a+h)-f(a)-\nabla f(a)\cdot h}{\|h\|}$. Prove $\rho\to0$ with a bound uniform in direction, or disprove it along a curve.
  5. Shortcut: continuous partial derivatives near $a$ give differentiability (Theorem 1.4); the converse is false.
📘 Definition 1.4 — $C^1$ and $C^k$ functions; higher partial derivatives
$f:U\to\mathbb{R}^m$ is of class $C^1$ (continuously differentiable) on $U$ if all first partial derivatives $\partial f_i/\partial x_j$ exist and are continuous on $U$. Second partial derivatives are partial derivatives of first ones; we write $f_{xy}=(f_x)_y=\dfrac{\partial^2f}{\partial y\,\partial x}$ (differentiate in $x$ first, then in $y$). $f$ is of class $C^k$ if all partial derivatives of order $\le k$ exist and are continuous, and $C^\infty$ if it is $C^k$ for every $k$.
📐 Theorem 1.4 — Continuous partial derivatives imply differentiability
Let $f:U\to\mathbb{R}^m$ and $a\in U$. If all first partial derivatives of $f$ exist on a ball about $a$ and are continuous at $a$, then $f$ is differentiable at $a$, with $J_f(a)=\left[\partial f_i/\partial x_j(a)\right]$. In particular every $C^1$ function is differentiable on $U$; so are polynomials, rational functions off the zeros of their denominators, and all the elementary combinations of them.

Proof. It is enough to treat one component, so let $f$ be real-valued; we write the case $n=2$, the general case being the same with $n$ steps. Let $a=(a_1,a_2)$ and $h=(h_1,h_2)$ be small. Go from $a$ to $a+h$ in two steps, first horizontally and then vertically:

$$f(a+h)-f(a)=A+B,$$

where $A=f(a_1+h_1,a_2)-f(a_1,a_2)$ and $B=f(a_1+h_1,a_2+h_2)-f(a_1+h_1,a_2)$. In each of $A$ and $B$ only one variable changes, so the one-variable mean value theorem gives points $p$ on the first segment and $q$ on the second with the brackets equal to $h_1f_x(p)$ and $h_2f_y(q)$; both $p$ and $q$ lie within $\|h\|$ of $a$. Therefore

$$\begin{aligned}&\left|f(a+h)-f(a)-f_x(a)h_1-f_y(a)h_2\right|\\&\qquad\le\|h\|\left(|f_x(p)-f_x(a)|+|f_y(q)-f_y(a)|\right).\end{aligned}$$

As $h\to0$, $p,q\to a$, and continuity of the partials at $a$ makes the bracket on the right tend to $0$. So the remainder divided by $\|h\|$ tends to $0$. ∎

The proof uses continuity of only one of the two partials: on the first segment one can use the definition of $f_x(a)$ directly. So in the plane, if $f_x(a)$ exists and $f_y$ is continuous at $a$, then $f$ is differentiable at $a$.

✏️ Example 3 — Four functions at the origin
Each function is defined to be $0$ at $(0,0)$. Decide continuity, existence of directional derivatives, and differentiability at the origin: (a) $f_1=\sqrt{|xy|}$; (b) $f_2=\dfrac{x^3}{x^2+y^2}$; (c) $f_3=\dfrac{x^3y}{x^6+y^2}$; (d) $f_4=(x^2+y^2)\sin\dfrac1{x^2+y^2}$ — and for (d) decide whether the partial derivatives are continuous at $0$.
(a) Continuous: $\sqrt{|xy|}\le\sqrt{\tfrac12(x^2+y^2)}$. Partials: $f_1=0$ on both axes, so $f_x(0,0)=f_y(0,0)=0$. For $u=(u_1,u_2)$ with $u_1u_2\ne0$, $\dfrac{f_1(tu)}{t}=\dfrac{|t|}{t}\sqrt{|u_1u_2|}$ has one-sided limits $\pm\sqrt{|u_1u_2|}$: the directional derivative does not exist. Not differentiable (on $h=(s,s)$ the remainder ratio is $|s|/(\sqrt2|s|)=1/\sqrt2\not\to0$).
(b) Continuous: $|f_2|\le|x|$. For a unit vector $u$, $f_2(tu)/t=u_1^3/(u_1^2+u_2^2)=u_1^3$, so $D_uf_2(0)=u_1^3$ exists in every direction. In particular $\nabla f_2(0)=(1,0)$. Differentiability would force $D_uf_2(0)=u_1$; but for $u=\tfrac1{\sqrt2}(1,1)$, $u_1^3=\tfrac{\sqrt2}{4}\approx0.354\ne\tfrac{\sqrt2}{2}$. Not differentiable: $u\mapsto D_uf_2(0)$ is not linear.
(c) For $u_2\ne0$, $\dfrac{f_3(tu)}{t}=\dfrac{t\,u_1^3u_2}{t^4u_1^6+u_2^2}\to0$, and $f_3=0$ on the $x$-axis: every directional derivative is $0$, a perfectly linear function of $u$. Yet on the curve $y=x^3$, $f_3=\dfrac{x^6}{2x^6}=\tfrac12$, so $f_3$ is not even continuous at $0$, let alone differentiable.
(d) $|f_4(h)|\le\|h\|^2$, so $f_4(h)/\|h\|\to0$: $f_4$ is differentiable at $0$ with $Df_4(0)=0$. Away from $0$, with $s=x^2+y^2$, $\ \dfrac{\partial f_4}{\partial x}=2x\sin\dfrac1s-\dfrac{2x}{s}\cos\dfrac1s$; on the $x$-axis this is $2x\sin\frac1{x^2}-\frac2x\cos\frac1{x^2}$, which is unbounded as $x\to0$. Differentiable, but not $C^1$: Theorem 1.4 cannot be reversed.
Summary partials exist $\not\Rightarrow$ continuous; all directional derivatives exist, even linearly, $\not\Rightarrow$ continuous; continuous with all directional derivatives $\not\Rightarrow$ differentiable; differentiable $\not\Rightarrow$ $C^1$. In the other direction: $C^1\Rightarrow$ differentiable $\Rightarrow$ continuous, and $D_uf=\nabla f\cdot u$.

The Chain Rule, Euler's Theorem and Mixed Partials

📐 Theorem 1.5 — Chain rule; Jacobians of composites and inverses

Let $g:U\to\mathbb{R}^m$ ($U\subseteq\mathbb{R}^n$ open) be differentiable at $a$, and $f$ defined on an open set containing $g(U)$ and differentiable at $b=g(a)$. Then $f\circ g$ is differentiable at $a$ and

$$D(f\circ g)(a)=Df(b)\circ Dg(a),$$ $$J_{f\circ g}(a)=J_f(b)\,J_g(a).$$

In coordinates: if $z=f(y_1,\dots,y_m)$ and $y_k=g_k(x_1,\dots,x_n)$, then $\dfrac{\partial z}{\partial x_j}=\displaystyle\sum_{k=1}^m\frac{\partial z}{\partial y_k}\frac{\partial y_k}{\partial x_j}$. For $m=n$ the Jacobians multiply: $\dfrac{\partial(z_1,\dots,z_n)}{\partial(x_1,\dots,x_n)}=\dfrac{\partial(z_1,\dots,z_n)}{\partial(y_1,\dots,y_n)}\cdot\dfrac{\partial(y_1,\dots,y_n)}{\partial(x_1,\dots,x_n)}$; and if $g$ has a differentiable inverse, $\dfrac{\partial(y)}{\partial(x)}\cdot\dfrac{\partial(x)}{\partial(y)}=1$.

Proof (idea). Write $g(a+h)=b+Ah+\|h\|\varepsilon_1(h)$ and $f(b+k)=f(b)+Bk+\|k\|\varepsilon_2(k)$, with $A=Dg(a)$, $B=Df(b)$ and $\varepsilon_1,\varepsilon_2\to0$, $\varepsilon_2(0)=0$. Substituting $k=g(a+h)-b$, which satisfies $\|k\|\le C\|h\|$, gives $f(g(a+h))=f(b)+BAh+(\text{error})$ with error at most $\|h\|\left(\|B\|\,\|\varepsilon_1(h)\|+C\|\varepsilon_2(k)\|\right)$, which is $o(\|h\|)$. The product formula for Jacobians is the matrix form, and $\det(AB)=\det A\det B$ gives the Jacobian identities; for the inverse apply it to $g^{-1}\circ g=\mathrm{id}$. ∎

The most used special case: if $x(t),y(t)$ are differentiable and $f$ is differentiable, then $\dfrac{d}{dt}f(x(t),y(t))=f_x\,x'(t)+f_y\,y'(t)$. Differentiability of $f$ cannot be weakened to "the partials exist": for $f_2=\frac{x^3}{x^2+y^2}$ of Example 3 and $\gamma(t)=(t,t)$, $f_2(\gamma(t))=t/2$ has derivative $\tfrac12$, while $\nabla f_2(0)\cdot\gamma'(0)=(1,0)\cdot(1,1)=1$.

📘 Definition 1.5 — Homogeneous functions
Let $C\subseteq\mathbb{R}^n\setminus\{0\}$ be an open cone ($x\in C$, $t\gt0\Rightarrow tx\in C$), for example $\mathbb{R}^2\setminus\{0\}$ or the quadrant $\{x\gt0,y\gt0\}$. $f:C\to\mathbb{R}$ is homogeneous of degree $k$ ($k\in\mathbb{R}$) if $f(tx)=t^kf(x)$ for all $x\in C$, $t\gt0$. Examples: $x^3-4xy^2$ (degree $3$), $\sqrt{x^2+y^2}$ (degree $1$), $\dfrac{x-y}{x+y}$ (degree $0$), $\dfrac{x^3+y^3}{\sqrt x+\sqrt y}$ on the open quadrant (degree $\tfrac52$).
📐 Theorem 1.6 — Euler's theorem on homogeneous functions
Let $f$ be differentiable on an open cone $C$. Then $f$ is homogeneous of degree $k$ if and only if $$x_1\frac{\partial f}{\partial x_1}+\cdots+x_n\frac{\partial f}{\partial x_n}=k\,f\quad\text{on }C.$$ If $f$ is $C^2$ and homogeneous of degree $k$, then in two variables $x^2f_{xx}+2xyf_{xy}+y^2f_{yy}=k(k-1)f$ (in general $\sum_{i,j}x_ix_j\,\partial_i\partial_jf=k(k-1)f$).

Proof. Fix $x\in C$ and let $\varphi(t)=f(tx)$ for $t\gt0$. By the chain rule $\varphi'(t)=\nabla f(tx)\cdot x$. If $f$ is homogeneous, $\varphi(t)=t^kf(x)$, so $\varphi'(1)=kf(x)$: this is the identity. Conversely, if the identity holds on $C$ then $t\varphi'(t)=(tx)\cdot\nabla f(tx)=k\varphi(t)$, so $\frac{d}{dt}\left(t^{-k}\varphi(t)\right)=t^{-k-1}\left(t\varphi'(t)-k\varphi(t)\right)=0$, whence $\varphi(t)=t^k\varphi(1)$. For the second-order identity, differentiate $f(tx)=t^kf(x)$ with respect to $x_j$: each $\partial_jf$ is homogeneous of degree $k-1$, so $\sum_ix_i\,\partial_i\partial_jf=(k-1)\partial_jf$. Multiply by $x_j$ and sum over $j$: $\sum_{i,j}x_ix_j\,\partial_i\partial_jf=(k-1)\,x\cdot\nabla f=k(k-1)f$. ∎

✏️ Example 4 — Chain rule, Euler and Jacobians
(a) Let $f$ be differentiable on $\mathbb{R}^3$ and $w=f(x-y,\ y-z,\ z-x)$. Show that $w_x+w_y+w_z=0$. (b) Let $u=\log\left(x^3+y^3-x^2y\right)-\log(x+y)$ on the region where both arguments are positive. Find $xu_x+yu_y$ and $x^2u_{xx}+2xyu_{xy}+y^2u_{yy}$ without differentiating $u$. (c) With $u=x^2-y^2$, $v=xy$ and $x=r\cos\theta$, $y=r\sin\theta$, compute $\dfrac{\partial(u,v)}{\partial(r,\theta)}$.
(a) Write $p=x-y$, $q=y-z$, $s=z-x$. By the chain rule $w_x=f_p-f_s$, $w_y=-f_p+f_q$, $w_z=-f_q+f_s$. Adding: $w_x+w_y+w_z=0$. (Reason: $w$ does not change when we add the same number to $x$, $y$ and $z$, and $w_x+w_y+w_z$ is the derivative in that direction.)
(b) First order $e^u=\dfrac{x^3+y^3-x^2y}{x+y}$ is homogeneous of degree $2$, so by Euler $x(e^u)_x+y(e^u)_y=2e^u$, i.e. $e^u(xu_x+yu_y)=2e^u$: $\ xu_x+yu_y=2$.
(b) Second order Apply $x\partial_x+y\partial_y$ to the identity $xu_x+yu_y=2$: $\ x(u_x+xu_{xx}+yu_{xy})+y(xu_{xy}+u_y+yu_{yy})=0$, i.e. $(xu_x+yu_y)+(x^2u_{xx}+2xyu_{xy}+y^2u_{yy})=0$. Hence the second expression equals $-2$. (Here $u$ itself is not homogeneous, so $k(k-1)u$ would be wrong.)
(c) $\dfrac{\partial(u,v)}{\partial(x,y)}=\det\begin{pmatrix}2x&-2y\\y&x\end{pmatrix}=2(x^2+y^2)=2r^2$ and $\dfrac{\partial(x,y)}{\partial(r,\theta)}=r$, so the product is $2r^3$. Check directly: $u=r^2\cos2\theta$, $v=\tfrac12r^2\sin2\theta$, and $\det\begin{pmatrix}2r\cos2\theta&-2r^2\sin2\theta\\r\sin2\theta&r^2\cos2\theta\end{pmatrix}=2r^3$. ✓

For $C^2$ functions the order of differentiation in a mixed partial derivative does not matter. Without continuity it can matter.

📐 Theorem 1.7 — Schwarz's (Clairaut's) theorem on mixed partials
Let $f:U\to\mathbb{R}$, $U\subseteq\mathbb{R}^2$ open, $(a,b)\in U$. If $f_x$, $f_y$ and $f_{xy}$ exist on a neighbourhood of $(a,b)$ and $f_{xy}$ is continuous at $(a,b)$, then $f_{yx}(a,b)$ exists and $f_{yx}(a,b)=f_{xy}(a,b)$. In particular $f_{xy}=f_{yx}$ on $U$ for every $f\in C^2(U)$, and the same holds for any two variables of a $C^2$ function of $n$ variables.

Proof (for $f\in C^2$). Consider the second difference

$$\begin{aligned}\Delta(h,k)&=f(a+h,b+k)-f(a+h,b)\\&\quad-f(a,b+k)+f(a,b).\end{aligned}$$

With $\psi(x)=f(x,b+k)-f(x,b)$ we have $\Delta=\psi(a+h)-\psi(a)=h\psi'(\xi)$ for some $\xi$ between $a$ and $a+h$, that is, $\Delta=h\left[f_x(\xi,b+k)-f_x(\xi,b)\right]$; by the mean value theorem in $y$ this is $hk\,f_{xy}(\xi,\eta)$. Grouping the four terms the other way gives $\Delta=hk\,f_{yx}(\xi',\eta')$. Dividing by $hk$ and letting $(h,k)\to0$, continuity of both mixed partials at $(a,b)$ gives $f_{xy}(a,b)=f_{yx}(a,b)$. ∎

✏️ Example 5 — Mixed partials that differ
Let $f(x,y)=\dfrac{x^3y}{x^2+y^2}$ for $(x,y)\ne(0,0)$ and $f(0,0)=0$. Show that $f$ is $C^1$ on $\mathbb{R}^2$, compute $f_{xy}(0,0)$ and $f_{yx}(0,0)$, and explain why Theorem 1.7 does not apply.
First partials Away from $0$, $f_x=\dfrac{x^2y(x^2+3y^2)}{(x^2+y^2)^2}$ and $f_y=\dfrac{x^3(x^2-y^2)}{(x^2+y^2)^2}$. At $0$, $f=0$ on both axes, so $f_x(0,0)=f_y(0,0)=0$. With $\rho=\|(x,y)\|$: $|f_x|\le\dfrac{\rho^3\cdot3\rho^2}{\rho^4}=3\rho$ and $|f_y|\le\dfrac{\rho^3\cdot\rho^2}{\rho^4}=\rho$, so both partials are continuous at $0$: $f\in C^1$.
$f_{xy}(0,0)$ We need $f_x$ along the $y$-axis. For $y\ne0$, $f_x(0,y)=\lim_{h\to0}\dfrac{f(h,y)}{h}=\lim_{h\to0}\dfrac{h^2y}{h^2+y^2}=0$; also $f_x(0,0)=0$. So $f_x(0,y)=0$ for all $y$, and $f_{xy}(0,0)=\dfrac{d}{dy}f_x(0,y)\big|_{y=0}=0$.
$f_{yx}(0,0)$ For $x\ne0$, $f_y(x,0)=\lim_{k\to0}\dfrac{f(x,k)}{k}=\lim_{k\to0}\dfrac{x^3}{x^2+k^2}=x$, and $f_y(0,0)=0$. So $f_y(x,0)=x$ and $f_{yx}(0,0)=1$.
Why $f_{xy}(0,0)=0\ne1=f_{yx}(0,0)$. Theorem 1.7 needs a mixed partial that is continuous at the origin; here $f_{xy}$ is homogeneous of degree $0$ away from $0$ (constant on rays but different on different rays), so it has no limit at the origin.

The Inverse and Implicit Function Theorems

A linear system $Ax=y$ with square $A$ can be solved for $x$ — uniquely, for every $y$ — exactly when $\det A\ne0$. The two theorems of this subsection say that a nonlinear $C^1$ system behaves the same way near a point when its Jacobian there is nonsingular. GATE asks for the Jacobian condition, for the derivative of the inverse or implicit function, and about what can fail when the condition fails.

📘 Definition 1.6 — Local invertibility
A $C^1$ map $F:U\to\mathbb{R}^n$ ($U\subseteq\mathbb{R}^n$ open) is locally invertible (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 the inverse $G=(F|_V)^{-1}:W\to V$ is $C^1$. It is a (global) diffeomorphism of $U$ onto $F(U)$ if it is injective on $U$, $F(U)$ is open, and $F^{-1}$ is $C^1$.
📐 Theorem 1.8 — Inverse function theorem
Let $F:U\to\mathbb{R}^n$ be $C^1$ on an open set $U\subseteq\mathbb{R}^n$ and let $a\in U$ with $\det J_F(a)\ne0$. Then $F$ is locally invertible at $a$, and the local inverse $G$ satisfies $$J_G(F(x))=\left[J_F(x)\right]^{-1}\qquad\text{for }x\in V.$$ If $F$ is $C^k$, so is $G$. Conversely, if $F$ has a differentiable local inverse at $a$, then $\det J_F(a)\ne0$.

Proof (idea; full proof in the 📚 box below). The converse is the chain rule: $G\circ F=\mathrm{id}$ near $a$ gives $J_G(F(a))\,J_F(a)=I$, so $J_F(a)$ is invertible. For the theorem itself, put $A=J_F(a)$ and, for a target $y$ near $F(a)$, consider the Newton-like map $\varphi_y(x)=x+A^{-1}(y-F(x))$, whose fixed points are exactly the solutions of $F(x)=y$. Its derivative $I-A^{-1}J_F(x)$ vanishes at $x=a$ and, by continuity of $J_F$, has norm at most $\tfrac12$ on a small closed ball about $a$. So $\varphi_y$ is a contraction there, and the contraction mapping principle (§4.1) gives exactly one solution $x=G(y)$ in the ball. The same estimate shows $\|G(y)-G(y')\|\le2\|A^{-1}\|\,\|y-y'\|$, and from this one checks that $G$ is differentiable with derivative $J_F(G(y))^{-1}$, which is continuous because matrix inversion is. ∎

Two remarks GATE likes. The theorem is local: $\det J_F\ne0$ everywhere does not make $F$ injective (the polar map $(r,\theta)\mapsto(r\cos\theta,r\sin\theta)$ on $r\gt0$ has Jacobian $r\gt0$ and is periodic in $\theta$). And $\det J_F(a)\ne0$ is not necessary for a continuous inverse: $x\mapsto x^3$ is a bijection of $\mathbb{R}$ with derivative $0$ at the origin, and its inverse $y^{1/3}$ is continuous but not differentiable at $0$.

✏️ Example 6 — A fold along the diagonal
Let $F(x,y)=(x+y,\ x^2+y^2)$. (a) Find where $F$ is locally invertible. (b) Show that $F$ is not injective on any neighbourhood of a point of the line $y=x$. (c) For the local inverse $G$ with $G(3,5)=(2,1)$, compute $J_G(3,5)$, and check the answer against an explicit formula for $G$.
(a) $J_F=\begin{pmatrix}1&1\\2x&2y\end{pmatrix}$, $\det J_F=2(y-x)$. By Theorem 1.8, $F$ is locally invertible at every point off the diagonal $y=x$.
(b) $F(x,y)=F(y,x)$. Every ball about a diagonal point $(c,c)$ contains pairs $(c+\delta,c-\delta)\ne(c-\delta,c+\delta)$ with the same image. So the converse half of Theorem 1.8 is confirmed: no local inverse exists at all there. Geometrically $F$ folds the plane along the diagonal onto the region $q\ge\tfrac12s^2$ in the $(s,q)$-plane.
(c) $F(2,1)=(3,5)$ and $J_F(2,1)=\begin{pmatrix}1&1\\4&2\end{pmatrix}$ with determinant $-2$, so $$J_G(3,5)=\frac{1}{-2}\begin{pmatrix}2&-1\\-4&1\end{pmatrix}=\begin{pmatrix}-1&\tfrac12\\2&-\tfrac12\end{pmatrix}.$$
Check $x$ and $y$ are the roots of $t^2-st+\tfrac12(s^2-q)=0$; on the side $x\gt y$, $x=\tfrac12\left(s+\sqrt{2q-s^2}\right)$, $y=\tfrac12\left(s-\sqrt{2q-s^2}\right)$. At $(s,q)=(3,5)$, $\sqrt{2q-s^2}=1$, and $x_s=\tfrac12-\tfrac{s}{2\sqrt{2q-s^2}}=-1$, $x_q=\tfrac{1}{2\sqrt{2q-s^2}}=\tfrac12$, $y_s=2$, $y_q=-\tfrac12$. ✓

An equation $F(x,y)=0$ describes a curve, not usually a graph. Near which of its points can we solve for $y$ as a function of $x$? For a linear equation $\alpha x+\beta y=0$ the answer is "when $\beta\ne0$"; the implicit function theorem says the same with $\beta$ replaced by $F_y$.

📐 Theorem 1.9 — Implicit function theorem

One equation. Let $F$ be $C^1$ on an open set of $\mathbb{R}^{n+1}$, with points written $(x,y)$, $x\in\mathbb{R}^n$, $y\in\mathbb{R}$. If $F(a,b)=0$ and $F_y(a,b)\ne0$, there are open sets $A\ni a$, $B\ni b$ and a unique function $g:A\to B$ such that, for $(x,y)\in A\times B$, $F(x,y)=0\iff y=g(x)$. Moreover $g$ is $C^1$ ($C^k$ if $F$ is) and

$$\frac{\partial g}{\partial x_j}=-\frac{F_{x_j}}{F_y}\quad\text{evaluated at }(x,g(x)).$$

So for a curve $F(x,y)=0$: $\dfrac{dy}{dx}=-\dfrac{F_x}{F_y}$; for a surface $F(x,y,z)=0$ with $F_z\ne0$: $z_x=-\dfrac{F_x}{F_z}$, $z_y=-\dfrac{F_y}{F_z}$.

Systems. If $F,G$ are $C^1$ functions of $(x,y,u,v)$ with $F=G=0$ at a point where $\dfrac{\partial(F,G)}{\partial(u,v)}\ne0$, then near it the system defines $u,v$ as $C^1$ functions of $(x,y)$, and (Cramer's rule)

$$u_x=-\frac{\partial(F,G)/\partial(x,v)}{\partial(F,G)/\partial(u,v)},$$ $$v_x=-\frac{\partial(F,G)/\partial(u,x)}{\partial(F,G)/\partial(u,v)},$$

and similarly for $u_y,v_y$. In general $m$ equations can be solved for $m$ of the unknowns where the $m\times m$ Jacobian with respect to those unknowns is nonsingular.

Proof (idea). Apply Theorem 1.8 to $\Phi(x,y)=(x,F(x,y))$. Its Jacobian is block-triangular, $\begin{pmatrix}I&0\\D_xF&F_y\end{pmatrix}$, with determinant $F_y(a,b)\ne0$, so $\Phi$ has a $C^1$ local inverse, which (since $\Phi$ keeps $x$) has the form $(x,w)\mapsto(x,h(x,w))$. Then $g(x)=h(x,0)$ solves $F(x,g(x))=0$, and every solution near $(a,b)$ is of this form. The derivative formula follows by differentiating $F(x,g(x))=0$ with the chain rule: $F_{x_j}+F_y\,\partial g/\partial x_j=0$. For systems, differentiate $F=G=0$ with respect to $x$ and solve the resulting $2\times2$ linear system for $u_x,v_x$. ∎

✏️ Example 7 — Implicit derivatives: a curve, a surface, a system
(a) Show that $x^2-xy+y^3=1$ defines $y=g(x)$ near $(1,1)$ and compute $g'(1)$ and $g''(1)$. (b) Show that $xyz+x^2+z^3=3$ defines $z=h(x,y)$ near $(1,1,1)$ and find $z_x,z_y$ there. (c) Near $(u,v)=(1,1)$, $(x,y)=(2,0)$, the equations $x=u+v^2$, $y=u^2-v$ can be solved for $u,v$ as functions of $(x,y)$. Find $u_x,u_y,v_x,v_y$ at $(2,0)$.
(a) First derivative $F=x^2-xy+y^3-1$ is a polynomial, $F(1,1)=0$, $F_x=2x-y=1$ and $F_y=-x+3y^2=2\ne0$ at $(1,1)$. Theorem 1.9 applies and $g'(1)=-\tfrac{1}{2}$.
(a) Second derivative Differentiate $2x-y-xy'+3y^2y'=0$ once more: $2-2y'-xy''+6y(y')^2+3y^2y''=0$. At $x=y=1$, $y'=-\tfrac12$: $2+1+\tfrac32+2y''=0$, so $g''(1)=-\tfrac94$. (The curve has a vertical-tangent problem only where $F_y=0$, i.e. $x=3y^2$; on the curve this happens at two points, $y\approx-0.529$ and $y\approx0.642$ — not near $(1,1)$.)
(b) $F=xyz+x^2+z^3-3$: $F(1,1,1)=0$, $F_x=yz+2x=3$, $F_y=xz=1$, $F_z=xy+3z^2=4\ne0$. So $z_x=-\tfrac34$ and $z_y=-\tfrac14$.
(c) This is the inverse function theorem for $(u,v)\mapsto(x,y)$: $\dfrac{\partial(x,y)}{\partial(u,v)}=\det\begin{pmatrix}1&2v\\2u&-1\end{pmatrix}=-1-4uv=-5$ at $(1,1)$, and $$\begin{pmatrix}u_x&u_y\\v_x&v_y\end{pmatrix}=\begin{pmatrix}1&2\\2&-1\end{pmatrix}^{-1}=\begin{pmatrix}\tfrac15&\tfrac25\\\tfrac25&-\tfrac15\end{pmatrix}.$$ Check one entry by differentiating the equations in $x$: $1=u_x+2v\,v_x$ and $0=2u\,u_x-v_x$ give $v_x=2u_x$ and $1=5u_x$. ✓

When $F_y=0$ at a point, the theorem is silent — it does not say that no implicit function exists. $(y-x)^2=0$ is the smooth graph $y=x$ although $F_y=0$ everywhere on it; $y^3=x$ is the graph of the continuous (not differentiable) function $x^{1/3}$; $y^2=x^2$ consists of two crossing lines and is not a graph near $0$; $x^2+y^2=0$ is a single point. Interactive 2 below walks along four curves and shows where $F_y$ vanishes and what happens there.

⚠️ Counterexamples and pitfalls
  1. Lines do not decide limits. $\frac{xy^3}{x^2+y^6}\to0$ along every line through $0$ but equals $\tfrac12$ on $x=y^3$.
  2. Iterated limits. $\frac{xy}{x^2+y^2}$: both iterated limits $0$, no double limit. $x\sin\frac1y+y\sin\frac1x$: double limit $0$, no iterated limits. $\frac{x-y}{x+y}$: iterated limits $1$ and $-1$, so no double limit.
  3. Partials exist $\not\Rightarrow$ continuous. $\frac{xy}{x^2+y^2}$ at $0$.
  4. All directional derivatives exist (and are even linear in $u$) $\not\Rightarrow$ continuous. $\frac{x^3y}{x^6+y^2}$ at $0$: $D_uf=0$ for every $u$, but $f=\tfrac12$ on $y=x^3$.
  5. Continuous with all directional derivatives $\not\Rightarrow$ differentiable. $\frac{x^3}{x^2+y^2}$: $D_uf(0)=u_1^3$, not linear.
  6. Continuous with both partials $\not\Rightarrow$ differentiable. $\sqrt{|xy|}$ at $0$ (non-axis directional derivatives do not even exist).
  7. Differentiable $\not\Rightarrow$ $C^1$. $(x^2+y^2)\sin\frac1{x^2+y^2}$: differentiable at $0$, partials unbounded near $0$.
  8. Mixed partials can differ even for $C^1$ functions: $\frac{x^3y}{x^2+y^2}$ has $f_{xy}(0,0)=0$, $f_{yx}(0,0)=1$; the classical $\frac{xy(x^2-y^2)}{x^2+y^2}$ has $-1$ and $1$. Read the notation: in this course $f_{xy}=(f_x)_y$; some texts write $\frac{\partial^2f}{\partial x\partial y}$ for $(f_y)_x$.
  9. The chain rule needs differentiability of the outer function. $\frac{x^3}{x^2+y^2}$ along $(t,t)$: $(f\circ\gamma)'(0)=\tfrac12\ne\nabla f(0)\cdot\gamma'(0)=1$.
  10. Normalise the direction. "In the direction of $(2,1,-2)$" means $u=\tfrac13(2,1,-2)$; $\nabla f\cdot v$ with $\|v\|\ne1$ is off by the factor $\|v\|$.
  11. Euler applies to the homogeneous function, not to its logarithm or inverse tangent. If $e^u$ or $\tan u$ is homogeneous of degree $k$, then $xu_x+yu_y$ is $k$ or $\tfrac k2\sin2u$ — not $ku$.
  12. Inverse function theorem is local. $(x+y,x^2+y^2)$ folds along $y=x$; the polar map has positive Jacobian and is not injective. $\det J_F(a)\ne0$ is not necessary for a continuous inverse: $(x^3,y)$ is a homeomorphism of $\mathbb{R}^2$ with Jacobian $0$ on the $y$-axis.
  13. $F_y=0$ does not forbid an implicit function: $(y-x)^2=0$, $y^3=x$. And $F_y\ne0$ gives only a local solution: $x^2+y^2=1$ is a graph near $(0,1)$ but not globally.
📚 Go deeper — full proofs in the CSIR NET course

Two Labs

Interactive 1 — Directional Derivatives on a Contour Map

Left: level curves of $f$ near the point $a$ (shaded red where $f\gt f(a)$, blue where $f\lt f(a)$). The purple unit vector $u=(\cos\theta,\sin\theta)$ turns about $a$; the green arrow is $\nabla f(a)$. Right: the solid curve is $\theta\mapsto D_uf(a)$, the dashed curve is the prediction of differentiability, $\nabla f(a)\cdot u$. Below them, $R(\rho)$ is the largest value of $|f(a+h)-f(a)-\nabla f(a)\cdot h|/\rho$ on the circle $\|h\|=\rho$; $f$ is differentiable at $a$ exactly when $R(\rho)\to0$. Slide $\rho$ towards $0$.

θ—
D_u f(a)—
∇f(a)·u—
ρ—
R(ρ)—
Interactive 2 — Where Can $F(x,y)=0$ Be Solved for $y$?

A point $P$ walks along the curve $F(x,y)=0$ (left), drawing its tangent line. Where $F_y(P)\ne0$ the curve is locally a graph $y=g(x)$ with slope $-F_x/F_y$, shown inside the green window; at the red points $F_y=0$ and the implicit function theorem is silent. Right: the value of $F_y$ along the walk — its zeros are exactly the red points. Choose a curve and press Play, or drag the slider.

P—
F_x(P)—
F_y(P)—
dy/dx = −F_x/F_y—

Exercises

I
Limits and continuity. In parts 1–6 decide whether the limit as $(x,y)\to(0,0)$ exists, and find it if it does.
  • 1 $\dfrac{x^2-2y^2}{x^2+y^2}$.
  • 2 $\dfrac{x^4y}{x^8+y^2}$.
  • 3 $\dfrac{x^2\sin^2y}{x^2+2y^2}$.
  • 4 $\dfrac{e^{x^2+y^2}-1}{x^2+y^2}$.
  • 5 $\dfrac{x^3y^2}{x^4+y^4}$.
  • 6 $\dfrac{xy}{|x|+|y|}$.
  • 7 Let $f(x,y)=\dfrac{x-y}{x+y}$ for $x+y\ne0$. Compute both iterated limits at $(0,0)$ and decide whether the double limit exists.
  • 8 For $p,q\gt0$ let $f(x,y)=\dfrac{|x|^p|y|^q}{x^2+y^2}$ for $(x,y)\ne(0,0)$, $f(0,0)=0$. Find exactly when $f$ is continuous at the origin.
1 On $y=mx$ the value is $\frac{1-2m^2}{1+m^2}$: $1$ for $m=0$, $-\tfrac12$ for $m=1$. No limit (equal degrees, not constant).
2 Lines: $\frac{mx^5}{x^8+m^2x^2}=\frac{mx^3}{x^6+m^2}\to0$ (and $0$ on the axes). On $y=x^4$: $\frac{x^8}{2x^8}=\tfrac12$. No limit.
3 $\frac{x^2}{x^2+2y^2}\le1$, so $0\le f\le\sin^2y\le y^2\to0$. Limit $0$.
4 A function of $s=x^2+y^2\to0^+$ only: $\frac{e^s-1}{s}\to1$. Limit $1$.
5 $x^4+y^4\ge\tfrac12(x^2+y^2)^2=\tfrac12\rho^4$ and $|x^3y^2|\le\rho^5$, so $|f|\le2\rho\to0$. Limit $0$.
6 $\frac{|xy|}{|x|+|y|}\le\frac{|x|\,|y|}{|y|}=|x|$ when $y\ne0$, and $f=0$ when $y=0$; so $|f|\le|x|\le\rho$. Limit $0$.
7 For fixed $x\ne0$: $\lim_{y\to0}\frac{x-y}{x+y}=1$, so $\lim_x\lim_yf=1$; for fixed $y\ne0$: $\lim_{x\to0}=-1$, so $\lim_y\lim_xf=-1$. Different iterated limits: by Theorem 1.2 the double limit does not exist.
8 In polar form $f=\rho^{p+q-2}|\cos\theta|^p|\sin\theta|^q$. If $p+q\gt2$, $|f|\le\rho^{p+q-2}\to0$: continuous. If $p+q\le2$, on $y=x$ the value is $2^{-(p+q)/2}\rho^{p+q-2}$, which tends to $2^{-1}\ne0$ (case $p+q=2$) or to $\infty$. Continuous exactly when $p+q\gt2$.
II
Partial, directional and total derivatives.
  • 1 For $f(x,y)=x^2e^y+y\log x$ find $\nabla f(1,0)$ and the directional derivative at $(1,0)$ in the direction of $(3,-4)$.
  • 2 Modelling. The temperature in a room (in °C, with $x,y,z$ in metres) is $T=100-x^2-2y^2-3z^2$. A heat-seeking sensor at $(1,1,1)$ wants to cool down as fast as possible. In which direction should it move, and at what rate does $T$ fall in that direction?
  • 3 Find the tangent plane and normal line to the surface $z=x^2+xy-y^2$ at $(1,2,-1)$.
  • 4 Find the angle between the surfaces $x^2+y^2+z^2=9$ and $z=x^2+y^2-3$ at $(2,-1,2)$ (the angle between their normals).
  • 5 Show that $f(x,y)=|x|+|y|$ is continuous but not differentiable at $(0,0)$.
  • 6 Let $f(x,y)=\dfrac{xy^2}{x^2+y^2}$, $f(0,0)=0$. Find $D_uf(0,0)$ for every unit vector $u$, and decide whether $f$ is differentiable at the origin.
  • 7 Let $f(x,y)=x|y|$. Is $f$ differentiable at $(0,0)$? At $(1,0)$?
  • 8 Let $f:\mathbb{R}^2\to\mathbb{R}$ be differentiable at $a$ with $\nabla f(a)\ne0$. Show that there are exactly two unit vectors $u$ with $D_uf(a)=0$, and describe them.
  • 9 Let $f(x,y)=(x^3+y^3)^{1/3}$ (the real cube root). Find all points at which $f$ is differentiable.
1 $f_x=2xe^y+\frac yx$, $f_y=x^2e^y+\log x$; $\nabla f(1,0)=(2,1)$. With $u=\tfrac15(3,-4)$: $D_uf=\tfrac15(6-4)=\tfrac25$.
2 $\nabla T=(-2x,-4y,-6z)=(-2,-4,-6)$ at $(1,1,1)$. $T$ decreases fastest in the direction $-\nabla T/\|\nabla T\|=\tfrac{1}{\sqrt{14}}(1,2,3)$, at the rate $\|\nabla T\|=\sqrt{56}=2\sqrt{14}\approx7.48$ °C per metre.
3 $z_x=2x+y=4$, $z_y=x-2y=-3$ at $(1,2)$. Tangent plane $z+1=4(x-1)-3(y-2)$, i.e. $4x-3y-z=-1$; normal line $(1+4t,\ 2-3t,\ -1-t)$.
4 Normals: $\nabla(x^2+y^2+z^2)=(4,-2,4)$ and $\nabla(x^2+y^2-z)=(4,-2,-1)$. $\cos\phi=\frac{16+4-4}{6\sqrt{21}}=\frac{8}{3\sqrt{21}}\approx0.5819$, so $\phi\approx54.4^\circ$.
5 $|f(x,y)|\le2\|(x,y)\|$ gives continuity. $\frac{f(h,0)-f(0,0)}{h}=\frac{|h|}{h}$ has no limit, so $f_x(0,0)$ does not exist; hence $f$ is not differentiable.
6 $f(tu)/t=u_1u_2^2$ for a unit $u$, so $D_uf(0)=u_1u_2^2$ and $\nabla f(0)=(0,0)$. Differentiability would force $D_uf(0)=0$ for all $u$, but $u=\tfrac1{\sqrt2}(1,1)$ gives $\tfrac{1}{2\sqrt2}$. Not differentiable (although $|f|\le|x|$ makes it continuous).
7 At $(0,0)$: $|f(h)|=|h_1||h_2|\le\|h\|^2$, so $f(h)/\|h\|\to0$: differentiable with $Df=0$. At $(1,0)$: $\frac{f(1,k)-f(1,0)}{k}=\frac{|k|}{k}$, so $f_y(1,0)$ does not exist: not differentiable. (In fact $f$ fails to be differentiable at every $(x,0)$ with $x\ne0$.)
8 $D_uf(a)=\nabla f(a)\cdot u=0$ means $u\perp\nabla f(a)$. In $\mathbb{R}^2$ the unit vectors perpendicular to a nonzero $(p,q)$ are exactly $\pm\frac{(-q,p)}{\sqrt{p^2+q^2}}$ — the two directions of the tangent to the level curve through $a$.
9 Where $x^3+y^3\ne0$, $f$ is a composite of $C^1$ functions, hence differentiable. At $0$: $f(tu)/t=(u_1^3+u_2^3)^{1/3}$, so $\nabla f(0)=(1,1)$ but for $u=\tfrac1{\sqrt2}(1,1)$, $D_uf=2^{-1/6}\approx0.891\ne\sqrt2$: not differentiable. At $(c,-c)$, $c\ne0$: $f(c+h,-c)=\left((c+h)^3-c^3\right)^{1/3}\approx(3c^2h)^{1/3}$, so $f_x$ does not exist. Answer: exactly the points off the line $x+y=0$.
III
Chain rule, Euler's theorem, mixed partials.
  • 1 Let $z=x^2y$ with $x=\cos t$, $y=\sin t$. Use the chain rule to find $dz/dt$ at $t=\pi/4$.
  • 2 Let $f,g\in C^2(\mathbb{R})$, $c\gt0$, and $w(x,t)=f(x+ct)+g(x-ct)$. Show that $w_{tt}=c^2w_{xx}$.
  • 3 Let $u=f(r)$ with $r=\sqrt{x^2+y^2+z^2}\gt0$ and $f\in C^2$. Show that $u_{xx}+u_{yy}+u_{zz}=f''(r)+\frac2rf'(r)$, and find all such $u$ with $u_{xx}+u_{yy}+u_{zz}=0$.
  • 4 For $x,y\gt0$ let $u=\dfrac{x^{1/3}+y^{1/3}}{x^{1/2}+y^{1/2}}$. Express $xu_x+yu_y$ and $x^2u_{xx}+2xyu_{xy}+y^2u_{yy}$ in terms of $u$.
  • 5 For $x,y\gt0$ let $z=\tan^{-1}\dfrac{x^2+y^2}{x+y}$. Show that $xz_x+yz_y=\tfrac12\sin2z$.
  • 6 Let $f(x,y)=\dfrac{xy^3}{x^2+y^2}$, $f(0,0)=0$. Compute $f_{xy}(0,0)$ and $f_{yx}(0,0)$.
  • 7 If $x=u(1-v)$, $y=uv(1-w)$, $z=uvw$, compute $\dfrac{\partial(x,y,z)}{\partial(u,v,w)}$.
1 $\frac{dz}{dt}=z_xx'+z_yy'=2xy(-\sin t)+x^2\cos t$. At $t=\pi/4$ this is $2\cdot\tfrac12\cdot\left(-\tfrac{1}{\sqrt2}\right)+\tfrac12\cdot\tfrac1{\sqrt2}$, which equals $-\tfrac{1}{2\sqrt2}=-\tfrac{\sqrt2}{4}\approx-0.354$.
2 $w_t=cf'(x+ct)-cg'(x-ct)$, $w_{tt}=c^2f''+c^2g''$; $w_x=f'+g'$, $w_{xx}=f''+g''$. So $w_{tt}=c^2w_{xx}$ — d'Alembert's form of the wave equation (Chapter 10).
3 $r_x=x/r$, so $u_x=f'(r)\frac xr$ and $u_{xx}=f''\frac{x^2}{r^2}+f'\left(\frac1r-\frac{x^2}{r^3}\right)$. Summing over $x,y,z$: $f''+f'\left(\frac3r-\frac1r\right)=f''+\frac2rf'$. Then $\Delta u=0\iff(r^2f')'=0\iff f=A+\frac Br$.
4 $u$ is homogeneous of degree $\tfrac13-\tfrac12=-\tfrac16$. By Theorem 1.6, $xu_x+yu_y=-\tfrac16u$ and the second expression is $k(k-1)u=\left(-\tfrac16\right)\left(-\tfrac76\right)u=\tfrac{7}{36}u$.
5 $\tan z$ is homogeneous of degree $1$, so $x(\tan z)_x+y(\tan z)_y=\tan z$, i.e. $\sec^2z\,(xz_x+yz_y)=\tan z$, giving $xz_x+yz_y=\sin z\cos z=\tfrac12\sin2z$.
6 $f_x(0,y)=\lim_{h\to0}\frac{f(h,y)}{h}=\lim\frac{y^3}{h^2+y^2}=y$ for $y\ne0$ (and $0$ for $y=0$), so $f_{xy}(0,0)=1$. $f_y(x,0)=\lim_{k\to0}\frac{f(x,k)}{k}=\lim\frac{xk^2}{x^2+k^2}=0$, so $f_{yx}(0,0)=0$. They differ; this is Example 5 with the roles of $x$ and $y$ exchanged.
7 $J=\det\begin{pmatrix}1-v&-u&0\\v(1-w)&u(1-w)&-uv\\vw&uw&uv\end{pmatrix}$. Add row 3 to row 2 (new row 2: $(v,u,0)$), then row 2 to row 1 (new row 1: $(1,0,0)$): $J=\det\begin{pmatrix}1&0&0\\v&u&0\\vw&uw&uv\end{pmatrix}=u^2v$.
IV
Inverse and implicit functions.
  • 1 Let $P(r,\theta)=(r\cos\theta,r\sin\theta)$ on $r\gt0$. Where is $P$ locally invertible? Is it injective? For the local inverse $Q$ with $Q(0,2)=(2,\pi/2)$ compute $J_Q(0,2)$, and compare with $r=\sqrt{x^2+y^2}$.
  • 2 Show that $F(x,y)=(x^3,y^3)$ is a continuous bijection of $\mathbb{R}^2$ with continuous inverse, but is not locally invertible in the sense of Definition 1.6 at points of the axes.
  • 3 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 injective on $\mathbb{R}^2$.
  • 4 Show that $x^2+2y^2+3z^2+xy-z=9$ defines $z$ as a $C^1$ function of $(x,y)$ near $(1,-2,1)$, and find $z_x$ and $z_y$ there.
  • 5 At which points of the circle $x^2+y^2=1$ does Theorem 1.9 let us write $y=g(x)$? $x=h(y)$? Compute $g''$ in terms of $x$ and $y$.
  • 6 Show that $ye^y=x$ defines $y=g(x)$ near $(0,0)$ and compute $g'(0)$ and $g''(0)$.
  • 7 The equations $xu+yv^2=2$, $x^2v+yu^3=2$ hold at $(x,y,u,v)=(1,1,1,1)$. Show that they define $u,v$ as functions of $(x,y)$ nearby and find $u_x$ and $v_x$ there.
  • 8 Thermodynamics. Three quantities $P,V,T$ are related by $F(P,V,T)=0$ with $F\in C^1$ and all three partials of $F$ nonzero. Show that $\left(\dfrac{\partial P}{\partial V}\right)_T\left(\dfrac{\partial V}{\partial T}\right)_P\left(\dfrac{\partial T}{\partial P}\right)_V=-1$, and verify it for an ideal gas $PV=nRT$.
1 $J_P=\begin{pmatrix}\cos\theta&-r\sin\theta\\\sin\theta&r\cos\theta\end{pmatrix}$, $\det=r\gt0$: locally invertible everywhere on $r\gt0$, but not injective ($\theta$ and $\theta+2\pi$). At $(2,\pi/2)$, $J_P=\begin{pmatrix}0&-2\\1&0\end{pmatrix}$, so $J_Q(0,2)=\begin{pmatrix}0&1\\-\tfrac12&0\end{pmatrix}$: $r_x=0$, $r_y=1$, $\theta_x=-\tfrac12$, $\theta_y=0$. Check: $r_y=y/r=1$, $\theta_x=-y/(x^2+y^2)=-\tfrac12$. ✓
2 $F^{-1}(u,v)=(u^{1/3},v^{1/3})$ is continuous, so $F$ is a homeomorphism. At $(0,b)$, $\det J_F=9x^2y^2=0$; by the converse in Theorem 1.8 no differentiable local inverse exists there (indeed $u^{1/3}$ is not differentiable at $u=0$).
3 $J_F=\begin{pmatrix}1&\tfrac12\cos y\\\tfrac12\cos x&1\end{pmatrix}$, so $\det J_F=1-\tfrac14\cos x\cos y\ge\tfrac34$. Injective: write $F=\mathrm{id}+G$ with $G=(\tfrac12\sin y,\tfrac12\sin x)$; $\|J_G\|\le\tfrac12$, so $\|G(p)-G(q)\|\le\tfrac12\|p-q\|$. If $F(p)=F(q)$ then $\|p-q\|=\|G(q)-G(p)\|\le\tfrac12\|p-q\|$, so $p=q$.
4 $F(1,-2,1)=1+8+3-2-1-9=0$; $F_x=2x+y=0$, $F_y=4y+x=-7$, $F_z=6z-1=5\ne0$. Hence $z_x=0$ and $z_y=\tfrac75$.
5 $F_y=2y\ne0$ except at $(\pm1,0)$, so $y=g(x)$ near every other point; $F_x=2x\ne0$ except at $(0,\pm1)$, so $x=h(y)$ near every other point. $g'=-x/y$ and $g''=-\frac{y-xg'}{y^2}=-\frac{x^2+y^2}{y^3}=-\frac1{y^3}$.
6 $F=ye^y-x$, $F_y=(1+y)e^y=1$ at $(0,0)$. Differentiating, $(1+y)e^yy'=1$, so $g'(0)=1$; again, $(2+y)e^y(y')^2+(1+y)e^yy''=0$ gives $g''(0)=-2$. ($g$ is the Lambert $W$ function: $W(x)=x-x^2+\tfrac32x^3-\cdots$.)
7 $\frac{\partial(F,G)}{\partial(u,v)}=\det\begin{pmatrix}x&2yv\\3yu^2&x^2\end{pmatrix}=1-6=-5\ne0$. Differentiating in $x$ (with $y=1$ fixed) at the point: $1+u_x+2v_x=0$ and $2+v_x+3u_x=0$. Hence $v_x=-\tfrac15$ and $u_x=-\tfrac35$ (the same as Cramer's formula in Theorem 1.9).
8 By Theorem 1.9, $\left(\frac{\partial P}{\partial V}\right)_T=-\frac{F_V}{F_P}$, $\left(\frac{\partial V}{\partial T}\right)_P=-\frac{F_T}{F_V}$, $\left(\frac{\partial T}{\partial P}\right)_V=-\frac{F_P}{F_T}$; the product is $(-1)^3=-1$. Ideal gas: $-\frac{nRT}{V^2}\cdot\frac{nR}{P}\cdot\frac{V}{nR}=-\frac{nRT}{PV}=-1$. (The naive "cancel the $\partial$'s" would give $+1$.)
🎯 GATE corner GATE MA · MCQGATE MA · MSQGATE MA · NAT

E1. GATE MA · MCQ Let $f(x,y,z)=xe^{yz}+y^2$. The directional derivative of $f$ at $P=(2,1,0)$ in the direction from $P$ towards $Q=(4,3,1)$ is (A) $\tfrac83$; (B) $8$; (C) $3$; (D) $\tfrac73$.

Idea $D_uf=\nabla f\cdot u$ with the unit vector along $\overrightarrow{PQ}$.
Compute $\nabla f=(e^{yz},\ xze^{yz}+2y,\ xye^{yz})=(1,2,2)$ at $P$. $\overrightarrow{PQ}=(2,2,1)$, of length $3$. $D_uf=\tfrac13(2+4+2)=\tfrac83$.
Options (B) $8$ forgets to normalise; (C) $3=\|\nabla f(P)\|$ is the maximal rate, not the rate towards $Q$; (D) is an arithmetic slip.
Answer (A).

E2. GATE MA · MCQ Let $f(x,y)=\dfrac{x^3-2y^3}{x^2+y^2}$ for $(x,y)\ne(0,0)$ and $f(0,0)=0$. Which of the following is true? (A) $f$ is not continuous at $(0,0)$; (B) $f_x(0,0)=0$; (C) all directional derivatives of $f$ exist at $(0,0)$ and $D_uf(0,0)=\nabla f(0,0)\cdot u$ for every unit vector $u$; (D) all directional derivatives of $f$ exist at $(0,0)$, but $f$ is not differentiable at $(0,0)$.

Idea Homogeneous of degree $1$: $f(tu)=t\,f(u)$, so $D_uf(0)=f(u)$ — directional derivatives always exist, and differentiability asks whether $u\mapsto f(u)$ is linear.
Options (A) False: $|f|\le\frac{|x|^3+2|y|^3}{\rho^2}\le3\rho$. (B) False: $f(h,0)/h=1$, so $f_x(0,0)=1$ (and $f_y(0,0)=-2$). (C) False: for unit $u$, $D_uf(0)=u_1^3-2u_2^3$, while $\nabla f(0)\cdot u=u_1-2u_2$; at $u=\tfrac1{\sqrt2}(1,1)$ these are $-\tfrac{1}{2\sqrt2}$ and $-\tfrac1{\sqrt2}$. (D) True, by the same computation and Theorem 1.3(2).
Answer (D).

E3. GATE MA · MSQ Let $f(x,y)=\dfrac{xy(x^2-y^2)}{x^2+y^2}$ for $(x,y)\ne(0,0)$ and $f(0,0)=0$. Which of the following statements is/are true? (One or more options may be correct.) (A) $f_x$ and $f_y$ are continuous on $\mathbb{R}^2$. (B) $f_{xy}(0,0)=f_{yx}(0,0)$. (C) $f$ is differentiable at $(0,0)$. (D) $f_{xx}(0,0)=0$.

(A) True Away from $0$, $f_x=\dfrac{y(x^4+4x^2y^2-y^4)}{(x^2+y^2)^2}$, so $|f_x|\le\dfrac{\rho\cdot6\rho^4}{\rho^4}=6\rho\to0=f_x(0,0)$ ($f=0$ on the axes). By the symmetry $f(y,x)=-f(x,y)$ the same holds for $f_y$.
(B) False $f_x(0,y)=\lim_{h\to0}\frac{f(h,y)}{h}=\frac{y(-y^2)}{y^2}=-y$, so $f_{xy}(0,0)=-1$; $f_y(x,0)=\lim_{k\to0}\frac{f(x,k)}{k}=\frac{x\cdot x^2}{x^2}=x$, so $f_{yx}(0,0)=1$.
(C) True By (A) and Theorem 1.4 ($f\in C^1$). Directly: $|f|\le\tfrac12\rho^2$.
(D) True The formula for $f_x$ vanishes at $y=0$, and $f_x(0,0)=0$; so $f_x(x,0)=0$ for all $x$ and $f_{xx}(0,0)=0$.
Answer (A), (C) and (D).

E4. GATE MA · MSQ Consider the equation $xe^y+ye^x=0$ near $(0,0)$. Which of the following is/are true? (One or more options may be correct.) (A) Near $(0,0)$ the equation defines $y=g(x)$ for a unique $C^\infty$ function $g$ with $g(0)=0$. (B) $g'(0)=-1$. (C) $g''(0)=0$. (D) Near $(0,0)$ the equation also defines $x$ as a $C^1$ function of $y$.

(A) True $F=xe^y+ye^x$ is $C^\infty$, $F(0,0)=0$, $F_y=xe^y+e^x=1\ne0$ at $0$. Theorem 1.9.
(B) True $F_x=e^y+ye^x=1$ at $0$, so $g'(0)=-F_x/F_y=-1$.
(C) False Expand $F$ to second order: $F=x+y+2xy+\cdots$. Substituting $y=-x+cx^2+\cdots$ gives $cx^2-2x^2+O(x^3)=0$, so $c=2$ and $g''(0)=2c=4$. (Symmetry of the curve about $y=x$ does not force $g''(0)=0$.)
(D) True $F_x(0,0)=1\ne0$; by symmetry the solution is $x=g(y)$.
Answer (A), (B) and (D).

E5. GATE MA · NAT The equation $x^3+y^3+xy=3$ defines $y=g(x)$ near $(1,1)$. The value of $g''(1)$ is ______ (correct to two decimal places).

First derivative $3x^2+3y^2y'+y+xy'=0$; at $(1,1)$: $3+3y'+1+y'=0$, so $y'=-1$.
Second derivative Differentiate again: $6x+6y(y')^2+3y^2y''+2y'+xy''=0$. At $(1,1)$ with $y'=-1$: $6+6+3y''-2+y''=0$, so $4y''=-10$.
Answer $g''(1)=-2.5$. Answer: $-2.50$ (accept $-2.51$ to $-2.49$).

E6. GATE MA · NAT For $x,y\gt0$ let $u(x,y)=\dfrac{x^3+y^3}{\sqrt x+\sqrt y}$. The value of $x^2u_{xx}+2xyu_{xy}+y^2u_{yy}$ at $(1,1)$ is ______ (correct to two decimal places).

Idea $u$ is homogeneous of degree $3-\tfrac12=\tfrac52$ and $C^2$ on the open quadrant; Theorem 1.6 gives $k(k-1)u$.
Compute $u(1,1)=\tfrac22=1$ and $k(k-1)=\tfrac52\cdot\tfrac32=\tfrac{15}{4}$.
Answer $3.75$ (accept $3.74$ to $3.76$). The trap value $2.50$ is $ku$, the first-order identity.
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Limits and the meaning of the derivative. Definition 1.1, Theorems 1.1–1.2 and Example 1 (ask the class to vote on (b) before revealing the curve $x=y^3$). Definitions 1.2–1.3, Theorem 1.3 with proof, Example 2 as a timed GATE drill (three minutes).
  2. Differentiability in practice. The strategy box, Theorem 1.4 with the two-step proof drawn on the board, Example 3. Project Interactive 1 and run the four functions in order; before each one, ask students to predict whether the solid and dashed curves will agree and whether $R(\rho)\to0$. Then the chain rule (Theorem 1.5), Euler's theorem and Example 4.
  3. Mixed partials and implicit functions. Theorem 1.7 and Example 5; Theorems 1.8–1.9 with the proof ideas; Examples 6 and 7. Project Interactive 2 on the nodal cubic and the cusp to show what "the theorem is silent" means. Finish with GATE corner E3 and E4 done live, deciding every option.

Discussion questions. (1) A function has a directional derivative in every direction at $a$, and $u\mapsto D_uf(a)$ is linear. What extra information would you need to conclude differentiability, and why does $\frac{x^3y}{x^6+y^2}$ show you need it? (2) Why does the chain rule fail for $\frac{x^3}{x^2+y^2}$ along the diagonal, although the composite is perfectly differentiable? (3) The implicit function theorem gives a function only near a point. On the circle $x^2+y^2=1$, what is the largest open interval of $x$ on which the solution through $(0,1)$ is defined, and why does it stop there?

Misconceptions to watch for. Proving a limit by trying lines; differentiating a formula valid only away from the origin and "substituting $0$"; forgetting to normalise a direction; applying Euler's theorem to $u$ when only $e^u$ or $\tan u$ is homogeneous; assuming $f_{xy}=f_{yx}$ without continuity; reading the inverse function theorem as a global statement; believing $F_y=0$ means "no implicit function".

Suggested homework. I(2, 5, 7, 8), II(1, 2, 4, 6, 9), III(3, 4, 6, 7), IV(1, 3, 5, 7, 8); GATE corner E2, E3, E5.

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

Research question. Where does a two-link robot arm lose the ability to move its hand in every direction, and what happens to an inverse-kinematics solver near those positions?

Why it matters. Industrial arms in car factories, surgical robots and the arms on planetary rovers are controlled by solving $F(\theta)=p$ for the joint angles $\theta$ that place the hand at a target $p$. The inverse function theorem (Theorem 1.8) says this is locally possible, with a smooth answer, exactly where the Jacobian of $F$ is nonsingular. At singular configurations the arm loses a direction of motion, and controllers that ignore this demand huge joint speeds.

What to do.

  1. For link lengths $L_1=1$, $L_2=0.7$, the hand is at $F(\theta_1,\theta_2)=(x,y)$ with $x=L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2)$ and $y=L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)$. Compute $\det J_F$ by hand and find all singular configurations. Describe them geometrically.
  2. Show that the image of $F$ is the annulus $0.3\le\|p\|\le1.7$ and that the singular configurations map exactly onto its two boundary circles. Why is that no accident?
  3. Implement Newton's method $\theta_{k+1}=\theta_k+J_F(\theta_k)^{-1}(p-F(\theta_k))$ for targets $p=(r,0)$ with $r=1.0,\ 1.5,\ 1.65,\ 1.69$, starting from $\theta_0=(0.3,0.3)$. Record the number of iterations and the size of the largest step.
  4. Most real targets have two solutions ("elbow up" and "elbow down"). Explain this with the non-injectivity of $F$, and say which solution Newton's method finds from different starting points.

Tools: Python with numpy (or any language with $2\times2$ linear algebra); a plotting tool for the workspace.

Hand in: the determinant and the list of singular configurations; a plot of the workspace with the two boundary circles; a table of Newton iterations for the four targets; a paragraph explaining what you observed as $r\to1.7$.

Going further. Read about the damped least-squares (Levenberg–Marquardt) method, which replaces $J^{-1}$ by $(J^{\mathsf T}J+\lambda^2I)^{-1}J^{\mathsf T}$. Why does it stay well behaved at singularities, and what does it give up?

Instructor note: $\det J_F=L_1L_2\sin\theta_2=0.7\sin\theta_2$, so the arm is singular when it is fully stretched ($\theta_2=0$, $\|p\|=1.7$) or fully folded ($\theta_2=\pi$, $\|p\|=0.3$). By the law of cosines, $\|p\|^2=L_1^2+L_2^2+2L_1L_2\cos\theta_2$. Newton converges in a handful of iterations for $r=1$ and $r=1.5$; as $r$ approaches $1.7$ the solutions approach the singular line $\theta_2=0$, the condition number of $J_F$ blows up and the iteration slows from quadratic to roughly linear convergence. Students should see the two solutions $\pm\theta_2$ (elbow up/down) for every interior target.

🧪 Self-check quiz

0/5 correct

Q1. For $f(x,y)=x^2y+y^3$, the maximum value of the directional derivative $D_uf(1,1)$ over all unit vectors $u$ is

Q2. Which condition guarantees that $f:\mathbb{R}^2\to\mathbb{R}$ is differentiable at $a$?

Q3. For $f(x,y)=\dfrac{x^3}{x^2+y^2}$, $f(0,0)=0$, and $u=\tfrac{1}{\sqrt2}(1,1)$, the directional derivative $D_uf(0,0)$ is

Q4. $f$ is differentiable on $\mathbb{R}^2\setminus\{0\}$, homogeneous of degree $3$, and $f(2,1)=4$. Then $2f_x(2,1)+f_y(2,1)$ equals

Q5. The equation $e^{xy}+y=2$ defines $y=g(x)$ near $(0,1)$. Then $g'(0)$ equals