# How should I introduce the Chain Rule

I'm halfway through my first year of teaching AP Calculus to high school seniors. It's been going generally well, but I'm feeling like I really could have done better getting them into the Chain Rule.

I started with it the same basic way that I did with the Product and Quotient Rules -- showing that the rule worked for elementary polynomials and could save us some calculation time. But, in retrospect, the Chain Rule is such a fundamental part of much of the rest of differentiation that I feel like there could have been more that would help them understand how it works and how the concept ties together.

Is the u-substitution notion a good idea? Our class is generally much more comfortable with the $$f'(x)$$ notation, and as a result I stayed away from the $$\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}$$ format. Instead, I did a lot of hand-waving around the "inside function" and the "outside function" that hasn't taken hold in all my students as well as I might have hoped.

• Stretch a rubber band by a factor of 3, then by a factor of 2. What's the total stretch? – Peter Saveliev Dec 24 '19 at 0:50
• I suspect students have trouble because they do not really understand function composition in all the contexts we expect they can operate. It's probably useful to give some practice with plain old identification of inside vs. outside function as a prelude to the talk. You know your students better than we do though... – James S. Cook Dec 24 '19 at 1:01
• In my answer to Revisiting topics from previous courses I discussed how I approached the chain rule. – Dave L Renfro Dec 24 '19 at 13:47
• I would introduce it with linear functions first to see how composition relates to multiplication. – copper.hat Dec 25 '19 at 4:24
• Agree that the function composition concept has to be solid separately from the derivative concept. Keep the sample functions simple and use matching variable names. Like y=f(x)=x^2 and z=g(y)=1/y. Easy to see that g(f(x))=g(y=x^2)=1/y=1/(x^2). Once that's solid, then you can show how the Chain Rule gives the right result. – Jeff Y Dec 26 '19 at 20:09

I just start with constant rates of change, where it's pretty blazingly obvious that the chain rule works. E.g., Jane hikes 3 kilometers in an hour, and hiking burns 70 calories per kilometer. At what rate does she burn calories?

Our class is generally much more comfortable with the $$f'(x)$$ notation, and as a result I stayed away from the $$\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}$$ format.

This is your opportunity to help them overcome that irrational prejudice by showing them an application where the Leibniz notation is clearly superior. It's not as though learning the Leibniz notation is optional for, e.g., engineering majors.

I also like to do the example of $$x=A\cos bt$$, where $$x$$ and $$A$$ both have units of meters, $$t$$ is in seconds, and $$b$$ has units of inverse seconds. I explicitly act this out with a heavy object and elicit the interpretations of $$A$$ and $$b$$. Then I take the derivative and intentionaly omit the factor of $$b$$ coming from the "derivative of the inside stuff." I then point out that the result is obviously wrong, both because it has the wrong units and because it doesn't depend on the frequency, which it should.

• "It's not as though learning the Leibniz notation is optional for, e.g., engineering majors." From my personal experience, not learning the different notations for a thing is surprisingly crippling as I move forward to the next level of a subject. @MatthewDaly sticking to a particular notation may provide short-term benefits, but does your students a huge disservice toward their future studies. – Him Dec 24 '19 at 15:08
• @Scott Your experience resonates with me! My education professor really emphasized to us how it important it was to introduce any relevant, meaningful terminology or notation from the get-go. As I recall, the math pedagogy research she was quoting said that it takes seven examples for students to correctly relearn an omitted or misdirected word for a concept. Students learn by creating their own organizational structures in their minds, so if you try to redirect concepts within those structures in your teaching, students will struggle. – Eliza Wilson Dec 25 '19 at 7:00
• +1 for learnLeibniz. It will be crucial when you get to integration and the fundamental theorem of calculus. See math.stackexchange.com/questions/1991575/… – Ethan Bolker Dec 25 '19 at 21:44

What is difficult about the chain rule is the function concept, more specifically the composition of functions. Notation that hides or leaves implicit the composition of functions causes a great deal of confusion for students. However, the fundamental issues are not the notation used (all choices are messy to some extent), but what the use of the notation leaves implicit or to be inferred, and the extent to which these expectations are unrealizable by beginning students.

