## 3.1 Partial Derivatives

For the partial differentiation of a function of two variables, $$z=f(x,y)$$, we find the partial derivative with respect to $$x$$ by regarding $$y$$ as a constant while differentiating the function with respect to $$x$$. Similarly, the partial derivative with respect to $$y$$ is found by regarding $$x$$ as a constant while differentiating with respect to $$y$$.

If $$z=f(x,y)$$ then the partial derivatives of $$f$$ with respect to $$x$$ and $$y$$ are the functions $$f_x$$ and $$f_y$$, respectively, defined by $f_x(x,y)=\lim _{\Delta x\to 0}\frac{f(x+\Delta x,y)-f(x,y)}{\Delta x}$ and $f_y(x,y)=\lim _{\Delta y\to 0}\frac{f(x,y+\text{\Delta y})-f(x,y)}{\Delta y}.$ The partial derivatives $$f_x$$ and $$f_y$$ are denoted by $f_x=\frac{\partial f}{\partial x}=\frac{\partial z}{\partial x}=\frac{\partial }{\partial x}f(x,y)=D_x(f)$ and $f_y=\frac{\partial f}{\partial y}=\frac{\partial z}{\partial y}=\frac{\partial }{\partial y}f(x,y)=D_y(f).$

Example 3.1 Find the partial derivatives of the function $f(x,y)=x^3+x^2y^3-2y^2$ at $$P=(2,1)$$.

Solution. Holding $$y$$ constant and differentiating with respect to $$x$$, we get $f_x(x,y)=3x^2+2x y^3$ and so $f_x(2,1)=3\left(2^2\right)+2(2)\left(1^3\right)=16.$ Holding $$x$$ constant and differentiating with respect to $$y$$, we get $f_y(x,y)=3x^2y^2-4y$ and so $$f_y(2,1)=3(2)^2(1)^2-4(1)=8$$.

Example 3.2 Find the partial derivatives of the function $$f$$ defined by $f(x,y)=4-x^2-2y^2$ at $$P=(1,1)$$. Explain graphical.

Solution. We have $f_x(x,y)=-2x \quad \text{and} \quad f_y(x,y)=-4y,$ and so $$f_x(1,1)=-2$$ and $$f_y(1,1)=-4.$$ The graph of $$f$$ is the paraboloid $z=4-x^2-2y^2$ and the vertical plane $$y=1$$ intersects it in the parabola $$z=2-x^2,y=1.$$ The slope of the tangent line to this parabola at the point $$(1,1,1)$$ is $$f_x(1,1)=-2$$. Similarly the curve in which the plane $$x=1$$ intersects the paraboloid is the parabola $$z=3-2y^2, x=1$$ and the slope of the tangent line at $$(1,1,1)$$ is $$f_y(1,1)=-4$$.

Definition 3.1 If $$f$$ is a function of the variables $$x_1,\ldots,x_n$$, then the partial derivative of $$f$$ with respect to $$x_k$$ is the function $$f_{x_k}$$ defined by $f_{x_k}(x_1, \ldots, x_n) = \lim _{\Delta x_k\to 0}\frac{f\left(x_1,\ldots,x_k+\Delta x_k,x_{k+1},\ldots,x_n\right)-f\left(x_1,\ldots,x_n\right)}{\Delta x_k}$ provided this limits exists.

Example 3.3 Find the partial derivatives $$f_x$$ and $$f_y$$ given $f(x,y)=\sin \left(\frac{x}{1+y}\right).$

Solution. Using the chain rule for functions of one variable, we have $f_x=\cos \left(\frac{x}{1+y}\right)\frac{\partial }{\partial x}\left(\frac{x}{1+y}\right)=\cos \left(\frac{x}{1+y}\right)\cdot \frac{1}{1+y}$ and $f_y=\cos \left(\frac{x}{1+y}\right)\frac{\partial }{\partial y}\left(\frac{x}{1+y}\right)=-\sin \left(\frac{x}{1+y}\right)\cdot \frac{x}{(1+y)^2}.$

Example 3.4 Find the partial derivatives $$\frac{\partial z}{\partial x}$$ and $$\frac{\partial z}{\partial y}$$ if $$z$$ is defined implicitly as a function of $$x$$ and $$y$$ by the equation $x^3+y^3+z^3+6x y z=1.$

Solution. To find $$\frac{\partial z}{\partial x}$$ we differentiate implicitly with respect to $$x$$, being careful to treat $$y$$ as a constant: $3x^2+3z^2\frac{\partial z}{\partial x}+6y z+6x y\frac{\partial z}{\partial x}=0.$ Solving this equation for $$\frac{\partial z}{\partial x}$$ we obtain $\frac{\partial z}{\partial x}=-\frac{x^2+2y z}{z^2+2x y}.$ Similarly, implicit differentiation with respect to $$y$$ gives $\frac{\partial z}{\partial y}=-\frac{y^2+2x z}{z^2+2xy}.$

Example 3.5 Suppose the system
$\begin{cases} x u+y v-u v & = 0 \\ y u-x v+u v & = 0 \end{cases}$ can be solved for $$u$$ and $$v$$ in terms of $$x$$ and $$y,$$ so that $$u=u(x,y)$$ and $$v=v(x,y).$$ Use implicit differentiation to find the partial derivatives $$\frac{\partial u}{\partial x}$$ and $$\frac{\partial v}{\partial x}.$$

Solution. We use implicit differentiation on $$x u+y v-u v = 0$$ to find $$\frac{\partial u}{\partial x}.$$ We have,
$u+x\frac{\partial u}{\partial x}+y\frac{\partial v}{\partial x}-\frac{\partial u}{\partial x}v-\frac{\partial v}{\partial x}u=0$ and so
$(x-v)\frac{\partial u}{\partial x}+(y-u)\frac{\partial v}{\partial x}=-u$ Also,
$y\frac{\partial u}{\partial x}-x\frac{\partial v}{\partial x}-v+u\frac{\partial v}{\partial x}+v\frac{\partial u}{\partial x}=0$ and so $(y+v)\frac{\partial u}{\partial x}+(-x+u)\frac{\partial v}{\partial x}=v$ So we can solve the system
$\begin{cases} (x-v)\frac{\partial u}{\partial x}+(y-u)\frac{\partial v}{\partial x} & =-u \\ (y+v)\frac{\partial u}{\partial x}+(-x+u)\frac{\partial v}{\partial x} & =v \end{cases}$ to obtain
$\frac{\partial u}{\partial x}=\frac{u^2-u v-u x+v y}{x^2+y^2-u x-u y-v x+v y}$ $\frac{\partial v}{\partial x}=\frac{v^2-u v-u x+v y}{x^2+y^2-u x-u y-v x+v y}$

## 3.2 Second-Order Partial Derivatives

The partial derivative is a function, so it is possible to take the partial derivative of a partial derivative. This is very much like taking the second derivative of a function of one variable if we take two consecutive partial derivatives with respect to the same variable, and the resulting derivative is called the second-order partial derivative with respect to that variable. However, we can also take the partial derivative with respect to one variable and then take a second partial derivative with respect to a different variable, producing what is called a second-order partial derivative.

The higher-order partial derivatives for a function of two variables $$f(x,y)$$ are denoted as $\frac{ \partial ^2f}{\partial x^2}=\frac{\partial }{\partial x}\left(\frac{\partial f}{\partial x}\right)=\left(f_x\right)_x=f_{x x}$ and $\frac{ \partial ^2f}{\partial y^2}=\frac{\partial }{\partial y}\left(\frac{\partial f}{\partial y}\right)=\left(f_y\right)_y=f_{y y}$ and the mixed second partial derivatives are denoted as $\frac{ \partial ^2f}{\partial x\partial y}=\frac{\partial }{\partial x}\left(\frac{\partial f}{\partial y}\right)=\left(f_y\right)_x=f_{y x}$ and $\frac{\text{ }\partial ^2f}{\partial y\partial x}=\frac{\partial }{\partial y}\left(\frac{\partial f}{\partial x}\right)=\left(f_x\right)_y=f_{x y}.$

Example 3.6 Find the second order partial derivatives of $f(x,y)=x^3+x^2y^3-2y^2.$

Solution. The first partial derivatives are $$f_x(x,y)=3x^2+2x y^3$$ and
$$f_y(x,y)=3x^2y^2-4y.$$ Therefore the second derivatives are \begin{align*} f_{x x}& =\frac{\partial }{\partial x}\left(3x^2+2x y^3 \right)=6x+2y^3 & f_{x y}& =\frac{\partial }{\partial y}\left(3x^2+2x y^3 \right)=6x y^2 \\ f_{y x}& =\frac{\partial }{\partial x}\left(3x^2y^2-4y \right)=6x y^2 & f_{y y}& =\frac{\partial }{\partial y}\left(3x^2y^2-4y\right)=6x^2y-4 \tag*{} \end{align*}

