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.
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)$.
Let $f:E\to\mathbb{R}$ and let $a$ be a limit point of $E\subseteq\mathbb{R}^n$.
- 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$.
- 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.
- 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$.
- 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.
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
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.
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.
Let $f=(f_1,\dots,f_m)$ be differentiable at $a$ with $T=Df(a)$. Then:
- $f$ is continuous at $a$, and $T$ is unique.
- $D_vf(a)$ exists for every $v$, and $D_vf(a)=Tv$; in particular $v\mapsto D_vf(a)$ is linear.
- 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)$.
- 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)$.
- 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)$. ∎
- Continuity first. Not continuous at $a$ $\Rightarrow$ not differentiable (Theorem 1.3(1)).
- 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$.
- 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.
- 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.
- Shortcut: continuous partial derivatives near $a$ give differentiability (Theorem 1.4); the converse is false.
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$.
The Chain Rule, Euler's Theorem and Mixed Partials
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$.
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$. ∎
For $C^2$ functions the order of differentiation in a mixed partial derivative does not matter. Without continuity it can matter.
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)$. ∎
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.
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$.
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$.
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$. ∎
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.
- 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$.
- 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.
- Partials exist $\not\Rightarrow$ continuous. $\frac{xy}{x^2+y^2}$ at $0$.
- 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$.
- Continuous with all directional derivatives $\not\Rightarrow$ differentiable. $\frac{x^3}{x^2+y^2}$: $D_uf(0)=u_1^3$, not linear.
- Continuous with both partials $\not\Rightarrow$ differentiable. $\sqrt{|xy|}$ at $0$ (non-axis directional derivatives do not even exist).
- Differentiable $\not\Rightarrow$ $C^1$. $(x^2+y^2)\sin\frac1{x^2+y^2}$: differentiable at $0$, partials unbounded near $0$.
- 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$.
- 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$.
- 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\|$.
- 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$.
- 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.
- $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.
- CSIR Unit 1 · §6.1 Partial, Directional and Total Derivatives — complete proofs of the chain rule, the mean value theorem and mean value inequality in $\mathbb{R}^n$, Schwarz's theorem under the weaker hypothesis, and Taylor's theorem in several variables, with more limit and differentiability counterexamples.
- CSIR Unit 1 · §6.2 Inverse and Implicit Function Theorems; Extrema — the full contraction-mapping proof of the inverse function theorem (injectivity, openness of the image, differentiability of the inverse) and the derivation of the implicit function theorem for systems.
Two Labs
Exercises
- 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 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 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 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$.
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$.
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)$.
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$.
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$.
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).
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).
Suggested plan — 3 lectures × 60 min.
- 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).
- 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.
- 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 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.
- 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.
- 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?
- 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.
- 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?
🧪 Self-check quiz
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