5.6 The Chain Rule and Implicit Di Erentiation: Objectives
5.6 The Chain Rule and Implicit Di Erentiation: Objectives
Jamshidi
⇤ I can how to use the chain rule to find the derivative of a function with respect to
a parameter (like time).
⇤ I know to write the result of the derivative in terms of the parameter(s) only.
⇤ I can use implicit di↵erentiation to determine the derivative of a variable with respect
to another.
Up to this point, we have focused on derivatives based on space variables x and y. In practice,
however, these spacial variables, or independent variables, are dependent on time. Therefore, it
is useful to know how to calculate the function’s derivative with respect to time. This requires the
chain rule.
Let us remind ourselves of how the chain rule works with two dimensional functionals. If we are
given the function y = f (x), where x is a function of time: x = g(t). Then the derivative of y with
respect to t is the derivative of y with respect to x multiplied by the derivative of x with respect to
t
dy dy dx
=
dt dx dt
The technique for higher dimensions works similarly. The only difficulty is that we need to
consider all the variables dependent on the relevant parameter (time t).
1. Chain Rule - Case 1: Suppose z = f (x, y) and x = g(t), y = h(t). Based on the one
variable case, we can see that dz/dt is calculated as
dz dx dy
= fx + fy
dt dt dt
In this context, it is more common to see the following notation.
@f
fx =
@x
The symbol @ is referred to as a “partial,” short for partial derivative.
2. Chain Rule - Case 2: Parametric equations may have more than one variable, like t and s.
This could be time and arc length, for example. In this case, z = f (x, y) and x = g(s, t), y =
h(s, t). Then, every derivative is a partial derivative. Our formula for this situation is
129 of 146
Multivariate Calculus; Fall 2013 S. Jamshidi
z t = f x xt + f y yt
What we do is take the derivative with respect to each variable, then take the derivative with
respect to the hidden parametric variable. Written in our new notion, we have the equation
@z @f @x @f @y
= +
@t @x @t @y @t
Similarly if, we wanted to look at the derivative with respect to s, we’d have
@z @f @x @f @y
= +
@s @x @s @y @s
To better understand these techniques, let’s look at some examples.
14.5.1 Examples
130 of 146
Multivariate Calculus; Fall 2013 S. Jamshidi
to get
✓ ◆ ✓ ◆
dz 3 20t4 + 1 1 20t4 + 1
= 80t sin + 2 sin
dt t t t
Example 5.6.0.4 2. Use the chain rule to find @z/@s for z = x2 y 2 where x = s cos t and y = s sin t
As we saw in the previous example, these problems can get tricky because we need to keep all
the information organized. Let’s walk through the solution of this exercise slowly so we don’t make
any mistakes. Our final answer will be in terms of s and t only.
First, we need to find the partials of z.
@z
• = 2xy 2
@x
@z
• = 2x2 y
@y
Next, we find the partials of the variables
@x
• = cos t
@s
@y
• = sin t
@s
Now, we plug in what we found into our equations.
@z @f @x @f @y
= +
@s @x @s @y @s
@z ⇥ ⇤ ⇥ ⇤
= 2xy 2 [cos t] + 2x2 y [sin t]
@s
We also want to substitute and simplify so our answer is sensible. That gives us
@z ⇥ ⇤ ⇥ ⇤
= 2(s cos t)(s sin t)2 [cos t] + 2(s cos t)2 (s sin t) [sin t] = 2s3 cos2 t sin2 t + 2s3 cos2 t sin2 t
@s
We can use the trigonometric formula that 2 cos t sin t = sin 2t to get
@z
= s3 sin2 2t
@s
131 of 146
Multivariate Calculus; Fall 2013 S. Jamshidi
Example 5.6.0.5 3. Use the chain rule to find @z/@t for z = x2 y 2 where x = s cos t and y = s sin t
(the same equation for example 2).
@z @z @z
The math works similarly for . We can use our work above for and . What’s left are
@t @x @y
the partial derivatives of the “inner” equations, i.e.
@x
• = s sin t
@t
@y
• = s cos t
@t
Now we just plug in as before
@z @f @x @f @y
= +
@t @x @t @y @t
@z ⇥ ⇤ ⇥ ⇤
= 2xy 2 [ s sin t] + 2x2 y [s cos t]
@t
If we substitute x and y for their parametric formulas, we get
@z ⇥ ⇤ ⇥ ⇤
= 2(s cos t)(s sin t)2 [ s sin t] + 2(s cos t)2 (s sin t) [s cos t] = 2s3 cos t sin3 t + 2s3 cos3 t sin t
@t
Again, using 2 cos t sin t = sin 2t to simplify as well as cos2 t sin2 t = cos 2t, we get the following
result
@z
= 2s3 cos t sin3 t + 2s3 cos3 t sin t
@t
= s3 (2 sin t cos t) sin2 t + s3 (2 sin t cos t) cos2 t
= s3 sin 2t(cos2 t sin2 t)
= s3 sin 2t cos 2t
Not all functions can be nicely written in “z =” form. In these situations, however, you may
want to determine the partial derivative of z with respect to the variables x or y. To achieve this,
we will use a technique is called implicit di↵erentiation.
Let’s first consider what happens in the two-dimensional case. Suppose we have the equation
F (x, y) = 0.
132 of 146
Multivariate Calculus; Fall 2013 S. Jamshidi
Remember that we can always set a function of two variables to zero by simply moving everything
to one side. If we wanted to find the total derivative of the function, we would find
@F dx @F dy
+ =0
@x dx @y dx
Recall that dx/dx = 1. To find dy/dx, we solve and get the following formula:
@F
@F @F dy dy @x Fx
+ = 0 =) = @F
=
@x @y dx dx @y
Fy
In three dimensions, it works similarly. We assume that the derivatives of the input variables
with respect to each other is zero (like dx/dy = 0). We may use the same process above to get
similar results. That is, we get the formulas
@z Fx @z Fy
= , =
@x Fz @y Fz
Let’s look at some examples.
14.5.2 Examples
dy
Example 5.6.0.6 1. Find for
dx
y cos x = x2 + y 2
0 = x2 + y 2 y cos x
Fx = 2x + y sin x
Fy = 2y cos x
Then,
dy 2x + y sin x
=
dx 2y cos x
133 of 146
Multivariate Calculus; Fall 2013 S. Jamshidi
@z
Example 5.6.0.7 2. Find @y
for
4 = x2 y2 + z2 2z
We begin by putting the equation in the correct form, find the relevant partials, and then plug
in.
0 = x2 y2 + z2 2z 4, Fy = 2y, Fz = 2z 2
@z 2y y
= =
@x 2z 2 z 1
@z
Example 5.6.0.8 3. Find @x
for
x2 y2 + z2 2z = 4
• Sometimes x and y are functions of one or more parameters. We may find the
derivative of a function with respect to that parameter using the chain rule.
134 of 146