One thing potentially confusing (and I think not just for students) about the Leibniz notation is that in $$\tfrac{dy}{dx} = \tfrac{dy}{du}\tfrac{du}{dx}$$ it is not clear that $$\tfrac{dy}{du}$$ and $$\tfrac{du}{dx}$$ are both viewed as functions of $$x$$, and that, in the case of $$\tfrac{dy}{du}$$, this moreover means that this notation really indicates the composition $$\tfrac{dy}{du}(u(x))$$. That is, the Leibniz notation, at least as commonly used, hides the composition of functions. The notation $$\tfrac{dy}{du}$$ appears to indicate a function of $$u$$, and it is implicit from context that this function of $$u$$ is viewed as a function of $$x$$. Too much is left implicit, to be inferred from context.

One part of a solution is to make explicit all functional compositions. With the Leibniz notation this can become quite messy, particularly if higher derivatives are involved. For example, $$\tfrac{d}{dx}(y \circ u) = (\tfrac{dy}{du}\circ u )\tfrac{du}{dx}$$ indicates more clearly the functional compositions that occur, although it still does not indicate the dependence on $$x$$. Explicitly adding this notation becomes somewhat ugly - $$\tfrac{d}{dx}(y \circ u)(x) = (\tfrac{dy}{du}\circ u )(x)\tfrac{du}{dx}(x)$$ - but perhaps this is nonetheless preferable to begin. (Once students understand what they are doing, the explicit indication of the functional compositions becomes a bother, and it becomes clarifying to omit it, but at first I think the situation is reversed.) (I am not saying I like any of these notations - on the contrary I generally avoid the Leibniz notation - Also, a cleaner, functorial notation would be something like $$D(u^{\ast}y) = u^{\ast}(Dy)D(u)$$, where the pullback is defined by $$u^{\ast}y = y \circ u$$, but such a presentation of the chain rule as a cocyle identity is simply not viable for most students as usually educated.)

One could write alternatively $$(y \circ u)^{\prime}(x) = (y^{\prime}\circ u)(x)u^{\prime}(x)$$, and this is in many senses easier to read. What can be confusing for the student is that operationally the prime requires taking the derivative with respect to different variables ($$x$$ in one instance, $$u$$ in the other). Formally this is not a problem as variable names are really just placeholders that indicate the sequencing of compositions (the derivative is the derivative, whatever one chooses to call the argument), but it can be the essence of the difficulties that students have.

On the other hand, it is also one thing that can be problematic with the Leibniz notation - the Leibniz notation attaches too much significance to variable names. The derivative of $$u$$ is not the derivative with respect to $$x$$, it is the derivative of $$u$$ with respect to its argument, whatever name one gives to that argument. Fixation on variable names and their magical qualities is a quite natural, one might say primitive, human tendency, but it is also part of what needs to be overcome to understand properly the chain rule. Precisely one of the confusing aspects of $$\tfrac{dy}{dx} = \tfrac{dy}{du}\tfrac{du}{dx}$$ is that, since its right-hand side must be a function of $$x$$ for the equality to have sense, the expression $$\tfrac{dy}{du}$$, which the notation apparently indicates is a function of $$u$$, has to be considered as a function of $$u(x)$$, that is with $$u$$ viewed as a function of $$x$$, and this aspect is hidden notationally, so has to be inferred. For those with experience, the notational higiene compensates for leaving something implicit, but for students it can be a source of serious confusion.

I think the best tack is to make all of this as explicit as possible (obviously, in a language more accessible to students than that which I am using here), in particular indicating clearly what the difficulties are, where they occur, what is left implicit and what is not, whatever notation one choose to use. Operational rules of thumb that refer to inside and outside function will not help if they are not accompanied by precise explanation that makes clear what they intend to summarize and elide, although of course they can help when students are first sufficiently prepared to properly interpret them (however, in my experience this sort of informal summary works only with the most engaged students).

Diagrams can help. I am not sure how to make decent diagrams in mathjax, so I won't try here, but what I have in mind is a directed graph with three vertices and three arrows. The vertices represent the domains/codomains and the arrows represent the functions. The diagram can be labeled with the variable and function names. What it helps makes clear is that $$y^{\prime}$$ and $$y$$ have the same domain (it is the codomain of $$u$$, while $$(y \circ u)^{\prime}$$, must have the same domain as $$y \circ u$$. Accompanying computations by such diagrams, and repeating this a fair number of times can help.