::: {#thm- } [Mixed Second-Order Partial Derivatives]

If the function $$f(x,y)$$ has mixed second-order partial derivatives $$f_{x y}$$ and $$f_{y x}$$, that are continuous on an open disk containing $$(a,b)$$, then $f_{y x}(a,b)=f_{x y}(a,b).$ :::

Proof. For small values of $$h$$ with $$h\neq 0$$, consider the difference $\Delta (h)=[f(a+h,b+h)-f(a+h,b)]-[f(a,b+h)-f(a,b)].$ Notice that if we let $g(x)=f(x,b+h)-f(x,b),$ then $\Delta (h)=g(a+h)-g(a).$ By the Mean Value Theorem, there is a number $$c$$ between $$a$$ and $$a+h$$ such that
$g(a+h)-g(a)=g'(c)h=h\left[f_x(c,b+h)-f_x(c,b)\right].$ Applying the Mean Value Theorem mean value theorem again, this time to $$f_x$$ we get a number $$d$$ between $$b$$ and $$b+h$$ such that $f_x(c,b+h)-f_x(c,b)=f_{x y}(c,d)h.$ Combining these equations, we obtain $$\Delta (h)=h^2f_{x y}(c,d).$$ If $$h\to 0$$, then $$(c,d)\to (a,b)$$, so the continuity of $$f_{x y}$$ at $$(a,b)$$ gives $\lim _{h\to 0}\frac{\Delta (h)}{h^2}=\lim _{(c,d)\to (a,b)}f_{x y}(c,d)=f_{x y}(a,b).$ Similarly, by writing $\Delta (h)=[f(a+h,b+h)-f(a,b+h)]-[f(a+h,b)-f(a,b)]$ and using the Mean Value Theorem twice and the continuity of $$f_{y x}$$ at $$(a,b)$$, we obtain $\lim _{h\to 0}\frac{\Delta (h)}{h^2}=f_{y x}(a,b).$ It follows that $$f_{x y}(a,b)=f_{y x}(a,b)$$ as desired.

Example 3.7 Use implicit differentiation to find $$\frac{ \partial ^2z}{\partial x\partial y}$$ given $$z^2+\sin x=\tan y.$$

Solution. We use implicit differentiation with respect to $$y$$ first to find $$\frac{\partial z}{\partial y}$$ as follows,
$2z \frac{\partial z}{\partial y}+0=\sec ^2y$ (recall $$\frac{d}{du}(\tan u)=\sec ^2 u$$) and so
$\frac{\partial z}{\partial y}=\frac{\sec ^2y}{2z }$ Now to find $$\frac{ \partial ^2z}{\partial x\partial y}$$ we use implicit differentiation with respect to $$x$$ but first we write $\frac{\partial z}{\partial y}=\left(\sec ^2y\right)(2z)^{-1}$ Then, $$$\label{imdeq} \frac{ \partial ^2z}{\partial x\partial y}=\left(\sec ^2y\right)(-2z)^{-2}\frac{\partial z}{\partial x}$$$ so in order to find $$\frac{ \partial ^2z}{\partial x\partial y}$$ we now need to find $$\frac{\partial z}{\partial x}.$$ We find, $2z\frac{\partial z}{\partial x}+\cos x=0$ and solving for $$\frac{\partial z}{\partial x}$$ we find,
$\frac{\partial z}{\partial x}=-\frac{\cos x}{2 z}.$ Now substituting back into $$\eqref{imdeq}$$, we find
$\frac{ \partial ^2z}{\partial x\partial y}=\left(\sec ^2y\right)\left(-2z^{-2}\right)\left(-\frac{\cos x}{2 z}\right).$ Therefore, after simplifying $\frac{ \partial ^2z}{\partial x\partial y}=\frac{\cos x \sec ^2y}{4z^3}$

Example 3.8 Use implicit differentiation to find $$\frac{ \partial ^2z}{\partial x\partial y}$$ given $\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=3.$

Solution. Using implicit differentiation with respect to $$y$$ we find $$-y^{-2}-z^{-2}z_y=0$$
and solving for $$z_y$$ yields $z_y=\frac{y^{-2}}{-z^{-2}}=-\frac{z^2}{y^2}.$ Using implicit differentiation with respect to $$x$$ we find,
$$$\label{imdou} z_{y x}=\frac{-1}{y^2} 2 z \ z_x$$$ and so we need to find $$z_x$$ in order to finish with $$z_{y x}.$$ So using implicit differentiation with respect to $$x$$ we find, $$-x^{-2}-z^{-2}z_x=0$$ and solving for $$z_x,$$ yields
$z_x=-\frac{z^2}{x^2}$ which is easily seen from the symmetry of the given equation. Now then we substitute into $$\eqref{imdou}$$ and find $z_{y x}=\frac{-1}{y^2}2 z \left(-\frac{z^2}{x^2}\right)=\frac{2z^3}{x^2y^2}$ as desired.

## 3.3 Verifying Partial Differential Equations

Example 3.9 Verify that the function $$u(x,t)=\sin (x-a t)$$ is a solution of the wave equation
$\frac{ \partial ^2u}{ \partial t^2}=a^2\frac{ \partial ^2u}{\partial x^2}.$ where $$a$$ is a constant.

Solution. We find that $$u_x=\cos (x-a t)$$,
$$u_{x x}=-\sin (x-a t)$$, $$u_t=-a \cos (x-a t)$$, and $$u_{t t}=-a^2\sin (x-a t)=a^2u_{x x}$$. We verify as follows: $$$u_{t t} =-a^2\sin (x-a t) =a^2u_{x x}. \tag*{}$$$

Example 3.10 Verify that the function $$u(x,y)=e^x \sin y$$ is a solution of Laplace’s equation
$\frac{\partial ^2u}{\partial x^2}+\frac{\partial ^2u}{\partial y^2}=0.$

Solution. We find that $$u_x=e^x \sin y$$, $$u_{x x}=e^x \sin y$$, $$u_y=e^x \cos y$$, and $$u_{y y}=-e^x \sin y$$. We verify as follows $$$u_{x x}+u_{y y}=e^x \sin y-e^x \sin y=0. \tag*{}$$$

Example 3.11 Verify that the functions $u(x,y)=\ln \left(x^2+y^2\right) \quad \text{and} \quad v(x,y)=2\tan ^{-1}\left(\frac{y}{x}\right)$ satisfy the Cauchy-Riemann equations $\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}.$

Solution. We find that $\frac{\partial u}{\partial x}=\frac{2x}{x^2+y^2}=\frac{\partial v}{\partial y}$ and $\frac{\partial u}{\partial y}=\frac{2y}{x^2+y^2}=-\left(-\frac{2y}{x^2+y^2}\right)=-\frac{\partial v}{\partial y}.$

Example 3.12 Verify that the function $u=1\left/\sqrt{x^2+y^2+z^2}\right.$ is a solution of the three-dimensional Laplace equation $$u_{x x}+u_{y y}+u_{z z}=0.$$

Solution. We compute $\begin{array}{llll} u_x=-\frac{x}{\left(x^2+y^2+z^2\right)^{3/2}} & \qquad u_{x x}=\frac{2 x^2-y^2-z^2}{\left(x^2+y^2+z^2\right)^{5/2}} \\ u_y=-\frac{y}{\left(x^2+y^2+z^2\right)^{3/2}} & \qquad u_{y y}=-\frac{x^2-2 y^2+z^2}{\left(x^2+y^2+z^2\right)^{5/2}} \\ u_z=-\frac{z}{\left(x^2+y^2+z^2\right)^{3/2}} & \qquad u_{z z}=-\frac{x^2+y^2-2 z^2}{\left(x^2+y^2+z^2\right)^{5/2}}. \end{array}$ We verify as follows $\frac{2 x^2-y^2-z^2}{\left(x^2+y^2+z^2\right)^{5/2}}-\left[\frac{x^2-2 y^2+z^2}{\left(x^2+y^2+z^2\right)^{5/2}}\right]-\left[\frac{x^2+y^2-2 z^2}{\left(x^2+y^2+z^2\right)^{5/2}}\right]=0.$

Example 3.13 Show that the function $$z=x e^y+y e^x$$ is a solution of the partial differential equation $z_{x x x}+z_{y y y}=x z_{x y y}+y z_{x x y}.$

Solution. The needed partial derivatives are $\begin{array}{lllll} z_x=e^y+e^x y && z_{y y}=e^y x && z_{y y y}=e^y x \\ z_y=e^x+e^y x && z_{x y}=e^x+e^y && z_{x y y}=e^y\\ z_{x x}=e^x y && z_{x x x}=e^x y && z_{x x y}=e^x. \end{array}$ We verify as follows $z_{x x x}+z_{y y y}=e^x y+e^y x =x\left(e^y\right)+y\left(e^x\right)=x z_{x y y}+y z_{x x y}$ as desired.

