Multivariable CalculusThe Chain Rule and the Gradient1 of 4
The Chain Rule and the Gradient · 1

The Multivariable Chain Rule

When a function zz depends on xx and yy, and both xx and yy change with time tt, we need a way to find how fast zz changes with tt overall.

Before looking at two variables changing at once, let's see how sensitivities multiply along a single chain t→x→zt \to x \to z.

Sensitivities along a chain
tt
xx
zz
3\htmlClass{lc-pink}{3}
2\htmlClass{lc-pink}{2}
dzdt=  ?\htmlClass{lc-pink}{\dfrac{dz}{dt}} = \;?
t→  dxdt  x→  dzdx  z  ⟹  dzdt=dzdxdxdt\displaystyle \begin{gathered}t \xrightarrow{\;\rate{\tfrac{dx}{dt}}\;} x \xrightarrow{\;\rate{\tfrac{dz}{dx}}\;} z \\ \implies \rate{\frac{dz}{dt}} = \rate{\frac{dz}{dx}}\rate{\frac{dx}{dt}}\end{gathered}
1

Two paths at once

Now suppose zz depends on both xx and yy, and both xx and yy depend on tt. A small change in tt reaches zz along two paths at the same time: one through xx and one through yy. Why can we find those two effects separately and simply add them, even when xx and yy are multiplied together inside zz?

Why two paths add without interfering
xx
East\htmlClass{lc-mute}{\text{East}}
yy
North\htmlClass{lc-mute}{\text{North}}
zz

For tiny steps Δx\rate{\Delta x} and Δy\rate{\Delta y}, the corner piece Δx⋅Δy\discard{\Delta x \cdot \Delta y} is so much smaller than the two side strips y Δx\rate{y\,\Delta x} and x Δy\rate{x\,\Delta y} that it drops out in the limit.

As the step shrinks, the corner piece vanishes compared to the two side strips, leaving the total change as just the two strips.
2

Building the formula from the diagram

We can read the chain rule formula, and whether each derivative uses a straight d\rate{d} or a curly ∂\rate{\partial}, right off the arrow diagram for t→x,y→zt \to x, y \to z.

Straight d, curly ∂, and building the formula
tt
xx
yy
zz
d\htmlClass{lc-pink}{d}
∂\htmlClass{lc-pink}{\partial}
tt
xx
yy
zz
dxdt\htmlClass{lc-pink}{\dfrac{dx}{dt}}
∂z∂x\htmlClass{lc-pink}{\dfrac{\partial z}{\partial x}}
dydt\htmlClass{lc-pink}{\dfrac{dy}{dt}}
∂z∂y\htmlClass{lc-pink}{\dfrac{\partial z}{\partial y}}
dzdt\displaystyle \rate{\frac{dz}{dt}} =∂z∂xdxdt⏟path through x+∂z∂ydydt⏟path through y\displaystyle = \underbrace{\rate{\frac{\partial z}{\partial x}}\rate{\frac{dx}{dt}}}_{\text{path through } x} + \underbrace{\rate{\frac{\partial z}{\partial y}}\rate{\frac{dy}{dt}}}_{\text{path through } y}

A variable with only one arrow pointing into it gets a straight d\rate{d}, while a variable with two or more arrows pointing into it gets a curly ∂\rate{\partial} to show that its other inputs are held fixed. Because the whole system starts from a single input tt, the total derivative on the left is dzdt\rate{\frac{dz}{dt}} with a straight d\rate{d}.

3

Finding dzdt\frac{dz}{dt} from formulas

Let's find dzdt\rate{\frac{dz}{dt}} at t=0t = 0 for

z=x2y+3y,x=sin⁡(t),y=et\displaystyle \begin{aligned}z &= \fn{x^2y + 3y}, \\ x &= \sin(t), \qquad y = e^t\end{aligned}

We could plug sin⁡(t)\sin(t) and ete^t into zz first, but finding the four derivatives on the diagram keeps the algebra much simpler.