A fundamental example, useful for other reasons, that should be clarifying in the context of the chain rule, is to take the derivative of the sine function viewed as a function of degrees. A student who can do this correctly, and write correctly to what it corresponds in whatever abstract functional notation (Leibniz or otherwise) has understood the chain rule.

Finally, a reflection. Many of the difficulties students have in calculus reduce to a failure to understand the abstract function concept. This concept is difficult and it is quite modern (In some sense it postdates calculus by one or two centuries). Its difficulty becomes apparent in any context requiring change of variables (chain rule, change of domain in integrals). Much of the problem is that it is often treated as something simple, requiring little explanation, or given explanation that is not precise. Better to treat the difficult topics directly and plainly than to look for ways to avoid them.

• This $\frac{d}{dx}(y\circ u)=\left(\frac{dy}{du}\circ u\right)\frac{du}{dx}$ is very awkward. You are mixing up the modern concept of a function with the original notion of something being a function of something else. It will only cause more confusion to students. – Michael Bächtold Dec 24 '19 at 16:05
• I don't think "the Leibniz notation attaches too much significance to variable names". Sometimes you want to concentrate on the names of the variables, other times on the names of the functions. Both approaches are valid. – Peter Saveliev Dec 24 '19 at 16:44
• @MichaelBächtold: A fully modern notation would be something like $Dg^{\ast}(f) = g^{\ast}(Df) Dg$, but such fully functorial notation has its own problems. In any cae, I am arguing that a lot of these issues are inherent whatever notation is used, and that most of the notations in common use are difficult in one way or another; I am not advocating the one you cite, simply saying that it seems possibly preferable to that which does not even indicate the compositions. – Dan Fox Dec 24 '19 at 17:06
• This answer spreads several misconceptions. When $y$ is a function of $x$ (and not a function in the modern sense), then nothing prohibits it from being a function of something else too. For instance the area $y$ of a circle is a function of the radius $x$, of the diameter $d$, of the circumference $c$ or of the area $y$ itself etc. So when we derive a variable quantity $y$ (not a modern function), we always need to make explicit wrt to which variable. The Leibniz notation does this. – Michael Bächtold Feb 17 '20 at 11:01
• To make an analogy: when $H$ is a subgroup of $G$, it's also a subgroup of many other groups (for instance itself). When we quotient by $H$ we need to say which supergroup we are quotienting, and the notation $G/H$ makes that explicit. I've never heard someone complain that "Too much is left implicit, to be inferred from context" in this analogous situation of groups. – Michael Bächtold Feb 17 '20 at 11:02

The intuition here is basically that of Ben Crowell's answer, and that kind of intuitive explanation might be worth going through first. What I want to show is the kind of activity you can explore with students to investigate how it works in a "less than completely obvious" situation, when at least one of the rates of change itself keeps changing.

One way to approach differentiation is in terms of "sensitivity" - the derivative $$f'(x_0)$$ measures the sensitivity of the function $$f(x)$$ to small changes in in its input, about $$x = x_0$$. In particular, $$f(x_0 + \Delta x) \approx f(x_0) + f'(x_0) \Delta x$$. In addition to thinking about this graphically, one can investigate numerically with a suitable function (depending on the students' level of prior knowledge, perhaps one they already know the result of differentiating even if they can't prove it from first principles) e.g. the difference between $$f(4)$$ and $$f(4.001)$$.

Chain rule is just about extending this idea to the sensitivity of composite functions, i.e. how sensitive is $$f(g(x))$$ to changes in $$x$$? This is clearly going to depend on how sensitive $$g(x)$$ is to a small change in its input, but then also on how sensitive $$f$$ is to a change in its input... moreover the change in the input to $$f$$ is not just $$\Delta x$$ but $$\Delta u = \Delta g(x) \approx g'(x) \Delta x$$ where $$u = g(x)$$ is the input to $$f$$. So overall we reach $$fg(x_0 + \Delta x) = f(u_0 + \Delta u) \approx f(u_0) + f'(u_0) \Delta u \approx fg(x_0) + f'(g(x_0)) g'(x) \Delta x$$