## 3.4 Exercises

Exercise 3.1 Find $$f_{x z}+f_{y z}$$ given $$f(x,y,z)=16e^{-\left(x^2+y^2+z^2\right)}.$$

Exercise 3.2 Find $$\frac{\partial x}{\partial y}$$ when $$x^2 y^2=2z^2$$.

Exercise 3.3 Let $$f(x,y,z)=x \cos y z$$. Find $$f_{xyz}$$.

Exercise 3.4 Find $$z_y$$ if $$y^2 z^2+x \sin y z =3$$.

Exercise 3.5 Let $$z=f(x,y)$$ be a differentiable function where $$x$$ and $$y$$ are both differentiable functions of $$s, t$$, and $$v$$. Find $$z_v$$

Exercise 3.6 The function $$z=f(x,y)$$ is implicitly defined by the equation $$xy^2-x^2e^z+yz^2=0$$. What is $$\frac {\partial z}{\partial x}$$?

Exercise 3.7 Find the first and second order partial derivatives.

• $$f(x,y)=(x^2-2x y+y)^5$$
• $$f(x,y)=\ln (\sin x y).$$
• $$f(x,y)=(x+x y+y)^3$$
• $$f(x,y)=\ln (2x+3y).$$
• $$f(x,y)=(x+x y+10y)^{-2}-x y^2$$
• $$f(x,y)=\ln (2x+3y).$$
• $$f(x,y)=\left(\sin \sqrt{x}\right)\ln y^2$$
• $$f(x,y)=\tan \left(\sqrt{x}\ln y^2\right)$$
• $$f(x,y)=x^2e^{x+y}\cos y.$$
• $$f(x,y)=\cos ^{-1}(x y).$$
• $$f(x,y,z)=\frac{x+y^2}{z}.$$
• $$f(x,y,z)=\sin (x y+z).$$

Exercise 3.8 Determine the partial derivatives $$\frac{ \partial z}{\partial x}$$ and $$\frac{ \partial z}{\partial y}$$ by differentiating implicitly.

• $$3 x^2y+y^3z-z^2=1$$
• $$\ln (x y+y z+x z)=5$$

Exercise 3.9 Compute the slope of the tangent line to the graph of the function $$f(x,y)=x^2 \sin (x+y)$$ at the point $$\left(\frac{\pi }{2},\frac{\pi }{2},0\right)$$ in the direction of the $$x z$$-plane and of the $$y z$$-plane.

Exercise 3.10 Determine the partial derivatives $$f_x$$ and $$f_y$$ given $f(x,y)=\int _x^y\left(t^2+2t+1\right)dt.$

Exercise 3.11 Show that the function $$f(x,y)=\ln \left(x^2+y^2\right)$$ is harmonic on the $$x y$$-plane with the point $$(0,0)$$ removed.

Exercise 3.12 Show that the mixed partial derivatives are identical.

• $$f(x,y)=\cos x y^2$$

• $$f(x,y)=\left(\sin ^2x\right)(\sin y)$$

• Let $$f$$ be the function defined by $f(x,y,z)=x^2+y^2-2 x y \cos z.$ Determine $$f_{x z y}-f_{y z z}$$.

Exercise 3.13 Determine $$f_x, f_y,$$ and $$f_z$$.

• $$f(x,y,z)=\ln \left(x+y^2+z^3\right)$$
• $$f(x,y,z)=\frac{x y+y z}{x z}$$

Exercise 3.14 Assume $$z=f(x,y),$$ determine $$\frac{\partial f}{\partial x}$$ and $$\frac{\partial f}{\partial y}$$ by differentiating implicitly.

• $$x^3-x y^2+y z^2-z^3=0$$
• $$\sqrt{x}+y^2+\sin x z=2.$$

Exercise 3.15 Show that $$f_x(0,0)=0$$ but $$f_y(0,0)$$ does not exist, given the following function. $f(x,y)= \begin{cases} \left(x^2+y\right)\sin \left(\frac{1}{x^2+y^2}\right) & \text{if} (x,y)\neq (0,0) \\ 0 & \text{if} (x,y)=(0,0). \end{cases}$

Exercise 3.16 The partial differential equation $\frac{ \partial ^2z}{\partial t^2}=c^2\frac{ \partial ^2z}{\partial x^2}.$ is often called the . Determine whether the function satisfies the heat equation.

• $$z=e^{-t}\left(\sin \frac{x}{c}+\cos \frac{x}{c}\right)$$
• $$z=\sin (3 c t) \sin (3 x)$$
• $$z=\sin (5 c t) \cos (5x)$$
• $$z=\tan (5 c t) \cot (5x)$$

Exercise 3.17 The equations are $\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \quad \text{and} \quad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}$ where $$u$$ and $$v$$ are functions of $$x$$ and $$y.$$ Determine which pair of functions $$u$$ and $$v$$ satisfies the Cauchy-Riemann equations.

• $$u=e^{-x}\cos y, v=e^{-x}\sin y$$
• $$u=x^2+y^2, v=2 x y$$

## 3.5 Differentials

Definition 3.2 Let $$z=f(x,y)$$ and let $$\Delta x$$ and $$\Delta y$$ be increments of $$x$$ and $$y$$, respectively. The differentials $$dx$$ and $$dy$$ of the independent variables $$x$$ and $$y$$ are defined by $$dx=\Delta x$$ and $$dy=\Delta y$$. The differential $$d z$$, also called the total differential , is defined by $d z=f_x(x,y)d x+f_y(x,y)d y =\frac{\partial z}{\partial x}d x+\frac{\partial z}{\partial y}d y.$

Theorem 3.1 If $$f(x,y)$$ and its partial derivatives $$f_x$$ and $$f_y$$ are defined on an open region $$R$$ containing the point $$P\left(x_0,y_0\right)$$ and both $$f_x$$ and $$f_y$$ are continuous at $$P,$$ then
$\Delta f=f\left(x_0+\Delta x,y_0+\Delta y\right)-f\left(x_0,y_0\right)\approx f_x\left(x_0,y_0\right)\Delta x+f_y\left(x_0,y_0\right)\Delta y$ so that
$$$\label{linappform} f\left(x_0+\Delta x,y_0+\Delta y\right)\approx f\left(x_0,y_0\right)+f_x\left(x_0,y_0\right)\Delta x+f_y\left(x_0,y_0\right)\Delta y.$$$

Example 3.14 If $z=f(x,y)=x^2+3x y-y^2,$ find the differential $$d z.$$ Further, if $$x$$ changes from $$2$$ to $$2.05$$ and $$y$$ changes from $$3$$ to $$2.96$$, compare the values of $$\Delta z$$ and $$d z.$$ Which is easier to compute $$\Delta z$$ or $$d z$$?

Solution. By definition $d z=\frac{\partial z}{\partial x}d x+\frac{\partial z}{\partial y}d y=(2x+3y)d x+(3x-2y)d y.$ Putting $$x=2$$, $$d x=\Delta x=0.05$$, $$y=3$$, and $$d y=\Delta y=-0.04$$, we get $d z=[2(2)+3(3)]0.05+[3(2)-2(3)](-0.04)=0.65.$
The increment of $$z$$ is \begin{align*} \Delta z & =f(2.05,2.96)-f(2,3) \\ & =\left[(2.05)^2+3(2.05)(2.96)-(2.96)^2\right]-\left[2^2+3(2)-3^2\right] =0.6449.\end{align*} Notice that $$\Delta z\approx d z$$ but $$d z$$ is easier to compute.

Example 3.15 Use differentials to approximate the real number $\sqrt{9(1.95)^2+(8.1)^2}.$

Solution. Consider the function $z=f(x,y)=\sqrt{9x^2+y^2}$ and observe that we can easily calculate $$f(2,8)=10.$$ Therefore, we take $$a=2, b=8, d x=\Delta x=-0.05,$$ and $$d y=\Delta y=0.1$$ in our linear approximation formula with the multivariate function $$f(x,y),$$ so $f(a+\Delta x,b+\Delta y)\approx f(a,b)+d z.$ Next we compute the partial derivatives $f_x(x,y)=\frac{9x}{\sqrt{9x^2+y^2}} \qquad \text{and} \qquad f_y(x,y)=\frac{y}{\sqrt{9x^2+y^2}}$ Now using $$\ref{linappform}$$ \begin{align*} & \sqrt{9(1.95)^2+(8.1)^2} =f(1.95,8.1) \approx f(2,8)+d z \\ & =f(2,8)+f_x(2,8)d x+f_y(2,8)d y =10+\frac{18}{10}(-0.05)+\frac{8}{10}(0.1) =9.99\end{align*} This approximation is accurate to two decimal places.