Finding dz/dt from formulas
tt
xx
yy
zz
x=sin⁡(t)x = \sin(t)
z=x2y+3yz = \htmlClass{lc-blue}{x^2y + 3y}
y=ety = e^{t}
dzdt∣t=0=  ?\left.\htmlClass{lc-pink}{\dfrac{dz}{dt}}\right|_{t=0} = \;?
Text solution
Find the four derivatives on the arrowsDifferentiate zz with respect to xx and yy while holding the other variable constant, and differentiate xx and yy with respect to tt.
∂z∂x=2xy,dxdt=cos⁡(t),∂z∂y=x2+3,dydt=et\displaystyle \begin{aligned}\rate{\frac{\partial z}{\partial x}} &= \rate{2xy}, & \qquad \rate{\frac{dx}{dt}} &= \rate{\cos(t)}, \\ \rate{\frac{\partial z}{\partial y}} &= \rate{x^2 + 3}, & \qquad \rate{\frac{dy}{dt}} &= \rate{e^t}\end{aligned}
Multiply along each path and addCombine the top path through xx and the bottom path through yy.
dzdt\displaystyle \rate{\frac{dz}{dt}} =(2xy)cos⁡(t)+(x2+3)et\displaystyle = \rate{(2xy)}\rate{\cos(t)} + \rate{(x^2 + 3)}\rate{e^t}
Find xx and yy at t=0t = 0 and plug inFind the numbers x(0)x(0) and y(0)y(0) so we can plug numbers straight into our derivative instead of plugging in the whole formulas for x(t)x(t) and y(t)y(t).
t=0  ⟹  x=sin⁡(0)=0,y=e0=1\displaystyle \begin{aligned}t = 0 \implies x &= \sin(0) = 0, \\ y &= e^0 = 1\end{aligned}
dzdt\displaystyle \rate{\frac{dz}{dt}} =2(0)(1)cos⁡(0)+(02+3)e0\displaystyle = 2(0)(1)\cos(0) + (0^2 + 3)e^0 =0+(3)(1)\displaystyle = 0 + (3)(1) =3\displaystyle = 3

So at t=0t = 0, zz is increasing at 33 units per second.

4

Finding dzdt\frac{dz}{dt} from a table of values

Sometimes we don't have formulas for f(x,y)\fn{f(x, y)}, x(t)x(t), or y(t)y(t), and instead want to find dzdt\rate{\frac{dz}{dt}} at t=2t = 2 from measurements at that moment (where fx\rate{f_x} and fy\rate{f_y} are shorthand for ∂z∂x\rate{\frac{\partial z}{\partial x}} and ∂z∂y\rate{\frac{\partial z}{\partial y}}):

x(2)=4,y(2)=1,dxdt∣t=2=−3,dydt∣t=2=5\displaystyle \begin{aligned}x(2) &= 4, & \qquad y(2) &= 1, \\ \rate{\frac{dx}{dt}\bigg|_{t=2}} &= \rate{-3}, & \qquad \rate{\frac{dy}{dt}\bigg|_{t=2}} &= \rate{5}\end{aligned}
(x,y)fx(x,y)fy(x,y)(2,2)108(4,1)26\displaystyle \begin{array}{c|cc} (x, y) & \rate{f_x(x, y)} & \rate{f_y(x, y)} \\ \hline (2, 2) & \rate{10} & \rate{8} \\ (4, 1) & \rate{2} & \rate{6} \end{array}
Finding dz/dt from a table of values
tt
xx
yy
zz
−3\htmlClass{lc-pink}{-3}
5\htmlClass{lc-pink}{5}
dzdt∣t=2=  ?\left.\htmlClass{lc-pink}{\dfrac{dz}{dt}}\right|_{t=2} = \;?
Text solution
Use the point (x,y)(x, y) at t=2t = 2 to look up fx\rate{f_x} and fy\rate{f_y}Because z=f(x,y)z = \fn{f(x, y)} takes in the position (x,y)(x, y) rather than the time tt directly, read the table at (x(2),y(2))=(4,1)(x(2), y(2)) = (4, 1), not at (2,2)\discard{(2, 2)}.
∂z∂x=fx(4,1)=2,∂z∂y=fy(4,1)=6\displaystyle \begin{aligned}\rate{\frac{\partial z}{\partial x}} &= \rate{f_x(4, 1)} = \rate{2}, \\ \rate{\frac{\partial z}{\partial y}} &= \rate{f_y(4, 1)} = \rate{6}\end{aligned}
Multiply along each path and addMultiply each partial derivative at (4,1)(4, 1) by the rate of change of that coordinate at t=2t = 2.
dzdt\displaystyle \rate{\frac{dz}{dt}} =fx(4,1)dxdt+fy(4,1)dydt\displaystyle = \rate{f_x(4, 1)}\rate{\frac{dx}{dt}} + \rate{f_y(4, 1)}\rate{\frac{dy}{dt}} =(2)(−3)+(6)(5)\displaystyle = (2)(-3) + (6)(5) =24\displaystyle = 24