Again this can be investigated numerically by students given an appropriate pair of functions and a set of values to play with (I have seen this work quite well by getting all students to use the same functions but "sharing out" which values to input), for example with $$f(u) = u^2$$ and $$g(x) = 3x + 1$$ we have $$fg(x) = (3x + 1)^2$$, $$f'(x) = 3$$ and $$g'(u) = 2u$$. A student might work with $$x_0 = 5$$ and $$\Delta x = 0.001$$; they tabulate that $$u_0 = g(x_0) = 16$$ and that $$u_0 + \Delta u = g(x_0 + \Delta x) = 16.003$$ so that $$\Delta u$$ = 0.003; this can be seen to match $$g'(x_0) = 3$$ multiplied by $$\Delta x = 0.001$$ (for more complicated functions this would only be an approximation, of course). In further columns of the table, the student might tabulate $$f(u_0) = fg(x_0) = 256$$; $$f(u_0 + \Delta u) = fg(x_0 + \Delta x) = 256.096009$$; $$\Delta f(u) = 0.096009$$; $$f'(u_0) = 2 u_0 = 32$$ and finally $$f'(u_0) \Delta u = 32 \times 0.003 = 0.096$$ which is reassuringly close to the value obtained for $$\Delta f(u)$$.

This is kind of a "how I did it," but I think that it's something worth writing up somewhere, and it's too long for a comment. Here's my approach.

When I last taught calculus, I began with a graphed function f(x) which had no simple formula (piecewise linear is sufficient), and we sketched its derivative where it was defined. Then I asked them about what the derivative of f(x-1) should be. After some reminder of what f(x-1) means and how it leads to a translation of the function, most students agree that it should be f'(x-1). "Does this always happen for graph transformations?"

Then we took it a little further using f(2x) and I asked students what they thought should happen to the derivative of a function as you performed the horizontal compression that f(2x) causes. They immediately see that the derivative should be compressed too. But we graph f(2x) and notice that there's something wrong about its slopes compared to f(x). The rise/run values at corresponding points are different: the "rise" stayed the same, but the corresponding "run" got cut in half, making the derivative double in value. So we came up with the formula d/dx f(2x) = f'(2x)*2 . The f'(2x) was needed to make the derivative "match up in x" with the stretches performed on the original function, and the *2 was needed to account for the change in steepness that happens because of the stretch.

This motivated the chain rule enough that we then could ask "What is the formula for the derivative of f(g(x)) in general?" This I did not prove, but it was enough to comment that you'd have to use f'(g(x)) to get the derivative to match with horizontal transformations, and g'(x) to deal with the steepness changing, giving the final formula d/dx f(g(x))= f'(g(x))g'(x). The analogous notation dy/du du/dx is introduced simultaneously and compared/contrasted.

Then we went to computing the derivatives of functions like sin(x^3) where the students practiced identifying the outer and inner functions as well as computing the derivatives, comparing/contrasting the two uses of different notation and noticing that the results were the same either way we did it.

It's worth noting that I particularly emphasized the notion of function composition at the start of the course and had assigned multiple homework problems leading up to that point where students were expected to perform compositions and describe transformations, under the guise of "let's make sure you know prerequisite content," and the priming activity at the start of the class was to graph a function transformation. I think this fit in one to two hour-long college class periods.

The chain rule is one of the areas where teaching using differentials (instead of derivatives) shines. If you are not aware, instead of teaching the "derivative" as the fundamental operation of calculus, you teach the differential. When you differentiate with the differential, there is no preferred variable with respect to differentiation. So, your rule, instead of being $$y = x^n$$ and $$\frac{dy}{dx} = nx^{n-1}$$, the rule is instead $$dy = nx^{n - 1}\, dx$$.

This has several advantages. First, it is much more symmetric. You are always doing the same thing to both sides, and always doing the same thing in all situations. You can still solve for the derivative (by just dividing by $$dx$$ in many cases), but the operation is the differential. The rules then become such like $$d(nu) = n\,du$$. Note that there are no extraneous variables here (like $$y$$), so there is less going on. This means that it is easier to apply this rule in a multivariable situation. Example: $$y = x + z^2$$. The differential is $$dy = dx + 2z\,dz$$. I can then solve for any derivative I want. This makes related rates, implicit differentiation, and the like super-easy because you aren't adding any new rules, you are just applying algebra.

