Chain Rule for Multivariable Functions

Direct Knowlege Contributor David A. Smith
  • By David A. Smith, Founder & CEO, Direct Knowledge
  • David Smith has a B.S. and M.S. in Mathematics and has enjoyed teaching calculus, linear algebra, and number theory at both Tarrant County College and the University of Texas at Arlington. David is the Founder and current CEO of Direct Knowledge.

Introduction to 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 \begin{equation} \frac{dy}{d t}=\frac{dy}{dx}\frac{dx}{dt}. \end{equation}

The Chain Rule with 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.

Chain Rule for Multivariable Functions

Theorem. (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 \begin{equation} \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}. \end{equation}

Proof. Because $z=f(x,y)$ is differentiable, we can write the increment $\Delta z$ in the following form: \begin{equation} \Delta z=\frac{\partial z}{\partial x}\Delta x+\frac{\partial z}{\partial y}\Delta y+\epsilon_1\Delta x+\epsilon_2\Delta y \end{equation} 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 \begin{equation} \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}. \end{equation} Because $x$ and $y$ are function of $t$, we can write their increments as \begin{equation} \Delta x=x(t+\Delta t) -x(t) \qquad \text{and} \qquad \Delta y=y(t+\Delta t)-y(t).\end{equation} 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. If $z=x^2y+3x y^4,$ where $x=e^t$ and $y=\sin t$, find $\frac{d z}{d t}.$

Solution. 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{sin t}^4t\right)e^t +\left(e^{2t}+12e^t\sin ^3t\right) \cos t. \end{align} as desired.

Example. Two objects are traveling in elliptical paths given by the following parametric equations \begin{equation} 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. \end{equation} At what rate is the distance between the two objects changing when $t=\pi ?$

Chain Rule for Multivariable Functions

Solution. The distance $s$ between the two objects is given by \begin{equation} s=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2} \end{equation} and that when $t=\pi ,$ we have $x_1=-2,$ $y_1=0,$ $x_2=0,$ and $y_2=3.$ So \begin{equation} s=\sqrt{(0+2)^2+(3-0)^2}=\sqrt{13}. \end{equation} 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 \begin{equation} \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} \end{equation} When $t=\pi $, we find that the distance is changing at a rate of \begin{equation*} \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}}. \end{equation*}

The Chain Rule with 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.

Theorem. (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 \begin{equation} \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}. \end{equation}

Chain Rule for Multivariable Functions
Chain Rule for Multivariable Functions

Example. 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. The Cauchy-Riemann equations are \begin{equation} \frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}\end{equation} 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 \begin{equation} \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 }. \end{equation}

Solution. Using $x=r \cos \theta $ and $y=r \sin \theta $ we can state the chain rule to be used: \begin{equation} \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 }. \end{equation} By the chain rule \begin{equation} \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 ).\end{equation} Substituting, \begin{equation} \frac{\partial u}{\partial x}=\frac{\partial v}{\partial y} \qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x},\end{equation} we obtain \begin{equation}\frac{\partial u}{\partial r}=\frac{\partial v}{\partial y}\cos \theta -\frac{\partial v}{\partial x} \sin \theta \end{equation} and so \begin{equation} \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 }. \end{equation} Similarly the chain rule is to be used \begin{equation} \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 }. \end{equation} By the chain rule \begin{equation} \frac{\partial v}{\partial r}=\frac{\partial v}{\partial x}\cos \theta +\frac{\partial v}{\partial y}\sin \theta\end{equation} and \begin{equation} \frac{\partial u}{\partial \theta }=-\frac{\partial u}{\partial x}(r \sin \theta )+\frac{\partial u}{\partial y}(r \cos \theta ).\end{equation} Substituting \begin{equation} \frac{\partial u}{\partial x}=\frac{\partial v}{\partial y}\qquad \text{and} \qquad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}, \end{equation} we obtain \begin{equation} \frac{\partial v}{\partial r}=-\frac{\partial u}{\partial y}\cos \theta -\frac{\partial u}{\partial x} \sin \theta \end{equation} and also \begin{equation*} \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 }. \end{equation*}

The Chain Rule with Several Independent Variables