Example 3.16 Use differentials to approximate the real number $8.94\sqrt{9.99-(1.01)^3}.$

Solution. Consider the multivariate function $$z=f(w,x,y)=w\sqrt{x-y^3}$$ and observe that we can easily calculate $f(9,10,1)=9\sqrt{10-1^3}=27.$ Therefore, we take $$a=9,$$ $$b=10,$$ $$c=1,$$ $$d w=\Delta w=-0.06,$$ $$d x=\Delta x=-0.01$$ and $$d y=\Delta y=0.01$$ in $f(a+\Delta x,b+\Delta y,c+\Delta z)\approx f(a,b,c)+d z.$ We find the partial derivatives $f_w(w,x,y)=\sqrt{x-y^3}, \quad f_x(w,x,y)=\frac{w}{2 \sqrt{x-y^3}}, \quad f_y(w,x,y)=-\frac{3 w y^2}{2 \sqrt{x-y^3}}$ Now using $$\ref{linappform}$$ \begin{align*} & 8.94\sqrt{9.99-(1.01)^3} =f(8.94,9.99,1.01) \approx f(9,10,1)+d z \\ & \qquad =f(9,10,1)+f_w(9,10,1)d w+f_x(9,10,1)d x+f_y(9,10,1)d y \\ & \qquad =27+3(-0.06)+\frac{3}{2}(-0.01)+-\frac{9}{2}(0.01) =26.75\overline{9}.\end{align*} This approximation is accurate to two decimal places.

## 3.6 Differentiability

For a function of two variables $$z=f(x,y)$$, if $$x$$ and $$y$$ are given increments $$\Delta x$$ and $$\Delta y$$ , then the corresponding increment of $$z$$ is $\Delta z=f(x+\Delta x,y+\Delta y)-f(x,y).$

Definition 3.3 If $$z=f(x,y)$$, then $$f$$ is differentiable at $$(a,b)$$ provided $$\Delta z$$ can be expressed in the form $\Delta z=f_x(a,b)\Delta x+f_y(a,b)\Delta y+\epsilon _1\Delta x+\epsilon _2\Delta y$ where $$\epsilon _1\to 0$$ and $$\epsilon _2\to 0$$ as $$(\Delta x,\Delta y)\to (0,0).$$ Additionally, $$f(x,y)$$ is said to be differentiable in the region $$R$$ of the plane if $$f$$ is differentiable at each point in $$R$$.