So at t=2t = 2, zz is increasing at 2424 units per second.

5

When xx and yy depend on two variables

Now suppose xx and yy each depend on two inputs, ss and tt, and we want to find ∂z∂s\rate{\frac{\partial z}{\partial s}} and ∂z∂t\rate{\frac{\partial z}{\partial t}} for

z=exsin⁡(y),x=st2,y=s2+t\displaystyle \begin{aligned}z &= \fn{e^x \sin(y)}, \\ x &= st^2, \qquad y = s^2 + t\end{aligned}
When x and y depend on two variables
ss
tt
xx
yy
zz
x=st2x = st^2
z=exsin⁡(y)z = \htmlClass{lc-blue}{e^x \sin(y)}
y=s2+ty = s^2 + t
∂z∂s=  ?\htmlClass{lc-pink}{\dfrac{\partial z}{\partial s}} = \;?
∂z∂t=  ?\htmlClass{lc-pink}{\dfrac{\partial z}{\partial t}} = \;?
Text solution
Follow only the paths starting at ssHolding t\held{t} fixed leaves the two paths from ss to zz through xx and yy, with curly ∂\rate{\partial}'s on every arrow because xx, yy, and zz each have two inputs.
∂z∂s\displaystyle \rate{\frac{\partial z}{\partial s}} =∂z∂x∂x∂s+∂z∂y∂y∂s\displaystyle = \rate{\frac{\partial z}{\partial x}}\rate{\frac{\partial x}{\partial s}} + \rate{\frac{\partial z}{\partial y}}\rate{\frac{\partial y}{\partial s}}
Find the partial derivatives along the ss-pathsDifferentiate zz with respect to xx and yy, and differentiate xx and yy with respect to ss while treating t\held{t} as a constant.
∂z∂x=exsin⁡(y),∂z∂y=excos⁡(y),∂x∂s=t2,∂y∂s=2s\displaystyle \begin{aligned}\rate{\frac{\partial z}{\partial x}} &= \rate{e^x \sin(y)}, \\ \rate{\frac{\partial z}{\partial y}} &= \rate{e^x \cos(y)}, \\ \rate{\frac{\partial x}{\partial s}} &= \rate{t^2}, \qquad \rate{\frac{\partial y}{\partial s}} = \rate{2s}\end{aligned}
Multiply along each path and addPlug the four partial derivatives into the formula.
∂z∂s\displaystyle \rate{\frac{\partial z}{\partial s}} =(exsin⁡y)(t2)+(excos⁡y)(2s)\displaystyle = \rate{(e^x \sin y)}\rate{(t^2)} + \rate{(e^x \cos y)}\rate{(2s)}

This gives the rate of change of zz as ss changes with t\held{t} held fixed. To find ∂z∂t\rate{\frac{\partial z}{\partial t}}, we keep the same ∂z∂x\rate{\frac{\partial z}{\partial x}} and ∂z∂y\rate{\frac{\partial z}{\partial y}} and swap in the two arrows starting from tt:

∂z∂t\displaystyle \rate{\frac{\partial z}{\partial t}} =∂z∂x∂x∂t+∂z∂y∂y∂t\displaystyle = \rate{\frac{\partial z}{\partial x}}\rate{\frac{\partial x}{\partial t}} + \rate{\frac{\partial z}{\partial y}}\rate{\frac{\partial y}{\partial t}}
Moving along ss or tt alone holds the other input fixed, so only the two paths from the moving input change zz.
6

When tt is also inside zz

What if tt appears right inside the formula for zz as well as inside xx and yy, and we want to find dzdt\rate{\frac{dz}{dt}} for

