Quantities are often linked in chains. The temperature you feel depends on your position, and your position depends on time. The volume of a balloon depends on its radius and height, which both change as it inflates. The multivariable chain rule tells you how the final quantity changes by adding up the contribution of every link in the chain.
Case 1: one parameter
Suppose z=f(x,y) and both x and y are functions of t. Then z is ultimately a function of t alone. How fast does it change?
Over a short time Δt, the inputs change by Δx and Δy. From the linear approximation in the previous lesson, the output changes by about
Δz≈fxΔx+fyΔy.
Dividing by Δt and letting Δt→0 gives the first version of the chain rule.
Chain rule, one parameter
If z=f(x,y) is differentiable and x=x(t), y=y(t) are differentiable, then
dtdz=∂x∂zdtdx+∂y∂zdtdy.
Each term is "how sensitive z is to one input" times "how fast that input is changing." For three intermediate variables x, y, z feeding into w, there are three such terms.
Worked example: Along a circle
Let z=x2y+y3, where x=cost and y=sint. Find dtdz at t=0.
At t=0: x=1, y=0, dtdx=−sin0=0 and dtdy=cos0=1.
The partials are zx=2xy and zy=x2+3y2, which equal 0 and 1 at (1,0). So
dtdz=(0)(0)+(1)(1)=1.
Worked example: A changing cylinder
The radius of a cylinder is increasing at 0.2 cm/s while its height is decreasing at 0.5 cm/s. How fast is the volume changing when r=3 cm and h=8 cm?
V=πr2h, so
dtdV=Vrdtdr+Vhdtdh=2πrh(0.2)+πr2(−0.5).
At r=3, h=8: dtdV=2π(24)(0.2)−π(9)(0.5)=9.6π−4.5π=5.1π≈16.0 cm³/s. The volume is still increasing, because growth in the radius wins.
Case 2: two parameters
Now suppose x and y each depend on two variables, x=x(s,t) and y=y(s,t). Then z is a function of s and t, and it has two partial derivatives. Hold t fixed and apply Case 1 to get ∂z/∂s; hold s fixed to get ∂z/∂t.
A tree diagram keeps the bookkeeping straight. Put z at the top, draw a branch to each intermediate variable (x and y), and from each of those draw branches to the independent variables (s and t). Label every branch with the corresponding partial derivative. To find ∂z/∂s, follow every path from z down to s, multiply along each path, and add the results. This rule works for any number of variables and any number of levels.
Worked example: Two parameters
Let z=exsiny with x=st2 and y=s2t. Find ∂s∂z.
The pieces are zx=exsiny, zy=excosy, xs=t2 and ys=2st. So
Evaluate every factor at the same point. If you are asked for ∂z/∂s at (s,t)=(2,1), first compute the corresponding x and y, then evaluate zx and zy at that (x,y) and evaluate xs and ys at (s,t)=(2,1). Plugging s and t directly into zx as if they were x and y is the most common error.
Implicit differentiation
The chain rule also explains implicit differentiation. Suppose the equation F(x,y)=0 defines y as a function of x. Differentiate both sides with respect to x, treating x as x and y as y(x):
The same argument works one dimension up. If F(x,y,z)=0 defines z implicitly as a function of x and y, then
∂x∂z=−FzFx,∂y∂z=−FzFy,Fz=0.
Worked example: Implicit derivatives
(a) Find dxdy if x3+y3=6xy.
Move everything to one side: F(x,y)=x3+y3−6xy. Then Fx=3x2−6y and Fy=3y2−6x, so
dxdy=−3y2−6x3x2−6y=y2−2x2y−x2.
(b) Find ∂x∂z if x2+2y2+3z2=12.
With F=x2+2y2+3z2−12, Fx=2x and Fz=6z, so ∂x∂z=−6z2x=−3zx.
Tip
Mind the minus sign in −Fx/Fy. A quick sanity check: on the circle x2+y2=25, the formula gives dxdy=−yx, which is negative in the first quadrant, just as the picture of the circle says it should be.
Practice
Practice 1
Let z=x2+xy with x=t2 and y=3t. Use the chain rule to find dtdz at t=1.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 2
Let w=xy+yz with x=t, y=t2 and z=t3. Find dtdw at t=1.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 3
Let z=x2y with x=s+t and y=s−t. Find ∂s∂z when s=2 and t=1.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 4
With the same z=x2y, x=s+t and y=s−t, find ∂t∂z when s=2 and t=1.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 5
The equation x2y+y3=10 defines y implicitly as a function of x. Find dxdy in terms of x and y.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 6
The point (1,2) lies on the curve x3+xy2=5. Find dxdy there.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 7
The equation xz+yz2+x2y=7 defines z implicitly as a function of x and y. Find ∂x∂z in terms of x, y and z.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 8
The length of a rectangle is increasing at 3 cm/s and its width is decreasing at 2 cm/s. How fast, in cm/s, is the length of the diagonal changing when the length is 8 cm and the width is 6 cm?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.