And that's also the case with the chain rule. The rule for $$\sin$$, for instance, is $$d(\sin(u)) = \cos(u)\,du$$. Now, any rule you apply has to match the formula exactly (but can use any variable we want). So, if we have $$d(\sin(x^2))$$, this doesn't match our rule exactly. But, we can make it match our rule exactly with a variable substitution. We can say, $$q = x^2$$. Now our problem is $$d(\sin(q))$$ which becomes $$\cos(q)\, dq$$. We can easily back-substitute $$q$$ to get $$\cos(x^2)\,dq$$, but we still have the pesky $$dq$$ to take care of. However, we also have a new equation describing $$q$$ which we can differentiate in order to get a value for $$dq$$. If we differentiate $$q = x^2$$, the result is $$dq = 2x\,dx$$. Therefore, we will replace $$dq$$ in our result, giving $$\cos(x^2)\,2x\,dx$$.

Doing it this way, the chain rule barely qualifies as a rule. It's just a natural mathematical tool to make a substitution to transform an equation to be manageable under the rules that we already understand. There's no "special" rule called "the chain rule", it is just the natural extension of applying algebra to differentials.

Side note - differentials have fewer problematic cases. For instance, if you take the derivative with respect to $$x$$ for $$x = 1$$, you will get $$1 = 0$$. However, if you take the differential, you will get $$dx = 0$$, which is actually true. It will also be more obvious when you try to transform it into a derivative why it is problematic ($$\frac{dx}{dx}$$ becomes $$\frac{0}{0}$$).

If you teach the chain rule with Leibniz notation I recommend this suggestion of Steven Gubkin. It makes computations more explicit and straightforward, and students pick it up fairly well in my experience.

For the remainder I'll address some of the subtleties involved with derivative notation, the function concept and how that relates to the chain rule.

Let's start with notation. Many books suggest that when $$y=f(x)=x^2$$, all of the following mean the same: $$f', \quad \frac{df}{dx},\quad \frac{dy}{dx}, \quad \frac{df(x)}{dx}, \quad \frac{d(x^2)}{dx}, \quad y', \quad (f(x))' , \quad (x^2)',\quad f'(x), \quad \frac{df}{dx}(x).$$

Since we all agree that $$y\neq f$$, the first two of these, $$f'$$ and $$\frac{df}{dx}$$, cannot possibly mean the same as the rest. I'll discuss in a moment why the second, $$\frac{df}{dx}$$, is nonsense notation, but let's first look at the rest of the list. By virtue of $$y=f(x)=x^2$$ and the principle that we can substitute equals for equals, we see that no 3. 4. and 5. must indeed all denote the same $$\frac{dy}{dx}=\frac{df(x)}{dx}= \frac{d(x^2)}{dx}.$$ (The middle one should be parsed as $$\frac{d(f(x))}{dx}$$, but the parenthesis are omitted.) By the same reason no. 6. 7. and 8. should all denote the same $$y' = (f(x))'= (x^2)'$$ if that notation where sensitive. I'll argue that it isn't and should be avoided, in particular when using the chain rule. No. 9, $$f'(x)$$, is perfectly fine, while the last one, $$\frac{df}{dx}(x)$$, should be discarded for the same reason as the second one, $$\frac{df}{dx}$$.

So what's wrong with $$\frac{df}{dx}$$? If $$f$$ is truly a function in the modern sense, namely the function $$f:\mathbb{R}\to\mathbb{R}$$ that squares every input, then $$f$$ is agnostic of the name of its input variable. In particular, the function that for every $$x\in\mathbb{R}$$ satisfies $$f(x)=x^2$$ is exactly the same as the one which for every $$y\in \mathbb{R}$$ satisfies $$f(y)=y^2$$. So if we allowed $$\frac{df}{dx}$$ we should also allow $$\frac{df}{dy}$$ and $$\frac{df}{dt}$$ etc. Anything could be placed in the denominator and it should all denote the same. The notation is redundant and misleading. Corollary: do not write $$\frac{df}{dx}$$ for the derivative of a modern function. Simply write $$f'$$.