z\displaystyle z =x2y+5t,x\displaystyle = \fn{x^2y + 5t}, \qquad x =t3,y\displaystyle = t^3, \qquad y =2t\displaystyle = 2t
When t is also inside z
xx
East\htmlClass{lc-mute}{\text{East}}
yy
North\htmlClass{lc-mute}{\text{North}}
zz
tt
xx
yy
zz
dxdt\htmlClass{lc-pink}{\dfrac{dx}{dt}}
∂z∂x\htmlClass{lc-pink}{\dfrac{\partial z}{\partial x}}
dydt\htmlClass{lc-pink}{\dfrac{dy}{dt}}
∂z∂y\htmlClass{lc-pink}{\dfrac{\partial z}{\partial y}}
∂z∂t\htmlClass{lc-pink}{\dfrac{\partial z}{\partial t}}
dzdt⏟all paths from t to z\displaystyle \underbrace{\rate{\frac{dz}{dt}}}_{\text{all paths from } t \text{ to } z} =∂z∂xdxdt+∂z∂ydydt+∂z∂t⏟direct arrow t→z only\displaystyle = \rate{\frac{\partial z}{\partial x}}\rate{\frac{dx}{dt}} + \rate{\frac{\partial z}{\partial y}}\rate{\frac{dy}{dt}} + \underbrace{\rate{\frac{\partial z}{\partial t}}}_{\text{direct arrow } t \to z \text{ only}}
Text solution
Find the direct partial derivative ∂z∂t\rate{\frac{\partial z}{\partial t}}Hold x\held{x} and y\held{y} fixed in z=x2y+5tz = \fn{x^2y + 5t} and differentiate only the 5t\fn{5t} term.
∂z∂t\displaystyle \rate{\frac{\partial z}{\partial t}} =5\displaystyle = \rate{5}
Add the xx and yy paths to the direct pathDifferentiate along the top and bottom chains and add all three paths from tt to zz.
dzdt\displaystyle \rate{\frac{dz}{dt}} =(2xy)(3t2)+(x2)(2)+5\displaystyle = \rate{(2xy)}\rate{(3t^2)} + \rate{(x^2)}\rate{(2)} + \rate{5}

While ∂z∂t=5\rate{\frac{\partial z}{\partial t}} = \rate{5} measures only how fast zz changes from the 5t\fn{5t} term alone with x\held{x} and y\held{y} held fixed, dzdt\rate{\frac{dz}{dt}} combines all three ways tt changes zz.

7

The chain rule as a dot product

Because the dot product of two vectors multiplies their matching components and adds them, (a,b)⋅(c,d)=ac+bd(a, b) \cdot (c, d) = ac + bd, the two-path sum in the chain rule can be written as a single dot product of the surface's gradient and your velocity vector.

The chain rule as a dot product
dzdt=∂z∂xdxdt+∂z∂ydydt=(  ? ,  ?  )⋅(  ? ,  ?  )\displaystyle \begin{aligned}\htmlClass{lc-pink}{\frac{dz}{dt}} &= \htmlClass{lc-pink}{\frac{\partial z}{\partial x}}\htmlClass{lc-pink}{\frac{dx}{dt}} + \htmlClass{lc-pink}{\frac{\partial z}{\partial y}}\htmlClass{lc-pink}{\frac{dy}{dt}}\\ &= (\;?\,,\;?\;) \cdot (\;?\,,\;?\;)\end{aligned}
dzdt\displaystyle \rate{\frac{dz}{dt}} =(∂z∂x,∂z∂y)⏟gradient (steepest uphill)⋅(dxdt,dydt)⏟velocity v\displaystyle = \underbrace{\left(\rate{\frac{\partial z}{\partial x}}, \rate{\frac{\partial z}{\partial y}}\right)}_{\text{gradient (steepest uphill)}} \cdot \underbrace{\left(\rate{\frac{dx}{dt}}, \rate{\frac{dy}{dt}}\right)}_{\text{velocity } v}

So your rate of climb dzdt\rate{\frac{dz}{dt}} is largest when you move straight uphill with the gradient, most negative when you move opposite the gradient, and zero when you move perpendicular to it so the xx and yy changes cancel out.

