First version of the chain rule. Let be a function in and . Suppose we move along a path described by the parametrized curve . What rate of change (relative to ) do we experience? By (*),
Hence, in the limit,
This is the simplest form of the chain rule. Similarly if there are three variables . It is valid if all the derivatives exist and are continuous.
Note. Another way to say this is: if then . But we should be a little bit careful here: is a function which depends on , not on . More specifically, then: . For careful proofs, this distinction is essential. However, the practice of using the same symbol for both (that is, writing rather than ) is standard in applied mathematics, where it will represent some physical quantity (e.g. temperature, perhaps denoted by ).
Application of the chain rule: directional derivatives. Let be a function of . Let be a unit vector. The line through the point in the direction is described by . The directional derivative of at in the direction is the rate of change as one moves along this line, that is:
By the chain rule, this is
Note that this is largest (with value ) when is in the direction of . So gives the direction of greatest increase of , and the rate of this increase is . The direction of greatest decrease of is in the opposite direction (with rate ).
Second version of the chain rule. We now describe a more general version of the chain rule. Suppose that and are expressed in terms of two other variables (for example, could be an alternative coordinate system). Substitution expresses in terms of and (again, one should really use a new symbol like ), and the problem is to find the partial derivatives and (meaning, of course, the derivative with respect to or when the other is kept constant; the notation is somewhat deficient, because it fails to specify what is being kept constant!).
A small change to , with kept constant, causes changes
By (*), the resulting change in is approximately
So (as before):
Proposition 3.10 If all the partial derivatives are continuous, then
and similarly for v.
The two statements can be put together nicely in matrix form:
The matrix on the right is called the Jacobian matrix for and in terms of and .
Suppose we now invert the process and express and in terms of and . The previous identity, applied first with , then with , gives
In other words, the Jacobian matrices are inverses of each other.
Example 3.11. Let . Then and . The Jacobian matrices are
which are indeed inverse to each other. Note that is not equal to !
Higher derivatives. By applying the chain rule twice, one can obtain expressions for second-order partial derivatives with respect to new variables. We only consider the special case of the following type: let
where are constants. Then, by the chain rule,
Write . Then, by the chain rule again,
(using ). Of course, is given by a similar expression with and replacing and .
Some partial differential equations.
Recall that if is a function of and and throughout the plane, then for some function of one variable. This is the simplest example of a partial differential equation.
Some more interesting examples follow.
Example. Suppose that and (throughout the plane). Then for certain functions .
Reason: Since , we have for some function . Let be an indefinite integral of , so that . Then
for all , so for some function .
Remark. Where ordinary differential equations allow the choice of arbitrary constants, partial differential equations give a choice of arbitrary functions.
Example. , where is a function of and .
We show that solutions of this equation are of the form for some (differentiable) function of one variable. Note first that any such certainly satisfies the equation, by a simple application of the ordinary chain rule. Introduce new variables by: . Then and , so, by the chain rule
Hence is a function of only: for some function .
Example (the wave equation). This is the equation
in which (the displacement) is a function of (distance along the string) and (time). We show that solutions are of the form , where and are functions. (Again, any such certainly satisfies the equation.)
Introduce new variables by: . By the chain rule for second derivatives, we then have
From these two equations and the original equation, we obtain , so (by an earlier example) for some functions .