Chain Rule
Text If (x(t),y(t),z(t)) is a differentiable curve in the domain of a differentiable function f, then w(t) = f(x(t),y(t),z(t)) is a differentiable function of t and w'(t) = f_{x}(x(t),y(t),z(t))x'(t) + f_{y}(x(t),y(t),z(t))y'(t) + f_{z}(x(t),y(t),z(t))z'(t).
The tangent line to the graph f(x(t_{0}),y(t_{0}),z(t_{0})) will then be (x(t_{0}),y(t_{0}),z(t_{0}) + u(x'(t_{0}),y'(t_{0}),z'(t_{0})). The gradient vector of f at (x_{0},y_{0},z_{0}) is defined to be ∇x(t_{0}),y(t_{0}),z(t_{0}) = (f_{x}(x_{0},y_{0},z_{0}),f_{y}(x_{0},y_{0},z_{0}),f_{z}(x_{0},y_{0},z_{0}).
Note that the gradient vector is a vector in the domain of the function. The chain rule can then be written in vector notation as w'(t) = ∇f(x(t),y(t),z(t))⋅(x'(t),y'(t),z'(t)). It follows that the function f(x(t),y(t),z(t)) has a maximum or minimum when the gradient of f at (x(t),y(t)),z(t)) is perpendicular to the velocity vector (x'(t),y'(t),z'(t)) at that point. In particular, if w(t) = c, a constant, then w'(t) = 0 for all t and the velocity vector is perpendicular to the gradient vector at all points.
Demos
Chain Rule
 
This demo illustrates the Chain Rule for three variables: We have a smooth green curve C given by (x(t),y(t),z(t)) in the threedimensional domain, and you can use the the tapedeck variable t_0 to specify a point P = (x(t_{0}),y(t_{0}),z(t_{0})) on the curve. The 3D GraphWindow then shows the tangent vector at P (brown) and the x,y and zcomponents of the tangent vector. The xcomponent (x'(t),0,0) is shown in red, the ycomponent (0,y'(t),0) is shown in blue and the zcomponent (0,0,z'(t)) is shown in yellow.
The 3D GraphWindow then shows a small part of the curve f(C) = (x(t_{0}),y(t_{0}),z(t_{0})). (Strictly speaking, the curve would have to lie in fourspace.) The point f(P) is shown in grey. The tangent vector at the point f(P) is then shown in brown, with the contributions of the x,y and zcomponents again shown in red, blue and yellow. The three Projection into..Windows recall how the Chain Rule works in the xy,xz and yzslices, respectively:
For example, take a look at the window titled Projection into the xzslice. Ignore the zcomponent for a moment, and recall how we demonstrated the Chain Rule in two dimensions. Then you can see that the contributions from x and y to the velocity vector at f(P) are given by f_{x}(P)x'(t_{0}) and f_{y}(P)y'(t_{0}), respectively. Likewise, the window titled Projection into the xzslice, shows that the contributions from x and z to the velocity vector at f(P) are given by f_{x}(P)x'(t_{0}) and f_{z}(P)z'(t_{0}).
Now a simple argument will show that to get the actual velocity vector at f(P), you just have to add the three distinct contribution from the coordinate components of the curve C, and this shows that the velocity vector at f(P) is given by (x'(t_{0}),y'(t_{0}),z'(t_{0}),f_{x}(P)x'(t_{0}) + f_{y}(P)y'(t_{0}) + f_{z}(P)z'(t_{0})).

Exercises 1. Give a formula for the chain rule for the special case that y(t) and z(t) are constant functions. Do the same for the case that x(t) and z(t) are constant functions and then for the case that x(t) and y(t) are constant functions.
2. Use the chain rule to find the maxima and minima for the function f(x, y, z) = x + y + z along the curve (cos(t), sin(t), cos(2t)).