At any spot on the mountain, the uphill gradient stays fixed, and how fast you climb comes from how your walking direction lines up with it.

Summary

Every multivariable chain rule problem comes down to drawing the arrows from inputs to outputs: multiply along each path, and add all paths that connect your chosen input to the output.

Straight d\rate{d} vs. curly ∂\rate{\partial}

Count the arrows pointing into the variable (or the starting inputs for the overall derivative). One arrow means a single variable controls it, so use a straight d\rate{d} (like dxdt\rate{\frac{dx}{dt}} when x=sin⁡tx = \sin t). Two or more arrows mean other inputs are being held fixed, so use a curly ∂\rate{\partial} (like ∂x∂s\rate{\frac{\partial x}{\partial s}} when x=st2x = st^2).

One starting input (t→x,y→z){(t \to x, y \to z)}

Both paths from tt to zz add together, which is also the dot product of the gradient vector and the velocity vector vv:

dzdt\displaystyle \rate{\frac{dz}{dt}} =∂z∂xdxdt+∂z∂ydydt\displaystyle = \rate{\frac{\partial z}{\partial x}}\rate{\frac{dx}{dt}} + \rate{\frac{\partial z}{\partial y}}\rate{\frac{dy}{dt}} =(∂z∂x,∂z∂y)⋅(dxdt,dydt)\displaystyle = \left(\rate{\frac{\partial z}{\partial x}}, \rate{\frac{\partial z}{\partial y}}\right) \cdot \left(\rate{\frac{dx}{dt}}, \rate{\frac{dy}{dt}}\right)
When asked for dzdt\rate{\frac{dz}{dt}} at a specific time like t=0t = 0, find the numbers x(0)x(0) and y(0)y(0) first rather than plugging the formulas for x(t)x(t) and y(t)y(t) into zz. When using a table of values at t=2t = 2, look up fx\rate{f_x} and fy\rate{f_y} at the point (x(2),y(2))(x(2), y(2)), not at (2,2)\discard{(2, 2)}.

Two starting inputs (s,t→x,y→z){(s, t \to x, y \to z)}

Hold the other input fixed and add only the paths starting from the variable you are differentiating with respect to:

∂z∂s\displaystyle \rate{\frac{\partial z}{\partial s}} =∂z∂x∂x∂s+∂z∂y∂y∂s\displaystyle = \rate{\frac{\partial z}{\partial x}}\rate{\frac{\partial x}{\partial s}} + \rate{\frac{\partial z}{\partial y}}\rate{\frac{\partial y}{\partial s}}

When tt is already inside zz directly

A tt term written right inside zz (like the 5t\fn{5t} in z=x2y+5tz = \fn{x^2y + 5t}) does not go through xx or yy. It gives a direct arrow t→zt \to z labeled ∂z∂t=5\rate{\frac{\partial z}{\partial t}} = \rate{5} that gets added alongside the xx and yy paths:

dzdt\displaystyle \rate{\frac{dz}{dt}} =∂z∂xdxdt+∂z∂ydydt+∂z∂t\displaystyle = \rate{\frac{\partial z}{\partial x}}\rate{\frac{dx}{dt}} + \rate{\frac{\partial z}{\partial y}}\rate{\frac{dy}{dt}} + \rate{\frac{\partial z}{\partial t}}

8

Practice

1

Let z=x2y+y2z = \fn{x^2y + y^2}, where x=2t+1x = 2t + 1 and y=ety = e^t. Find dzdt\rate{\frac{dz}{dt}} when t=0t = 0.

Find the four derivatives on the t→x,y→zt \to x, y \to z diagram, and find xx and yy at t=0t = 0 before plugging in.

