The Chain Rule


...a chain of events.

When we take about the chain rule, we're referring to an image of a chain of events.

1-d chain rule

If $y=f(x)$, and in turn $x=g(t)$ then the chain rule in an easy-to-remember form is: $$\frac{dy}{dt}=\frac{dy}{dx}\frac{dx}{dt}.$$

Examples

$$y(x)=x^3;\ \ x(t)=\ln t;\ \ \Rightarrow y(x(t))=(\ln t)^3.$$

$$\frac{dy}{dx}=3x^2; \frac{dx}{dt}=\frac1t$$

$$\Rightarrow \frac{dy}{dt}=\frac{dy}{dx}\frac{dx}{dt}=3x^2 \frac1t=\frac{3(\ln t)^2}{t}.$$

Another way of talking about the chain rule is to call $y(x)$ the "outside" function, and $x(t)$ the "inside" function. Then, we say that we take the derivative of the outside function (wrt to the inside function), and then multiply by the derivative of the inside function. I think about "putting off" evaluating $x'(t)$ until the very end...x

To differentiate $y(t)=\frac{1}{7t}$ the outside function is $y(x)=\frac{1}{x}$, and the inside function is $x(t)=7t$. $$\begineq\frac{d}{dt}\left(\frac{1}{x}\right)&=\frac{d}{dt}(x)^{-1} =\frac{d}{dx}\left(x^{-1}\right)\frac{d}{dt}(x)\\ &=-1(x)^{-2}\frac{d}{dt}(x) =\frac{-1}{(7t)^2}(7)\\ &=-\frac{1}{7t^2} \endeq $$

Multivariable chain rule

Our hiking approximation: $$ \Delta z \approx f_x \Delta x + f_y \Delta y$$

If $z=f(x,y)$ and in turn $x=g(t)$ and $y=h(t)$ are parametric functions of $t$, then $z$ must ultimately be a function of $t$ as well: $z=z(t)$.

The $\Delta$ symbols mean: $\Delta z= z(t+\Delta t)-z(t)$, $\Delta x= x(t+\Delta t)-x(t)$, and $\Delta y= y(t+\Delta t)-y(t)$.

Now divide both sides of the hiking approximation by $\Delta t$: $$ \frac{\Delta z}{\Delta t} \approx f_x \frac{\Delta x}{\Delta t} + f_y \frac{\Delta y}{\Delta t}$$

In the limit $\Delta t\to 0$ these change ratios become differentials approximate relation becomes exact...(and substituting in the definitions of $f_x$ and $f_y$ in terms of $z$)

$$ \frac{dz}{dt} = \frac{\del z}{\del x} \frac{dx}{dt} + \frac{\del z}{\del y} \frac{dy}{dt}.$$ This is "Case 1" of the multi-variable chain rule.

This also shows the difference between partial derivatives and exact derivatives).

For example, if $f(x(t),y(t))=\sin(xy^2)$, $$\begineq \frac{dz}{dt}&= \frac{\del z}{\del x} \frac{dx}{dt} + \frac{\del z}{\del y} \frac{dy}{dt}\\ &= \cos(xy^2)\cdot y^2 \frac{dx}{dt} + \cos(xy^2)\cdot x2y \frac{dy}{dt}\\ &= y\cos(xy^2)\left[y \frac{dx}{dt} + 2x \frac{dy}{dt}\right]. \endeq$$

I use the derivatives (e.g. $d/dt$) when writing about a function that depends on just one variable. I use the partial derivatives (e.g. $\del/\del x$) when talking about a rate of change of a function that depends on more than one variable (and implicitly, the other variables are held constant while calculating the partial derivative).

Chain rule for more than one independent variable

Example

4 intermediate variables which each depend on 2 total independent variables




Now you might proceed to topic 10.6.

Implicit differentiation

Read about implicit differentiation

Typographical issues in WebAssign #6

Your textbook starts by differentiating a function $F(x,y,z)=0$. We make the assumption that $z$ is actually a function of $x$ and $y$. The development in Stewart results in *2* equations, but in problem 6, it looks like they might be just one long complicated equation. My additions in red below are to make clear that these are two equations:

The example we did in class today:

An example

Consider the ideal gas law (this is called an "Equation of State") $$PV=nRT$$ The symbols are $P$, pressure; $V$, volume; $n$, number of moles of a gas (considered a constant and not a variable); $R$, the gas constant; and $T$, temperature.

Using algebra you can re-arrange this to find the following function, which depends on $P$, $V$, and $T$ and is equal to 0: $$ 0 = PV-nRT \equiv F(P,V,T) $$

Now imagine that we can control the volume and temperature of a quantity of gas--say, it's in a piston (we can change the volume), surrounded by a heat bath (we can change the temperature). Then we view the pressure as a function of the temperature and volume, that is $$F(\ P(V,T),\ \, V,T)=0.$$ One of Stewart's expressions tells us that $$\frac{\del P}{\del T}=-\frac{\frac{\del F}{\del T}}{\frac{\del F}{\del P}}.$$

Looking back at $F=PV-nRT$, we find $\del F/\del T = -nR$ and $\del F/\del P=V$. Plugging these into the expression above: $$\frac{\del P}{\del T}=-\frac{-nR}{V}=\frac{nR}{V}.$$ Is this right? We can check the answer, in this case, because there's an easier way to find $\del P/\del T$. We can solve the ideal gas law for $P$, to get: $$P(T,V)=\frac{nRT}{V}.$$ And taking the partial derivative w.r.t. $T$ of both sides: $$\frac{\del P}{\del T}=\frac{\del}{\del T}\left(\frac{nR}{V}\right)T = \left(\frac{nR}{V}\right)\frac{\del}{\del T}T =\frac{nR}{V}.$$ Sure enough!

Image credits

Cover of Rube Goldberg's Inventions!