Skip to main content

Section 3.9 PD4: The Chain Rule

Handout PD4: Lecture Scaffold

Recall: Chain Rule in 1 Variable.

If we have a composition of functions \(f(u(t))\text{,}\) then the chain rule told us how to differentiate \(f\) with respect to \(t\text{:}\)
\begin{equation*} \frac{df}{dt}=\frac{df}{du}\frac{du}{dt} \end{equation*}
In the multi-variable setting, the problem is recast as follows: suppose that \(w=f(x_1,\dots, x_n)\) is some function depending on \(n\) variables and that the functions \(x_i=x_i(t_1,\dots, t_m)\) are themselves functions of other variables. Thus, \(w\) is really a function of the \(t_1,\dots, t_m\) and the \(x_1,\dots, x_n\) are really intermediary variables.
How, then, do we calculate the partial derivatives:
\begin{equation*} \frac{\partial w}{\partial t_j} \end{equation*}
for each \(t_j\text{?}\)

A Helpful First Step.

First, it will be helpful to draw a dependency diagram that that shows how the variables relate to each other. Place a node for \(w\) and then draw an edge joining \(w\) to each intermediary variable \(x_1,\dots, x_n\text{.}\) Then, draw edges from each \(x_1,\dots, x_n\) that connect them to the true independent variables \(t_1,\dots, t_m\text{.}\)

Example 3.9.2.

Consider the function \(w=xy\) where \(x=\cos{t}\) and \(y=\sin{t}\text{.}\) Find the derivative \(\frac{dw}{dt}\text{.}\)

Example 3.9.3.

Suppose that \(w=x^2+y^2\text{,}\) \(x=r-s\) and \(y=r+s\text{.}\) Find expressions for \(\frac{\partial w}{\partial r}\) and \(\frac{\partial w}{\partial s}\) that involves only \(r,s\text{.}\)

Example 3.9.4.

Suppose that \(w=x+2y+z^2\text{,}\) \(x=\frac{r}{s}\) and \(y=r^2+\ln{s}\) and \(z=2r\text{.}\) Find expressions for \(\frac{\partial w}{\partial r}\) and \(\frac{\partial w}{\partial s}\) that involves only \(r,s\text{.}\)

Implicit Differentiation Revisited.

Consider the equation \(F(x,y)=y^2-x^2-\sin{(xy)}=0\text{.}\) This expression defines \(y=y(x)\) as a function of \(x\) even if we can’t solve for the expression explicitly. The chain rule allows to calculate the derivative \(\frac{dy}{dx}\) in terms of the partial derivatives \(F_x,F_y\)

Implicit Differentiation Revisited.

There was nothing special about the particular function \(F\) we chose. Provided that \(F_y\neq 0\) and the partial derivatives are continuous, then \(y\) will always be implicitly defined by \(F\) and:
\begin{equation*} \frac{dy}{dx}=-\frac{F_x}{F_y} \end{equation*}
Likewise with more variables: suppose \(F(x,y,z)=0\text{.}\) Then, provided \(F_z\neq 0\text{,}\) \(z\) is defined as an implicit function of \(x,y\text{.}\) Using the chain rule we can find:
\begin{equation*} \frac{\partial z}{\partial x}=-\frac{F_x}{F_z},\ \ \frac{\partial z}{\partial y}=-\frac{F_y}{F_z} \end{equation*}

Example 3.9.5.

Find \(\frac{\partial z}{\partial x}\) and \(\frac{\partial z}{\partial y}\) at \((0,0,0)\) if
\begin{equation*} F(x,y,z)=x^3+z^2+ye^{xz}+z\cos{y}=0. \end{equation*}

Problem 3.9.6 PD4 Representative Assessment.

(a)

Explain and demonstrate how to draw a dependency diagram for \(w=\ln(x^2+y^2+z^2)\) where \(x=\cos{t},y=\sin{t},z=4\sqrt{t}\) and use it to calculate \(\frac{dw}{dt}\text{.}\)
Solution.
(Still don’t have a great way of including a pic) The diagram should have a \(w\) at the top, with three branches coming down pointing to \(x,y,z\text{,}\) the intermediate variables. Each of \(x,y,z\) will have a single branch coming down to \(t\text{.}\)
The corresponding chain-rule formula is then:
\begin{equation*} \frac{dw}{dt}=\frac{\partial w}{\partial x}\frac{dx}{dt}+\frac{\partial w}{\partial y}\frac{dy}{dt}+\frac{\partial w}{\partial z}\frac{dz}{dt} \end{equation*}
We now compute:
\begin{align*} \frac{dw}{dt}=\amp \frac{2x}{x^2+y^2+z^2}\frac{dx}{dt}+\frac{2y}{x^2+y^2+z^2}\frac{dy}{dt}+\frac{2z}{x^2+y^2+z^2}\frac{dz}{dt}\\ =\amp \frac{2x}{x^2+y^2+z^2}(-\sin{t})+\frac{2y}{x^2+y^2+z^2}(\cos{t})+\frac{2z}{x^2+y^2+z^2}(\frac{2}{\sqrt{t}}) \end{align*}
here, we note that \(2x(-\sin{t})+2y\cos{t}=0\text{,}\) so this expression simplifies to:
\begin{equation*} \frac{16}{1+16t} \end{equation*}

(b)

Explain and demonstrate how to find \(\frac{\partial z}{\partial x}\) and \(\frac{\partial z}{\partial y}\) where \(F=\sin(x+y)+\sin(y+z)+\sin(x+z)=0\text{.}\)
Solution.
Here, \(z\) is defined implicitly as a function of \(x,y\) via the equation \(F=\sin(x+y)+\sin(y+z)+\sin(x+z)=0\text{.}\) Thus, its partial derivatives, as we saw in class, are given by:
\begin{align*} \frac{\partial z}{\partial x}= \amp -\frac{F_x}{F_z}\\ \frac{\partial z}{\partial y}= \amp -\frac{F_y}{F_z} \end{align*}
We compute:
\begin{align*} F_x =\amp \cos(x+y)+\cos(x+z)\\ F_y = \amp \cos(x+y)+\cos(y+z)\\ F_z = \amp \cos(y+z)+\cos(x+z) \end{align*}
and so:
\begin{align*} \frac{\partial z}{\partial x}= \amp -\frac{(\cos(x+y)+\cos(x+z))}{\cos(y+z)+\cos(x+z)}\\ \frac{\partial z}{\partial y}= \amp -\frac{(\cos(x+y)+\cos(y+z))}{\cos(y+z)+\cos(x+z)} \end{align*}