Differentiating along each arrow gives ∂z∂x=2xy\rate{\frac{\partial z}{\partial x}} = \rate{2xy}, dxdt=2\rate{\frac{dx}{dt}} = \rate{2}, ∂z∂y=x2+2y\rate{\frac{\partial z}{\partial y}} = \rate{x^2 + 2y}, and dydt=et\rate{\frac{dy}{dt}} = \rate{e^t}, so dzdt=(2xy)(2)+(x2+2y)(et)\rate{\frac{dz}{dt}} = \rate{(2xy)}\rate{(2)} + \rate{(x^2 + 2y)}\rate{(e^t)}. At t=0t = 0, x=2(0)+1=1x = 2(0) + 1 = 1 and y=e0=1y = e^0 = 1 (watch out: assuming x=0x = 0 and y=0y = 0 just because t=0t = 0 gives 00). Plugging in t=0,x=1,y=1t = 0, x = 1, y = 1 gives dzdt=(2)(2)+(3)(1)=7\rate{\frac{dz}{dt}} = (2)(2) + (3)(1) = 7.
2

Suppose z=f(x,y)z = \fn{f(x, y)}. At t=3t = 3, x(3)=1x(3) = 1, y(3)=5y(3) = 5, dxdt=4\rate{\frac{dx}{dt}} = \rate{4}, and dydt=−2\rate{\frac{dy}{dt}} = \rate{-2}. Using the table values fx(3,3)=7\rate{f_x(3, 3)} = \rate{7}, fy(3,3)=9\rate{f_y(3, 3)} = \rate{9}, fx(1,5)=3\rate{f_x(1, 5)} = \rate{3}, and fy(1,5)=8\rate{f_y(1, 5)} = \rate{8}, find dzdt\rate{\frac{dz}{dt}} when t=3t = 3.

Which point (x,y)(x, y) are you at when t=3t = 3?

At t=3t = 3, (x,y)=(1,5)(x, y) = (1, 5), so use fx(1,5)=3\rate{f_x(1, 5)} = \rate{3} and fy(1,5)=8\rate{f_y(1, 5)} = \rate{8} (watch out: looking up (3,3)\discard{(3, 3)} just because t=3t = 3 uses 77 and 99 and gives 1010). Then dzdt=fx(1,5)dxdt+fy(1,5)dydt=(3)(4)+(8)(−2)=−4\rate{\frac{dz}{dt}} = \rate{f_x(1, 5)}\rate{\frac{dx}{dt}} + \rate{f_y(1, 5)}\rate{\frac{dy}{dt}} = (3)(4) + (8)(-2) = -4.
3

Let z=excos⁡(y)z = \fn{e^x \cos(y)}, where x=s2tx = s^2t and y=3s−ty = 3s - t. Find ∂z∂s\rate{\frac{\partial z}{\partial s}} and ∂z∂t\rate{\frac{\partial z}{\partial t}}.

Find ∂z∂x\rate{\frac{\partial z}{\partial x}} and ∂z∂y\rate{\frac{\partial z}{\partial y}} once, then pair them first with the ss-derivatives of xx and yy, and next with the tt-derivatives.

The partial derivatives of zz are ∂z∂x=excos⁡y\rate{\frac{\partial z}{\partial x}} = \rate{e^x \cos y} and ∂z∂y=−exsin⁡y\rate{\frac{\partial z}{\partial y}} = \rate{-e^x \sin y}. With respect to ss, ∂x∂s=2st\rate{\frac{\partial x}{\partial s}} = \rate{2st} and ∂y∂s=3\rate{\frac{\partial y}{\partial s}} = \rate{3}, and with respect to tt, ∂x∂t=s2\rate{\frac{\partial x}{\partial t}} = \rate{s^2} and ∂y∂t=−1\rate{\frac{\partial y}{\partial t}} = \rate{-1} (watch out: forgetting the minus sign on ∂y∂t=−1\rate{\frac{\partial y}{\partial t}} = \rate{-1} or on −sin⁡y-\sin y flips the sign of the second term, giving −exsin⁡y-e^x \sin y instead of +exsin⁡y+e^x \sin y in ∂z∂t\rate{\frac{\partial z}{\partial t}}). Combining along the paths gives ∂z∂s=(excos⁡y)(2st)−3exsin⁡y\rate{\frac{\partial z}{\partial s}} = \rate{(e^x \cos y)}\rate{(2st)} - 3e^x \sin y and ∂z∂t=(excos⁡y)(s2)+exsin⁡y\rate{\frac{\partial z}{\partial t}} = \rate{(e^x \cos y)}\rate{(s^2)} + e^x \sin y.
4

