Example 1
Let
g : R
R2 and
f : R2
R be defined by
| g(t) = (t3, t4) | |
| f (x, y) = x2y. |
| h(t) = (fog)(t) = f (g(t)) |
Solution A: We'll use the formula using matrices of partial derivatives:
| Dh(t) = Df (g(t))Dg(t). |
We calculate the matrices of partial derivatives of f and g.
| Df (x, y) = |
|
| = |
|
Dg(t) = ![]() |
| Df (g(t)) = Df (t3, t4) = |
| h'(t) = |
= Df (g(t))Dg(t) | |
| = |
||
| = (2t7)(3t2) + (t6)(4t3) = 6t9 +4t9 | ||
| = 10t9 |
Solution B: We'll start immediately with the formula in component form:
| = 2xy | ||
| = x2 | ||
| = |
||
| = |
||
| = 3t2 | ||
| = 4t3. |
Example 1'
Verify the chain rule for example 1 by calculating an expression for
h(t) and then differentiating it to obtain
(t).
Solution: h(t) = f (g(t)) = f (t3, t4) = (t3)2(t4) = t10.
| h'(t) = |
For this simple example, doing it without the chain rule was a lot easier. However, that is not always the case. And, in the next example, the only way to obtain the answer is to use the chain rule.
Example 2
We continue the mountain climbing example of Example 1. But now, let's say we don't know the terrain ahead of time. This means we do not yet know the height f (x, y) at the position (x, y). We do, however, know our path through mountain; as before, it is given by g(t) = (t3, t4).
Calculate the chain in height that you'll experience along the path, i.e., calculate the derivative of h(t) = f (g(t)). In this case, since we don't know f, the answer will be given in terms of the function f (x, y).
Solution: We'll just copy solution A, above. This time, though, we must leave the matrix of partial derivatives of f as
Df (x, y) = ![]() |
Df (g(t)) = Df (t3, t4) = ![]() |
| h'(t) = Dh(t) | = Df (g(t))Dg(t) | |
= ![]() |
||
| = 3t2 |
Example 3
We continue using the same function
f (x, y) = x2y to describe the
height of the mountain at position (x, y). We embellish the above
examples by letting
g : R2
R2 be defined by
g(s, t) = (t - s2, ts2). (We could think of having many paths through the
mountain that depend on a skill level s. Then,
(x, y) = g(s, t)
could be the position of a person at time t with skill level s.)
Compute
(fog)(s, t) and
(fog)(s, t), i.e., the partial derivatives with respect to s and t of
the height of a person in the mountains whose position is given by
g(s, t).
Solution: Let
h(s, t) = (fog)(s, t) = f (g(s, t)). We need to calculate
(s, t) and
(s, t). The chain
rule says that
| Dh(s, t) = D(fog)(s, t) = Df (g(s, t))Dg(s, t). |
| Dh(s, t) = |
To make it easier in case you have to do such a problem again, we'll perform the matrix multiplication before writing in the specific values for f (x, y) and g(s, t). Then, we'll end up with the chain rule written in component form, which may be easier to use.
The function f (x, y) hasn't changed, so its matrix of partial derivatives is
Df (x, y) = ![]() |
Df (g(s, t)) = ![]() |
Dg(s, t) = ![]() |
![]() ![]() ![]() |
| = |
||
| = |
Now, we compute the answer to our specific problem by substituting in for f (x, y) = x2y and g(s, t) = (t - s2, ts2).
| = 2xy | = 2ts2(t - s2) | |||
| = x2 | = (t - s2)2 | |||
| = - 2s | = 2st | |||
| = 1 | = s2 |
| = |
||
| = 2ts2(t - s2)(- 2s) + (t - s2)2(2st) | ||
| = - 4ts3(t - s2) + 2st(t - 2ts2 + s4) | ||
| = - 4s3t2 +4s5t + 2st2 -4s3t2 +2s5t | ||
| = - 8s3t2 +6s5t + 2st2 |
| = |
||
| = 2ts2(t - s2)(1) + (t - s2)2(s2) | ||
| = 2s2t2 -2s4t + s2t2 -2s4t + s6 | ||
| = 3s2t2 -4s4t + s6 |