::: {#thm- } [Differentiability Implies Continuity] Let $$f$$ be a function of two variables with $$(a,b)$$ in the domain of $$f.$$

• If $$f$$ is differentiable at $$(a,b)$$ it is also continuous at $$(a,b)$$.
• If $$f$$ is a function of $$x$$ and $$y$$, and $$f$$, $$f_x$$, $$f_y$$ are continuous in a disk $$D$$ centered at $$(a,b)$$, then $$f$$ is differentiable at $$(a,b).$$

:::

Proof. The proof is left to the reader.

Example 3.17 Let $$f$$ be the function defined by $$$\label{nondiffex} f(x,y)= \begin{cases} 1 & \text{ if } x>0 \text{ and } y>0 \\ 0 & \text{ otherwise } \end{cases}$$$ Show that the partial derivatives $$f_x$$ and $$f_y$$ exist at the origin, but $$f$$ is not differentiable there.

Solution. Since $$f(0,0)=0$$, we have $f_x(0,0)=\lim _{\Delta x\to 0}\frac{f(0+\Delta x,0)-f(0,0)}{\Delta x}=0$ and similarly $$f_y(0,0)=0.$$ Thus, the partial derivatives both exist at the origin. If $$f(x,y)$$ were differentiable at the origin, it would have to be continuous there. Thus, we can show that $$f$$ is not differentiable by showing that it is not continuous at $$(0,0).$$ Toward this end, note that $$$\label{nondifflimex} \lim _{(x,y)\to (0,0)} f(x,y)$$$ is 1 along the line $$y=x$$ in the first quadrant but it is $$0$$ if the approach is along the $$x$$-axis. This means that the limit in $$\ref{nondifflimex}$$ does not exist. Thus $$f(x,y)$$ is not differentiable at $$(0,0)$$.

Therefore $$f(x,y)$$ is an example of a non-differentiable function for which $$f_x$$ and $$f_y$$ exist, or in other words, the word differentiable means more than just the partial derivatives exist because the existence of partial derivatives does not guarantees that a function is differentiable.

Example 3.18 Show that $$f(x,y)=x^2y+x y^3$$ is differentiable for all $$(x,y)$$.

Solution. We find the partial derivatives $f_x(x,y)=\frac{\partial }{\partial x}\left(x^2y+x y^3\right)=2x y+y^3$ and $f_y(x,y)=\frac{\partial }{\partial y}\left(x^2y+x y^3\right)=x^2+3x y^2.$ Because $$f,$$ $$f_x$$ and $$f_y$$ are all polynomials in $$x$$ and $$y$$ they are continuous throughout the plane. Therefore by $$\ref{suffdiff}$$, $$f$$ must be differentiable for all $$x$$ and $$y.$$

Example 3.19 Determine whether the function $f(x,y)=\frac{x^2y}{x^4+y^2}$ is differentiable at either $$(0,0)$$ or $$(1,1).$$ Explain why.

Solution. Since $$(0,0)$$ is not in the domain of $$f$$, $$f$$ is not continuous at $$(0,0)$$, and thus not differentiable at $$(0,0)$$ by $$\ref{suffdiff}$$. To show that $$f$$ is differentiable at $$(1,1)$$ we compute the partial derivatives $f_x=\frac{-2 x^5 y+2 x y^3}{\left(x^4+y^2\right)^2} \quad \text{and} \quad f_y= \frac{x^6-x^2 y^2}{\left(x^4+y^2\right)^2}.$ Since these partial derivatives and $$f$$ are continuous on any open disk not containing $$(0,0)$$ we conclude that $$f$$ is differentiable at any point except $$(0,0)$$; and in particular at $$(1,1).$$

Example 3.20 Determine whether the function defined by $f(x,y)=\left\{ \begin{array}{ll} \frac{2(x-1)(y-1)}{(x-1)^2+(y-1)^2} & \text{if } (x,y)\neq (0,0) \\[15pt] 0 & \text{if } (x,y)= (0,0) \end{array}\right.$ is differentiable at either $$(0,0)$$ or $$(1,1).$$ Explain why.

Solution. The limit, $\lim_{(x,y)\to (1,1)}\frac{2(x-1)(y-1)}{(x-1)^2+(y-1)^2}$ does not exist because along $$y=1$$ $\plim{(x,y)\to (1,1)}{y=1} \frac{2(x-1)(y-1)}{(x-1)^2+(y-1)^2} =\lim_{x\to1}\frac{0}{(x-1)^2} =0$ and along $$y=x$$ $\plim{(x,y)\to (1,1)}{y=x} \frac{2(x-1)(y-1)}{(x-1)^2+(y-1)^2} =\lim_{x\to 1}\frac{2(x-1)^2}{(x-1)^2+(x-1)^2} =1.$
Therefore $$f$$ is not continuous at $$(1,1)$$. By $$\ref{suffdiff}$$, $$f$$ is not differentiable at $$(1,1).$$ To show that $$f$$ is differentiable at $$(0,0)$$ we compute the partial derivatives, $f_x(x,y)= \frac{[(x-1)^2+(y-1)^2][2(y-1)]-[2(x-1)(y-1)][2(x-1)]}{(x-1)^2+(y-1)^2} \quad \text{for (x,y)\neq (0,0)}$
and $f_y(x,y)= \frac{[(x-1)^2+(y-1)^2][2(x-1)]-[2(x-1)(y-1)][2(y-1)]}{(x-1)^2+(y-1)^2} \quad \text{for (x,y)\neq (0,0)}.$
Since $$f$$, $$f_x$$ and $$f_y$$ are rational functions they are continuous on any open disk not containing $$(1,1)$$. We conclude that $$f$$ is differentiable at any point except $$(1,1)$$; and in particular at $$(0,0).$$

## 3.7 Exercises

Exercise 3.18 Find the maximum rate of change of the function at the given point and the direction in which it occurs $$f(x,y)=\sqrt{x^2+2y}$$, $$(4,10)$$

Exercise 3.19 Show that if $$x$$ and $$y$$ are sufficiently close to zero and $$f$$ is differentiable at $$(0,0),$$ then
$f(x,y)\approx f(0,0)+x f_x(0,0)+y f_y(0,0)$ Use this approximation for the expressions $\frac{1}{1+x-y} \qquad \text{and} \qquad \frac{1}{(x+1)^2+(y+1)^2}$ around $$(0,0).$$

• Find the total differential of the function $$z=x^2-2x y +3y^2$$.

Exercise 3.20 Find the tangent plane to the surface $$z=x \sin y-x \cos x$$ at $$(\pi,0)$$.

Exercise 3.21 Find an equation for each horizontal tangent plane to the surface $$z=5-x^2-y^2+4y.$$

Exercise 3.22 Determine the total differential.

• $$z=5x^2y^3$$
• $$z=\cos x^2y$$
• $$z=y e^x$$
• $$w=\sin x+\sin y+\cos z$$
• $$w=z^2\sin (2x-3y)$$
• $$w=3y^2z \cos x$$

Exercise 3.23 Show that each functions is differentiable on $$\mathbb{R}^2.$$

• $$f(x,y)=x y^3+3 x y^2$$
• $$f(x,y)=\sin \left(x^2+3y\right)$$
• $$f(x,y)=x^2+4x-y^2$$
• $$f(x,y)=e^{2x+y^2}$$

Exercise 3.24 Determine the standard-form equation for the tangent plane to the surface at the specified point.

• $$f(x,y)=\sqrt{x^2+y^2}$$ at $$P_0\left(3,1,\sqrt{10}\right)$$
• $$f(x,y)=x^2+y^2+ \sin x y$$ at $$P_0(0,2,4)$$
• $$f(x,y)=e^{-x} \sin y$$ at $$P_0\left(0,\frac{\pi}{2},1\right)$$
• $$z=10-x^2-y^2$$ at $$P(2,2,2)$$
• $$z=\ln \left|x+y^2\right|$$ at $$P(-3,-2,0)$$

Exercise 3.25 Use linear approximation (differentials) to find approximate value.

• $$\left(\sqrt{\frac{\pi }{2}}-0.01\right)$$
• $$\sin \left(\sqrt{\frac{\pi }{2}}+0.01\right)$$
• $$e^{1.01^20.98^2}$$

Exercise 3.26 Show that if $$x$$ and $$y$$ are sufficiently close to zero and $$f$$ is differentiable at $$(0,0),$$ then
$f(x,y)\approx f(0,0)+x f_x(0,0)+y f_y(0,0)$ Use this approximation for the expressions $\frac{1}{1+x-y} \qquad \text{and} \qquad \frac{1}{(x+1)^2+(y+1)^2}$ around $$(0,0).$$

Exercise 3.27 Find a unit vector that is normal to the given graph at the point $$P_0\left(x_0,y_0\right)$$ on the graph.

• the circle $$x^2+y^2=a^2$$
• the ellipse $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1.$$

Exercise 3.28 Find a unit vector that is normal to each surface given at the prescribed point, and the standard form of the equation of the tangent plane at that point.

• $$\ln \left(\frac{x}{y-z}\right)=0$$ at $$(2,5,3)$$
• $$z e^{x^2-y^2}=3$$ at $$(1,1,3)$$

## 3.8 The Chain Rule

Recall that the chain rule for functions of a single variable gives the rule for differentiating a composite function: if $$y=f(x)$$ and $$x=g(t),$$ where $$f$$ and $$g$$ are differentiable functions, then $$y$$ is a a differentiable function of $$t$$ and $\frac{dy}{d t}=\frac{dy}{dx}\frac{dx}{dt}.$

## 3.9 Chain Rule Involving One Independent Variable

There are several versions of the chain rule for functions of more than one variable, each of them giving a rule for differentiating a composite function.

::: {#lem- } Chain Rule Involving One Independent Variable Let $$f(x,y)$$ be a differentiable function of $$x$$ and $$y$$, and let $$x=x(t)$$ and $$y=y(t)$$ be differentiable functions of $$t$$. Then $$z=f(x,y)$$ is a differentiable function of $$t$$ and $$$\label{criindevar} \frac{d z}{d t}=\frac{\partial z}{\partial x}\frac{d x}{d t}+\frac{\partial z}{\partial y}\frac{d y}{d t}.$$$ :::

Proof. Because $$z=f(x,y)$$ is differentiable, we can write the increment $$\Delta z$$ in the following form:

$\Delta z=\frac{\partial z}{\partial x}\Delta x+\frac{\partial z}{\partial y}\Delta y+\epsilon _1\Delta x+\epsilon _2\Delta y$ where $$\epsilon _1\to 0$$ and $$\epsilon _2\to 0$$ as both $$\Delta x\to 0$$ and $$\Delta y\to 0.$$ Dividing by $$\Delta t\neq 0,$$ we obtain

$\frac{\Delta z}{\Delta t}=\frac{\partial z}{\partial x}\frac{\Delta x}{\Delta t}+\frac{\partial z}{\partial y}\frac{\Delta y}{\Delta t}+\epsilon _1\frac{\Delta x}{\Delta t}+\epsilon _2\frac{\Delta y}{\Delta t}.$ Because $$x$$ and $$y$$ are function of $$t$$, we can write their increments as $\Delta x=x(t+\Delta t) -x(t) \qquad \text{and} \qquad \Delta y=y(t+\Delta t)-y(t).$ We know that $$x$$ and $$y$$ vary continuously with $$t$$, because $$x$$ and $$y$$ are differentiable, and it follows that $$\Delta x\to 0$$ and $$\Delta y\to 0$$ as $$\Delta t\to 0$$ so that $$\epsilon _1\to 0$$ and $$\epsilon _2\to 0$$ as $$\Delta t\to 0.$$ Therefore, we have \begin{align*} \frac{d z}{d t} & =\lim _{\Delta t\to 0}\frac{\Delta z}{\Delta t}\\ & =\lim _{\Delta t\to 0}\left(\frac{\partial z}{\partial x}\frac{\Delta x}{\Delta t}+\frac{\partial z}{\partial y}\frac{\Delta y}{\Delta t}+\epsilon _1\frac{\Delta x}{\Delta t}+\epsilon _2\frac{\Delta y}{\Delta t}\right) \\ & =\frac{\partial z}{\partial x}\frac{d x}{d t}+\frac{\partial z}{\partial y}\frac{d y}{d t}+(0)\frac{\Delta x}{\Delta t}+(0)\frac{\Delta y}{\Delta t} \end{align*} as desired.

Example 3.21 If $$z=x^2y+3x y^4,$$ where $$x=e^t$$ and $$y=\sin t$$, find $$\frac{d z}{d t}.$$ The chain rule gives, \begin{align*} \frac{d z}{d t} &=\frac{\partial z}{\partial x}\frac{d x}{d t}+\frac{\partial z}{\partial y}\frac{d y}{d t} \\ & =\left(2e^t\sin t+3 \text{sint}^4t\right)e^t+\left(e^{2t}+12e^t\sin ^3t\right) \cos t. \tag*{} \end{align*}

Example 3.22 Two objects are traveling in elliptical paths given by the following parametric equations $x_1(t)=2 \cos t, \quad y_1(t)=3 \sin t \quad x_2(t)=4 \sin 2 t, \quad y_2(t)=3 \cos 2t.$ At what rate is the distance between the two objects changing when $$t=\pi ?$$

Solution. The distance $$s$$ between the two objects is given by $s=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2}$ and that when $$t=\pi ,$$ we have $$x_1=-2,$$ $$y_1=0,$$ $$x_2=0,$$ and $$y_2=3.$$ So $s=\sqrt{(0+2)^2+(3-0)^2}=\sqrt{13}.$ When $$t=\pi ,$$ the partial derivatives of $$s$$ are as follows. \begin{align*} & \left.\frac{\partial s}{\partial x_1}\right|_{t=\pi } =\left.\frac{-\left(x_2-x_1\right)}{\sqrt{\left(x_2-x_1\right){}^2+\left(y_2-y_1\right){}^2}}\right|_{t=\pi}=\frac{-2}{\sqrt{13}} \\ & \left.\frac{\partial s}{\partial y_1}\right|_{t=\pi } =\left.\frac{-\left(y_2-y_1\right)}{\sqrt{\left(x_2-x_1\right){}^2+\left(y_2-y_1\right){}^2}}\right|_{t=\pi} =\frac{-3}{\sqrt{13}} \\ & \left.\frac{\partial s}{\partial x_2}\right|_{t=\pi } =\left.\frac{\left(x_2-x_1\right)}{\sqrt{\left(x_2-x_1\right){}^2+\left(y_2-y_1\right){}^2}}\right|_{t=\pi}=\frac{2}{\sqrt{13}} \\ & \left.\frac{\partial s}{\partial y_2}\right|_{t=\pi } =\left.\frac{\left(y_2-y_1\right)}{\sqrt{\left(x_2-x_1\right){}^2+\left(y_2-y_1\right){}^2}}\right|_{t=\pi}=\frac{3}{\sqrt{13}} \end{align*} When $$t=\pi ,$$ the derivatives of $$x_1,$$ $$y_1,$$ $$x_2,$$ and $$y_2$$ are \begin{align*} & \left.\frac{d x_1}{dt}\right|_{t=\pi }=-2 \sin t|_{t=\pi }=0 & & \left.\frac{d y_1}{dt}\right|_{t=\pi }=3 \cos t|_{t=\pi }=-3 \\ & \left.\frac{d x_2}{dt}\right|_{t=\pi }=8 \cos 2t|_{t=\pi }=8 & & \left.\frac{d y_2}{dt}\right|_{t=\pi }=-6 \sin 2t|_{t=\pi }=0 \end{align*} So using the chain rule $\frac{d s}{d t} =\frac{\partial s}{\partial x_1}\frac{d x_1}{d t}+\frac{\partial s}{\partial y_1}\frac{d y_1}{d t}+\frac{\partial s}{\partial x_2}\frac{d x_2}{d t}+\frac{\partial s}{\partial y_2}\frac{d y_2}{d t}$ When $$t=\pi$$, we find that the distance is changing at a rate of $\left.\frac{d s}{d t} \right|_{t=\pi} =\left(\frac{-2}{\sqrt{13}}\right)(0)+\left(\frac{-3}{\sqrt{13}}\right)(-3)+\left(\frac{2}{\sqrt{13}}\right)(8)+\left(\frac{3}{\sqrt{13}}\right)(0) =\frac{25}{\sqrt{13}}.$

## 3.10 Chain Rule Involving Two Independent Variables

Next we work through an example which illustrates how to find partial derivatives of two variable functions whose variables are also two variable functions. The proof of this chain rule is motivated by appealing to a previously proven chain rule with one independent variable.

::: {#lem- } Chain Rule Involving Two Independent Variables Suppose $$z=f(x,y)$$ is a differentiable function at $$(x,y)$$ and that the partial derivatives of $$x=x(u,v)$$ and $$y=y(u,v)$$ exist at $$(u,v).$$ Then the composite function $$z=f(x(u,v),y(u,v))$$ is differentiable at $$(u,v)$$ with $\frac{\partial z}{\partial u}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial u}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial u} \qquad \text{and} \qquad \frac{\partial z}{\partial v}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial v}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial v}.$ :::

Example 3.23 If $$z=e^x\sin y$$ where $$x=s t^2$$ and $$y=s^2t$$, find $$\frac{\partial z}{\partial s}$$ and $$\frac{\partial z}{\partial t}.$$

Solution. Applying the chain rule we obtain \begin{align*} \frac{\partial z}{\partial s} & =\frac{\partial z}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial z} {\partial y}\frac{\partial y}{\partial s} \\ & =\left(e^x\sin y\right)\left(t^2\right)+\left(e^x\cos y\right)( s t) %\\ & =t^2e^{s t^2}\sin \left(s^2 t\right)+2s t e^{s t^2}\cos \left(s^2t\right) \end{align*} and \begin{align*} \frac{\partial z}{\partial t} &=\frac{\partial z}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial t} \\ & =\left(e^x\sin y\right)(2 s t)+\left(e^x\cos y\right)\left(2 s^2\right) %\\ & =2 s t e^{s t^2}\sin \left(s^2 t\right)+s^2 e^{s t^2}\cos \left(s^2t\right). \end{align*}

Example 3.24 The Cauchy-Riemann equations are $\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}$ where $$u=u(x,y)$$ and $$v=v(x,y).$$ Show that if $$x$$ and $$y$$ are expressed in terms of polar coordinates, the Cauchy-Riemann equations become $\frac{\partial u}{\partial r}=\frac{1}{r}\frac{\partial v}{\partial \theta } \qquad \text{and} \qquad \frac{\partial v}{\partial r}=\frac{-1}{r}\frac{\partial u}{\partial \theta }.$