Let z=x2y2−4tz = \fn{x^2y^2 - 4t}, where x=2tx = 2t and y=t2y = t^2. Find both ∂z∂t\rate{\frac{\partial z}{\partial t}} and dzdt\rate{\frac{dz}{dt}} when t=1t = 1.

How many paths connect tt to zz, and which of those paths does ∂z∂t\rate{\frac{\partial z}{\partial t}} represent?

Holding x\held{x} and y\held{y} constant leaves only the direct arrow from tt to zz, so ∂z∂t=−4\rate{\frac{\partial z}{\partial t}} = \rate{-4}. For the total derivative dzdt\rate{\frac{dz}{dt}}, include the xx path, the yy path, and the direct tt path (watch out: leaving off the direct −4\rate{-4} term at the end gives 2424). At t=1t = 1, x=2x = 2 and y=1y = 1, so ∂z∂t=−4\rate{\frac{\partial z}{\partial t}} = \rate{-4} and dzdt=(2xy2)(2)+(2x2y)(2t)−4=(4)(2)+(8)(2)−4=20\rate{\frac{dz}{dt}} = \rate{(2xy^2)}\rate{(2)} + \rate{(2x^2y)}\rate{(2t)} - \rate{4} = (4)(2) + (8)(2) - 4 = 20.
5

On a mountain with altitude z=f(x,y)z = \fn{f(x, y)}, the gradient at your position is (∂z∂x,∂z∂y)=(3,−2)\left(\rate{\frac{\partial z}{\partial x}}, \rate{\frac{\partial z}{\partial y}}\right) = \rate{(3, -2)} and your velocity vector is v=(dxdt,dydt)=(4,5)v = \left(\rate{\frac{dx}{dt}}, \rate{\frac{dy}{dt}}\right) = \rate{(4, 5)}. Find dzdt\rate{\frac{dz}{dt}}.

Combine the gradient vector and the velocity vector using a dot product.

Multiply matching components and add (watch out: dropping the minus sign on −2\rate{-2} gives 12+10=2212 + 10 = 22): dzdt=(3,−2)⋅(4,5)=(3)(4)+(−2)(5)=2\rate{\frac{dz}{dt}} = \rate{(3, -2)} \cdot \rate{(4, 5)} = (3)(4) + (-2)(5) = 2.
6

Suppose ww depends on xx, yy, and zz, where xx and yy each depend on both ss and tt, while zz depends only on tt. Write the chain rule formulas for ∂w∂s\rate{\frac{\partial w}{\partial s}} and ∂w∂t\rate{\frac{\partial w}{\partial t}} using straight d\rate{d} and curly ∂\rate{\partial} in the right places.

Draw the arrows from ss and tt to x,y,zx, y, z and into ww, then count how many arrows point into each variable.

Because zz does not depend on ss, there is no zz-path in ∂w∂s\rate{\frac{\partial w}{\partial s}}, and because only one arrow points into zz (from tt), its derivative is written with a straight d\rate{d} as dzdt\rate{\frac{dz}{dt}} (watch out: writing ∂z∂t\frac{\partial z}{\partial t} with a curly ∂\partial or adding a ∂w∂z∂z∂s\frac{\partial w}{\partial z}\frac{\partial z}{\partial s} term are the two common mistakes). This gives ∂w∂s=(∂w∂x)(∂x∂s)+(∂w∂y)(∂y∂s)\rate{\frac{\partial w}{\partial s}} = \left(\rate{\frac{\partial w}{\partial x}}\right)\left(\rate{\frac{\partial x}{\partial s}}\right) + \left(\rate{\frac{\partial w}{\partial y}}\right)\left(\rate{\frac{\partial y}{\partial s}}\right) and ∂w∂t=(∂w∂x)(∂x∂t)+(∂w∂y)(∂y∂t)+(∂w∂z)(dzdt)\rate{\frac{\partial w}{\partial t}} = \left(\rate{\frac{\partial w}{\partial x}}\right)\left(\rate{\frac{\partial x}{\partial t}}\right) + \left(\rate{\frac{\partial w}{\partial y}}\right)\left(\rate{\frac{\partial y}{\partial t}}\right) + \left(\rate{\frac{\partial w}{\partial z}}\right)\left(\rate{\frac{dz}{dt}}\right).