Does that mean we should never apply Leibniz notation to functions? No. For instance when $$f$$ depends on a parameter, say $$f(x)=ax^2$$, then $$\frac{df}{da}$$ is meaningful. Which raises the question of when exactly to use Leibniz notation. This is more subtle, as can be seen from these two discussions, but the summary is: $$\frac{d}{dx}$$ operates on functions of $$x$$ and not on functions. Examples of functions of $$x$$ are $$y$$, $$f(x)$$ and $$x^2$$, while $$f$$ is not a function of $$x$$.

Finally what's the problem with writing $$y'$$, $$(f(x))'$$ and $$(x^2)'$$? Observe that here we are applying $$(\;)'$$ to functions of something and not to functions. But this notation is incomplete, in that it doesn't make explicit with respect to which variabel to differentiate. This is best illustrated with the chain rule: Suppose for instance $$y=t^3$$ and $$t= \cos \phi$$, then obviously $$y=(\cos \phi)^3$$. Now what should $$y'$$ mean? Is it $$\frac{dy}{dt}$$ or $$\frac{dy}{d\phi}$$? You might think that it becomes clear once we write $$(t^3)'$$ resp. $$\left((\cos \phi)^3 \right)'$$. But since $$t^3=(\cos \phi)^3$$ we would violate the principle of substituting equals for equals, if those two expressions had a different meaning. Sounds like very bad notation to me. Corollary: Do not write $$y'$$ for the derivative of variable quantity with respect to another variable. Always use Leibniz notation.

One could of course insist on the convention that $$y'$$ always denotes derivative with respect to $$x$$. But this seems like bad practice from a didactical perspective. For one we would be using the same prime notation to denote two different things: derivative of a modern function as in $$f'$$ vs derivative of a function of $$x$$ as in $$y'$$. But we agree that $$y$$ and $$f$$ are objects of different types and (hopefully) want our students to understand that. Moreover in areas where most students will apply calculus (physics, engineering, economy etc), almost no variable is called $$x$$, so the convention would be of little use.

There's a delightfully simple visual intuition.

Imagine you have the curve of $$y=f\left(x\right)$$ drawn for you.

Put your pencil on the $$y$$-intercept. Start moving to the right at 1 unit per second, but keep your pencil on the curve. At time $$t$$, you're at the point $$\left(t, f\left(t\right)\right)$$ and your vertical velocity is $$f^\prime \left(t\right)$$.

Now imagine there's a screen in front of you that displays "$$x=$$", followed by a real number. Internally, it uses a clock and a function $$g$$ to decide which number to display: $$x = g\left(t\right)$$. Currently, $$t=0$$. When you press "start", the clock starts running, and the number starts changing.

Put your pencil on the curve at $$\left(x, f\left(x\right)\right)$$ according to the display. Press "start", watch the number, and keep your pencil on the curve for the $$x$$-value shown.

Your vertical velocity is $$f^\prime\left(x\right) g^\prime\left(t\right)$$. It's the slope of the hill times your horizontal velocity of attacking the hill.

Note that because $$x=g\left(t\right)$$, your vertical velocity is $$f^\prime\left(g\left(t\right)\right)g^\prime\left(t\right)$$.

Also note that because $$f^\prime\left(x\right)$$ is the rate of change of $$y$$ with respect to $$x$$, and $$g^\prime\left(t\right)$$ is the rate of change of $$x$$ with respect to $$t$$, you can write your vertical velocity as: $$\frac{dy}{dx} \frac{dx}{dt}$$.

The rest of the challenge is knowing how to apply this rule. Specifically, knowing how to decompose a function, and recognizing when a function can be decomposed into two functions whose derivatives you already know. I think that just takes practice.

But while you're practicing, it's helpful to stay rooted in the above intuition. And it's helpful to remember that the equivalence between $$f^\prime\left(g\left(t\right)\right)g^\prime\left(t\right)$$ and $$\frac{dy}{dx} \frac{dx}{dt}$$ comes from the fact that they are simply two different ways of writing $$f^\prime\left(x\right) g^\prime\left(t\right)$$ where $$y=f\left(x\right)$$ and $$x=g\left(t\right)$$.