Theorem. (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,…,x_n$ which in turn are differentiable functions of $m$ parameters $t_1,…,t_m$ then the composite function is differentiable and \begin{equation} \frac{\partial w}{\partial t_1}=\sum_{k=1}^n \frac{\partial w}{\partial x_k}\frac{\partial x_k}{\partial t_1}, \quad … \quad , \frac{\partial w}{\partial t_m}=\sum_{k=1}^n \frac{\partial w}{\partial x_k}\frac{\partial x_k}{\partial t_m}.\end{equation}

Example. 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: \begin{equation} \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} \end{equation} and \begin{equation} \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}. \end{equation} The chain rule for the case when $n=4$ and $m=2.$

Chain Rule for Multivariable Functions
Chain Rule for Multivariable Functions

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

Chain Rule for Multivariable Functions

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 \begin{equation} \frac{\partial u}{\partial s}=(64)(2)+(16)(4)+(0)(0)=192. \end{equation} as desired.

Example. 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 \begin{equation} \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. \end{equation}

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

Solution. Let $w=u^2v^2$, so $z=u+f(w).$ Then according to the chain rule, \begin{equation} \frac{\partial z}{\partial u}=1+\frac{d f}{d w}\frac{\partial w}{\partial u}=1+f'(w)\left(2u v^2\right)\end{equation} and \begin{equation}\frac{\partial z}{\partial v}=1+\frac{d f}{d w}\frac{\partial w}{\partial v}=f'(w)\left(2u^2 v\right) \end{equation} 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. \end{align}

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

Chain Rule for Multivariable Functions

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. \end{align}

Example. If $u=f(x,y),$ where $x=e^s \cos t$ and $y=e^s \sin t,$ show that \begin{equation} \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]. \end{equation}

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 \begin{equation} \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\end{equation} 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}

Exercises on the Chain Rule

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

Exercise. 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. 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. Use the chain rule to find $\frac{dw}{dt}.$ Leave your answer in mixed form $(x,y,z,t).$

$(1) \quad w=\ln \left(x+2y-z^2\right) ,$ $x=2t-1,$ $y=\frac{1}{t},$ and $z=\sqrt{t}.$

$(2) \quad w=\sin x y z ,$ $x=1-3t ,$ $y=e^{1-t} ,$ and $z=4t.$

$(3) \quad w=z e^{x y ^2} ,$ $x=\sin t ,$ $y=\cos t ,$ and $z=\tan 2t.$

$(4) \quad w=e^{x^3+y z} ,$ $x=\frac{2}{t}$, $y=\ln (2t-3) ,$ and $z=t^2.$

$(5) \quad w=\frac{x+y}{2-z} ,$ $x=2 r s$, $y=\sin r t ,$ and $z=s t^2.$

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

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

$(2) \quad \tan ^{-1}\left(\frac{x}{y}\right)=\tan ^{-1}\left(\frac{y}{x}\right)$

Exercise. Find the following higher order partial derivatives: $\displaystyle \frac{ \partial ^2z}{\partial x\partial y}$, $\displaystyle \frac{ \partial ^2z}{\partial x^2}$, and $\displaystyle \frac{\partial ^2z}{\partial y^2}$ for each of the following.

$(1) \quad \ln (x+y)=y^2+z$

$(2) \quad x^{-1}+y^{-1}+z^{-1}=3$

$(3) \quad z^2+\sin x=\tan y$

$(4) \quad x^2+\sin z=\cot y$

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

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

$(2) \quad g(x,y)=x y^2$ where $x(t)=\cos 3t$ and $y(t)=\tan 3t.$

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

$(1)\quad F(x,y)=x^2+y^2$ where $x(u,v)=u \sin v$ and $y(u,v)=u-2v$

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

Exercise. 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. 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. 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. Let $w=f(t)$ be a differentiable function of $t$, where $t =\left(x^2+y^2 +z^2\right)^{1/2}.$ Show that \begin{equation} \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.\end{equation}

Exercise. If $z=f(x,y),$ where $x=r \cos \theta ,$ $y=r \sin \theta ,$ show that \begin{equation} \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}. \end{equation}