Solution. Using $$x=r \cos \theta$$ and $$y=r \sin \theta$$ we can state the chain rule to be used: $\frac{\partial u}{\partial r}=\frac{\partial u}{\partial x}\frac{\partial x}{\partial r}+\frac{\partial u}{\partial y}\frac{\partial y}{\partial r} \qquad \text{and} \qquad \frac{\partial v}{\partial \theta }=\frac{\partial v}{\partial x}\frac{\partial x}{\partial \theta }+\frac{\partial v}{\partial y}\frac{\partial y}{\partial \theta }.$ By the chain rule $\frac{\partial u}{\partial r}=\frac{\partial u}{\partial x}\cos \theta +\frac{\partial u}{\partial y}\sin \theta \qquad \text{and} \qquad \frac{\partial v}{\partial \theta }=-\frac{\partial v}{\partial x}(r \sin \theta )+\frac{\partial v}{\partial y}(r \cos \theta ).$ Substituting, $\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x},$ we obtain $\frac{\partial u}{\partial r}=\frac{\partial v}{\partial y}\cos \theta -\frac{\partial v}{\partial x} \sin \theta$ and so $\frac{\partial u}{\partial r}=\frac{1}{r}\left[\frac{\partial v}{\partial y}(r \cos \theta )-\frac{\partial v}{\partial x}(r \sin \theta )\right]=\frac{1}{r}\frac{\partial v}{\partial \theta }.$ Similarly the chain rule is to be used $\frac{\partial v}{\partial r}=\frac{\partial v}{\partial x}\frac{\partial x}{\partial r}+\frac{\partial v}{\partial y}\frac{\partial y}{\partial r} \qquad \text{and} \qquad \frac{\partial u}{\partial \theta }=\frac{\partial u}{\partial x}\frac{\partial x}{\partial \theta }+\frac{\partial u}{\partial y}\frac{\partial y}{\partial \theta }.$ By the chain rule $\frac{\partial v}{\partial r}=\frac{\partial v}{\partial x}\cos \theta +\frac{\partial v}{\partial y}\sin \theta$ and $\frac{\partial u}{\partial \theta }=-\frac{\partial u}{\partial x}(r \sin \theta )+\frac{\partial u}{\partial y}(r \cos \theta ).$ Substituting $\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x},$ we obtain $\frac{\partial v}{\partial r}=-\frac{\partial u}{\partial y}\cos \theta -\frac{\partial u}{\partial x} \sin \theta$ and also $\frac{\partial u}{\partial r}=-\frac{1}{r}\left[\frac{\partial u}{\partial y}(r \cos \theta )-\frac{\partial u}{\partial x}(r \sin \theta )\right]=-\frac{1}{r}\frac{\partial u}{\partial \theta }.$

## 3.11 Chain Rule Involving Several Independent Variable

::: {#thm- } Chain Rule Involving Several Independent Variable If $$w=f\left(x_1,\ldots,x_n\right)$$ is a differentiable function of the $$n$$ variables $$x_1,\ldots,x_n$$ which in turn are differentiable functions of $$m$$ parameters $$t_1,\ldots,t_m$$ then the composite function is differentiable and $\frac{\partial w}{\partial t_1}=\sum _{k=1}^n \frac{\partial w}{\partial x_k}\frac{\partial x_k}{\partial t_1}, \quad \ldots \quad , \frac{\partial w}{\partial t_m}=\sum _{k=1}^n \frac{\partial w}{\partial x_k}\frac{\partial x_k}{\partial t_m}.$ :::

Example 3.25 Write out the chain rule for the case for the case when $$n=4$$ and $$m=2$$ where $$w=f(x,y,z,t),$$ $$x=x(u,v),$$ $$y=y(u,v),$$ $$z=z(u,v),$$ and $$t(u,v).$$

Solution. The chain rule for the case when $$n=4$$ and $$m=2$$ yields the following the partial derivatives: $\frac{\partial w}{\partial u}=\frac{\partial w}{\partial x}\frac{\partial x}{\partial u}+\frac{\partial w}{\partial y}\frac{\partial y}{\partial u}+\frac{\partial w}{\partial z}\frac{\partial z}{\partial u}+\frac{\partial w}{\partial t}\frac{\partial t}{\partial u}$ and $\frac{\partial w}{\partial v}=\frac{\partial w}{\partial x}\frac{\partial x}{\partial v}+\frac{\partial w}{\partial y}\frac{\partial y}{\partial v}+\frac{\partial w}{\partial z}\frac{\partial z}{\partial v}+\frac{\partial w}{\partial t}\frac{\partial t}{\partial v}.$

Example 3.26 If $$u=x^4y+y^2z^3$$ where $$x=r s e^t,$$ $$y=r s^2e^{-t},$$ and $$z=r^2s \sin t,$$ find the value of $$\frac{\partial u}{\partial s}$$ when $$r=2,$$ $$s=1,$$ and $$t=0.$$

Solution. By the chain rule, \begin{align*} \frac{\partial u}{\partial s} & =\frac{\partial u}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial u}{\partial y}\frac{\partial y}{\partial s}+\frac{\partial u}{\partial z}\frac{\partial z}{\partial s} \\ & =\left(4x^3y\right)\left(r e^t\right)+\left(x^4+2y z^3\right)\left(2r s e^{-t}\right)+\left(3y^2z^2\right)\left(r^2\sin t\right).\end{align*} When $$r=2,$$ $$s=1,$$ and $$t=0,$$ we have $$x=2,$$ $$y=2,$$ and $$z=0,$$ so $\frac{\partial u}{\partial s}=(64)(2)+(16)(4)+(0)(0)=192.$

