An Applet for Visual Chain Rule

A visual approach to the chain rule goes through a number of steps.

1. The first step is to get a visual understanding of composition of functions in one variable.  To visually see composition  of functions, h(x)=f(g(x)), it is helps to have three dimensions available.  The graph of y=g(x)  is the parametric curve (x, g(x), 0).  Similarly, the graph of z=f(y) is the parametric curve (0, y, f(y)).  Finally the graph of z=f(g(x)) is the curve (x, g(x), f(g(x))).  Looking down the axes in turn we can see the relationship between g(x), f(y) and f(g(x)).
2. The second step is to see that zooming in on differentiable functions makes them look linear.  In particular this means that we can understand the chain rule by looking at lines.  Numerically we can then verify that the slope of the composite is the product of the slopes of the two factors, each evaluated at an appropriate point.
3. The third step is to visualize a way to multiply two slopes.  This is easiest to do in the 3D view.  The slope of a line is the ratio of the height and the base.  Notice that del y is the height of one triange and the base of the second, so that it cancels out when we multiply slopes.  Visually, as we rotate the graph to look up the y-axis, the del y line disappears.

The applet has 3 windows, a control panel, a 2D View, and a 3D View.

In the view windows, the graphs of y=g(x), z=f(y) and z=f(g(x)) are red, blue, and green respectively.
The graph is centered at the Basepoint, (x0, y0=g(x0), z0=f(g(x0))), and shows a region of plus or minus del in each dimension.
The other point of interest is P1=(x0+del, g(x0+del), f(g(x0+del))).
From these two points we can compute del x, del y, and del z, shown in light blue, magenta, and pink, respectively.

Things to notice:
• To keep everything in sight, the graph is shifted.  in the 3D view, the axis cross through the point (x0, g(x0), f(g(x0))).  In particular this means the linear approximation of f(x) is taken at x=g(x0).
• When lining the 3D graph up to eliminate a variable, under view we want up the x axis, down the y axis, and up the z axis respectively.
• The scales are the same in all directions.  From the center of a graph to the edge is del when moving along an axis.
A Chain Rule Applet Worksheet is available.

This applet was designed as by modifying an applet from a demo by Tom Banchoff at Brown University.  It is used with permission.   Go to the Banchoff Applet Help page.