Example 3.27 If $$F(u,v,w)$$ is differentiable where $$u=x-y,$$ $$v=y-z,$$ and $$w=z-x,$$ then find $\frac{\partial F}{\partial x}+\frac{\partial F}{\partial y}+\frac{\partial F}{\partial z}.$

Solution. We compute,
\begin{align*} \frac{\partial F}{\partial x}& =\frac{\partial F}{\partial u}\frac{\partial u}{\partial x}+\frac{\partial F}{\partial v}\frac{\partial v}{\partial x}+\frac{\partial F}{\partial w}\frac{\partial w}{\partial x} \\ & =\frac{\partial F}{\partial u}(1)+\frac{\partial F}{\partial v}(0)+\frac{\partial F}{\partial w}(-1) \\ & =\frac{\partial F}{\partial u}-\frac{\partial F}{\partial w}. \end{align*} Similarly, \begin{align*} \frac{\partial F}{\partial y}& =\frac{\partial F}{\partial u}\frac{\partial u}{\partial y}+\frac{\partial F}{\partial v}\frac{\partial v}{\partial y}+\frac{\partial F}{\partial w}\frac{\partial w}{\partial y} \\ & =\frac{\partial F}{\partial u}(-1)+\frac{\partial F}{\partial v}(1)+\frac{\partial F}{\partial w}(0) \\ & =-\frac{\partial F}{\partial u}+\frac{\partial F}{\partial v} \end{align*} and \begin{align*} \frac{\partial F}{\partial z}& =\frac{\partial F}{\partial u}\frac{\partial u}{\partial z}+\frac{\partial F}{\partial v}\frac{\partial v}{\partial z}+\frac{\partial F}{\partial w}\frac{\partial w}{\partial z} \\ & =\frac{\partial F}{\partial u}(0)+\frac{\partial F}{\partial v}(-1)+\frac{\partial F}{\partial w}(1) \\ & =-\frac{\partial F}{\partial v}+\frac{\partial F}{\partial v} \end{align*} Therefore the required expression is $% \frac{\partial F}{\partial x}+\frac{\partial F}{\partial y}+\frac{\partial F}{\partial z} \left[\frac{\partial F}{\partial u}-\frac{\partial F}{\partial w}\right]+\left[-\frac{\partial F}{\partial u}+\frac{\partial F}{\partial v}\right]+\left[-\frac{\partial F}{\partial v}+\frac{\partial F}{\partial v}\right] =0.$

Example 3.28 If $$f$$ is differentiable and $$z=u+f\left(u^2v^2\right)$$, show that $u\frac{\partial z}{\partial u}-v\frac{\partial z}{\partial v}=u.$

Solution. Let $$w=u^2v^2$$, so $$z=u+f(w).$$ Then according to the chain rule, $\frac{\partial z}{\partial u}=1+\frac{d f}{d w}\frac{\partial w}{\partial u}=1+f'(w)\left(2u v^2\right)$ and $\frac{\partial z}{\partial v}=1+\frac{d f}{d w}\frac{\partial w}{\partial v}=f'(w)\left(2u^2 v\right)$ so that \begin{align*} u\frac{\partial z}{\partial u}-v\frac{\partial z}{\partial v} &=u\left[1+f'(w)\left(2u v^2\right)\right]-v\left[f'(w)\left(2u^2v\right)\right] \\ & =u+f'(w)\left[u\left(2u v^2\right)-v\left(2u^2v\right)\right] =u. \tag*{} \end{align*}

Example 3.29 Find $$\frac{\partial w}{\partial s}$$ if $$w=4x+y^2+z^3$$, where $$x=e^{r s^2},$$ $$y=\ln \left(\frac{r+s}{t}\right),$$ and $$z=r s t^2.$$

Solution. We have \begin{align*} \frac{\partial w}{\partial s} & =\frac{\partial w}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial w}{\partial y}\frac{\partial y}{\partial s}+\frac{\partial w}{\partial z}\frac{\partial z}{\partial s} \\ & =\left[\frac{\partial }{\partial x}\left(4x+y^2+z^3\right)\right] \left[\frac{\partial }{\partial s}\left(e^{r s^2}\right)\right] \\ & \hspace{2cm} +\left[\frac{\partial }{\partial y}\left(4x+y^2+z^3\right)\right] \left[\frac{\partial }{\partial s}\left(\ln \frac{r+s}{t}\right)\right] \\ & \hspace{3cm} +\left[\frac{\partial}{\partial z}\left(4x+y^2+z^3\right)\right] \left[\frac{\partial }{\partial s}\left(r s t^2\right)\right] \\ & =4\left[e^{r s^2}(2r s)\right]+2y\left(\frac{1}{\frac{r+s}{t}}\right)\left(\frac{1}{t}\right)+3z^2\left(r t^2\right) \\ & =8r s e^{r s^2}+2\frac{y}{r+s}+3r t^2z^2. \tag*{} \end{align*}

Example 3.30 If $$u=f(x,y),$$ where $$x=e^s \cos t$$ and $$y=e^s \sin t,$$ show that $\frac{\partial ^2u}{\partial x^2}+\frac{\partial ^2u}{\partial y^2}=e^{-2s}\left[\frac{\partial ^2u}{\partial s^2}+\frac{\partial ^2u}{\partial t^2}\right].$

Solution. By the chain rule we have \begin{align*} \frac{\partial u}{\partial s} %& =\frac{\partial u}{\partial x}\frac{\partial x}{\partial s} +\frac{\partial u}{\partial y}\frac{\partial y}{\partial s} %\\ & =\frac{\partial u}{\partial x}e^s \cos t +\frac{\partial u}{\partial y}e^s \sin t \end{align*} and \begin{align*} \frac{\partial u}{\partial t} =\frac{\partial u}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial u}{\partial y}\frac{\partial y}{\partial t} =\frac{\partial u}{\partial x}\left(-e^s \sin t\right) +\frac{\partial u}{\partial y}e^s \cos t. \end{align*} Therefore $\frac{ \partial ^2 u}{\partial s^2}=\frac{\partial u}{\partial x}e^s \cos t +\frac{\partial }{\partial s}\left(\frac{\partial u}{\partial x}\right)e^s \cos t +\frac{\partial u}{\partial y}e^s \sin t +\frac{\partial }{\partial s}\left(\frac{\partial u}{\partial y}\right)e^s \sin t$ and \begin{align*} \frac{ \partial ^2 u}{\partial t^2}=\frac{\partial u}{\partial x}\left(-e^s \cos t\right) +\frac{\partial }{\partial t}\left(\frac{\partial u}{\partial x}\right)\left(-e^s \sin t\right) +\frac{\partial u}{\partial y}\left(-e^s \sin t\right) +\frac{\partial }{\partial t}\left(\frac{\partial u}{\partial y}\right)e^s \cos t. \end{align*} Also \begin{align*} \frac{\partial }{\partial x}\left(\frac{\partial u}{\partial s}\right) & =\frac{\partial ^2 u}{\partial x^2}e^s \cos t +\frac{\partial ^2 u}{\partial x \partial y}\left(e^s \sin t\right), \\ \frac{\partial }{\partial y}\left(\frac{\partial u}{\partial s}\right) & =\frac{\partial ^2 u}{\partial x \partial y}\left(e^s\cos t\right) +\frac{\partial ^2 u}{\partial y^2}e^s \sin t, \\ \frac{\partial }{\partial x}\left(\frac{\partial u}{\partial t}\right) & =\frac{\partial ^2 u}{\partial x^2}\left(-e^s \sin t\right) +\frac{\partial ^2 u}{\partial x \partial y}e^s \cos t, \\ \frac{\partial }{\partial y}\left(\frac{\partial u}{\partial t}\right) & =\frac{\partial ^2 u}{\partial x \partial y}\left(-e^s \sin t\right) +\frac{\partial ^2 u}{\partial y^2}e^s \cos t . \end{align*} Finally \begin{align*} & e^{-2s}\left[\frac{\partial ^2u}{\partial s^2} +\frac{\partial ^2u}{\partial t^2}\right] \\ & =e^{-2s}\left[\frac{\partial u}{\partial x}e^s \cos t +\frac{\partial }{\partial s}\left(\frac{\partial u}{\partial x}\right)e^s \cos t +\frac{\partial u}{\partial y}e^s \sin t \right. \\ & \hspace{2cm} \left. +\frac{\partial }{\partial s}\left(\frac{\partial u}{\partial y}\right)e^s \sin t +\frac{\partial u}{\partial x}\left(-e^s \cos t\right)+\frac{\partial }{\partial t}\left(\frac{\partial u}{\partial x}\right)\left(-e^s \sin t\right) \right. \\ & \hspace{2cm} \left. +\frac{\partial u}{\partial y}\left(-e^s \sin t\right) +\frac{\partial }{\partial t}\left(\frac{\partial u}{\partial y}\right)e^s \cos t\right] \\ & =e^{-2s}\left[\frac{\partial u}{\partial x}e^s \cos t +\left[\frac{ \partial ^2 u}{\partial x^2}e^s \cos t +\frac{ \partial^2 u}{\partial x \partial y}\left(e^s \sin t\right)\right]e^s \cos t\right. \\ & \hspace{2cm} \left. +\frac{\partial u}{\partial y}e^s \sin t +\left[\frac{\partial ^2 u}{\partial x \partial y}\left(e^s\cos t\right)+\frac{ \partial ^2 u}{\partial y^2}e^s \sin t\right]e^s \sin t \right. \\ & \hspace{2cm} \left. +\frac{\partial u}{\partial x}\left(-e^s \cos t\right)+\left[\frac{ \partial ^2 u}{\partial x^2}\left(-e^s \sin t\right)+\frac{ \partial ^2 u}{\partial x \partial y}e^s \cos t\right]\left(-e^s \sin t\right) \right. \\ & \hspace{2cm} \left. +\frac{\partial u}{\partial y}\left(-e^s \sin t\right)+\left[\frac{ \partial ^2 u}{\partial x \partial y}\left(-e^s \sin t\right) +\frac{ \partial ^2 u}{\partial y^2}e^s \cos t\right]e^s \cos t\right] \\ & =e^{-2s}\left[\frac{\partial u}{\partial x}e^s \cos t+\frac{ \partial ^2 u}{\partial x^2}e^{2s} \cos ^2 t +\frac{\partial ^2 u}{\partial x \partial y}\left(e^{2s} \cos t \sin t\right) \right. \\ & \hspace{2cm} \left. +\frac{\partial u}{\partial y}e^s \sin t +\frac{ \partial ^2 u}{\partial x \partial y}\left(e^{2s}\sin t \cos t\right) +\frac{ \partial ^2 u}{\partial y^2}e^{2s} \sin ^2 t +\frac{\partial u}{\partial x}\left(-e^s \cos t\right) \right. \\ & \hspace{2cm} \left. +\frac{ \partial ^2 u}{\partial x^2}\left(e^{2s} \sin ^2 t\right) +\frac{ \partial ^2 u}{\partial x \partial y}\left(-e^{2s} \cos t \sin t\right) \right. \\ & \hspace{2cm} \left. +\frac{\partial u}{\partial y}\left(-e^s \sin t\right) +\frac{\partial ^2 u}{\partial x \partial y}\left(-e^{2s} \cos t \sin t\right) +\frac{\partial ^2 u}{\partial y^2}e^{2s} \cos ^2 t\right] \\ & =e^{-2s}\left[\frac{ \partial ^2 u}{\partial x^2}e^{2s} \cos ^2 t +\frac{ \partial ^2 u}{\partial y^2}e^{2s} \sin ^2 t +\frac{ \partial ^2 u}{\partial x^2}\left(e^{2s} \sin ^2 t\right) +\frac{ \partial ^2 u}{\partial y^2}e^{2s} \cos ^2 t\right] \\ & =\frac{ \partial ^2u}{\partial x^2}+\frac{ \partial ^2u}{\partial y^2}. \end{align*}

## 3.12 Exercises

Exercise 3.29 Let $$w=\ln(x+y)$$, $$x=uv$$, $$y=\frac uv$$. What is $$\frac {\partial w}{\partial v}$$?

Exercise 3.30 Write out the chain rule for the function $$t=f(u,v)$$ where $$u=u(x,y,z,w)$$ and $$v=v(x,y,z,w).$$

Exercise 3.31 Write out the chain rule for the function $$w=f(x,y,z)$$ where $$x=x(s,t,u) ,$$ $$y=y(s,t,u) ,$$ and $$z=z(s,t,u).$$

Exercise 3.32 Use the chain rule to find $$\frac{dw}{dt}$$. Leave your answer in mixed form $$(x,y,z,t).$$

• $$w=\ln \left(x+2y-z^2\right) ,$$ $$x=2t-1,$$ $$y=\frac{1}{t},$$ and $$z=\sqrt{t}.$$
• $$w=\sin x y z ,$$ $$x=1-3t ,$$ $$y=e^{1-t} ,$$ and $$z=4t.$$
• $$w=z e^{x y ^2} ,$$ $$x=\sin t ,$$ $$y=\cos t ,$$ and $$z=\tan 2t.$$
• $$w=e^{x^3+y z} ,$$ $$x=\frac{2}{t}$$, $$y=\ln (2t-3) ,$$ and $$z=t^2.$$
• $$w=\frac{x+y}{2-z} ,$$ $$x=2 r s$$, $$y=\sin r t ,$$ and $$z=s t^2.$$

Exercise 3.33 Find $$dy/ dx$$, assuming each of the following the equations defines $$y$$ as a differentiable function of $$x$$.

• $$\left(x^2-y\right)^{3/2}+x^2y=2$$
• $$\tan ^{-1}\left(\frac{x}{y}\right)=\tan ^{-1}\left(\frac{y}{x}\right)$$

Exercise 3.34 Find the following higher order partial derivatives.

• $$\frac{ \partial ^2z}{\partial x\partial y}$$
• $$\frac{ \partial ^2z}{\partial x^2}$$
• $$\frac{\partial ^2z}{\partial y^2}$$
• $$\ln (x+y)=y^2+z.$$
• $$x^{-1}+y^{-1}+z^{-1}=3.$$
• $$z^2+\sin x=\tan y$$
• $$x^2+\sin z=\cot y$$

Exercise 3.35 Use the chain rule for one parameter to find the first order partial derivatives.

• $$f(x,y)=\left(1+x^2+y^2\right)^{1/2}$$ where $$x(t)=\cos 5 t$$ and $$y(t)=\sin 5t$$
• $$g(x,y)=x y^2$$ where $$x(t)=\cos 3t$$ and $$y(t)=\tan 3t.$$

Exercise 3.36 Use the chain rule for two parameters with each of the following.

• $$F(x,y)=x^2+y^2$$ where $$x(u,v)=u \sin v$$ and $$y(u,v)=u-2v$$
• $$F(x,y)=\ln x y$$ where $$x(u,v)=e^{u v^2}$$ and $$y(u,v)=e^{u v}.$$

Exercise 3.37 Let $$(x,y,z)$$ lie on the ellipsoid $\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2}=1,$ without solving for $$z$$, find $$\frac{\partial^2 z}{\partial x^2}$$ and $$\frac{\partial ^2 z}{\partial x\partial y}.$$

Exercise 3.38 If $$w=f\left(\frac{r-s}{s}\right),$$ show that $r\frac{\partial w}{\partial r}+s\frac{\partial w}{\partial s}=0.$

Exercise 3.39 If $$z=x y+f\left(x^2+y^2\right),$$ show that $y\frac{\partial z}{\partial x}-x\frac{\partial z}{\partial y}=y^2-x^2.$

Exercise 3.40 Let $$w=f(t)$$ be a differentiable function of $$t$$, where $$t=\left(x^2+y^2+z^2\right)^{1/2}.$$ Show that $\left( \frac{d w}{d t} \right)^2=\left( \frac{\partial w}{\partial x} \right)^2+\left( \frac{\partial w}{\partial y} \right)^2+\left(\frac{\partial w}{\partial z} \right)^2.$

Exercise 3.41 If $$z=f(x,y),$$ where $$x=r \cos \theta ,$$ $$y=r \sin \theta ,$$ show that $\frac{\text{ }\partial ^2z}{\partial x^2}+\frac{\text{ }\partial ^2z}{\partial y^2}=\frac{ \partial ^2z}{\partial r^2}+\frac{1}{r^2}\frac{\partial ^2z}{\partial \theta ^2}+\frac{1}{r}\frac{\partial z}{\partial r}.$