C.3 Chain Rule - Deeper Work

You can see how the Chain Rule is chaining together the pieces here: the first line applies the Chain Rule to the outer function ๐‘“, saying its derivative equals ๐‘“โ€ฒ evaluated at its inner function (that happens to itself be a composite function ๐‘”(โ„Ž(๐‘ฅ))), multiplied by the derivative of that inner function. The second line then writes out that latter derivative, g' evaluated at its inner function โ„Ž(๐‘ฅ), multiplied by the derivative of h.

If that seems abstract, let's make it concrete by finding the derivative of this function.

EXAMPLE 1: Applying the Chain Rule to ๐‘“(๐‘ฅ) =11+๐‘’โˆ’๐‘ฅ.

Differentiate ๐‘“(๐‘ฅ) =11+๐‘’โˆ’๐‘ฅ.

Solution.

We'll once again solve this two ways, first formally, and then informally the way you would probably quickly reason through, essentially just writing down the answer as you go.

Solution 1 (more formal).

We have the outside function ๐‘“(๐‘ข) =1๐‘ข, the inside function ๐‘ข =๐‘”(๐‘ค) =1 +๐‘’๐‘ค, and the further inside function ๐‘ค =โ„Ž(๐‘ฅ) = โˆ’๐‘ฅ.

Their derivatives are ๐‘“โ€ฒ(๐‘ข) = โˆ’1๐‘ข2, ๐‘”โ€ฒ(๐‘ค) =๐‘’๐‘ค, and โ„Žโ€ฒ(๐‘ฅ) = โˆ’1.

Then applying the Chain Rule gives

[๐‘“(๐‘”(โ„Ž(๐‘ฅ)))]โ€ฒ=๐‘“โ€ฒ(๐‘”(โ„Ž(๐‘ฅ)))โ‹…๐‘”โ€ฒ(โ„Ž(๐‘ฅ))โ‹…โ„Žโ€ฒ(๐‘ฅ)=โˆ’1๐‘ข2โ‹…๐‘’๐‘คโ‹…(โˆ’1)=โˆ’1(1+๐‘’โˆ’๐‘ฅ)2โ‹…๐‘’โˆ’๐‘ฅโ‹…(โˆ’1)โœ“=๐‘’โˆ’๐‘ฅ(1+๐‘’โˆ’๐‘ฅ)2โœ“

While the final line shows the answer in its simplified form, we suggest focusing on the preceding line (also with a green checkmark) since โ€” again with practice โ€” you can see how the Chain Rule has been applied to reach this result, starting with the outer function and then working your way inward. The following 'informal reasoning' solution makes this even more apparent.

Solution 2 (less formal, the way you're likely to come to reason quickly).

The overall function is [some stuff]โˆ’1, where you're holding in your head that this "stuff" = 1 +๐‘’โˆ’๐‘ฅ. So its derivative is

Students often request "harder examples," so let's find the derivative of a function comprised of 6(!) functions. You can step through finding the derivative of each component piece, but really we hope that โ€” with practice, at least โ€” you'll be able to start with the outside function and work your way inward, and write this answer down in one line. Indeed, we're putting the answer right at the top, so you can imagine doing just that, simply immediately writing down the answer, going term-by-term as you work your way further and further inside the nests of the function.

Example 2: Chain Rule applied to ๐‘ฆ(๐‘ฅ) =1sinโก(3โˆš๐‘’โˆ’๐‘ฅโˆ’1)

Show that the derivative of ๐‘ฆ(๐‘ฅ)=1sinโก(3โˆš๐‘’โˆ’๐‘ฅโˆ’1)=[sinโก(3โˆš๐‘’โˆ’๐‘ฅโˆ’1)]โˆ’1 is ๐‘‘๐‘ฆ๐‘‘๐‘ฅ=โˆ’[sinโก(3(๐‘’โˆ’๐‘ฅ)1/2โˆ’1)]โˆ’2โ‹…cosโก(3(๐‘’โˆ’๐‘ฅ)1/2โˆ’1)โ‹…3โ‹…12(๐‘’โˆ’๐‘ฅ)โˆ’1/2โ‹…๐‘’โˆ’๐‘ฅโ‹…(โˆ’1)

Solution.

Let's first show a picture of the chain that is this compound function. You probably wouldn't ever create this for yourself, but it's helpful for us to visualize together as we go step-by-step.

Links in a chain for the function f(x) = 1 over sin of (3 times the square root of e to the negative x). First link inside text: input something. Below that link is the input letter x. An arrow points to the second link, which has text inside: make it negative. Text beneath that link says f1(x) = -x. An arrow then points to the third chain link, with text inside: raise e to that power. Text beneath the link says f2(x) = e^x. An arrow then points to the fourth chain link, with text inside: take the square root. Text beneath the link says f3(x) = square root of x. An arrow then points to the fifth chain link, with text inside: multiply by 3, and subtract 1. Text beneath the link says f4(x) = 3x + 1. An arrow then points to the sixth chain link, with text inside: take the sine. Text beneath the link says f5(x) = sin(x). An arrow then points to the sixth chain link, with text inside: take the reciprocal. Text beneath the link says f6(x) = 1 over x = x to the negative one.

When presented with a more complicated function like y, we find it easier to rewrite reciprocals and roots in terms of negative and rational powers:

๐‘ฆ(๐‘ฅ)=1sinโก(3โˆš๐‘’โˆ’๐‘ฅโˆ’1)=[sinโก(3(๐‘’โˆ’๐‘ฅ)1/2โˆ’1)]โˆ’1

This makes it easier to see where we need to use power rule, and gives us more of a visual cue for when we hit a new interior function.

Let's summarize our answer, showing how each term arose:

๐‘‘๐‘ฆ๐‘‘๐‘ฅ=๐‘‘๐‘“6๐‘‘๐‘“5โžยฏยฏยฏยฏยฏโžยฏยฏยฏยฏยฏโžโˆ’[sinโก(3(๐‘’โˆ’๐‘ฅ)1/2โˆ’1)]โˆ’2โ‹…๐‘‘๐‘“5๐‘‘๐‘“4โžยฏยฏยฏโžยฏยฏยฏโžcosโก(3(๐‘’โˆ’๐‘ฅ)1/2โˆ’1)โ‹…๐‘‘๐‘“4๐‘‘๐‘“3โž3โ‹…๐‘‘๐‘“3๐‘‘๐‘“2โžยฏยฏโžยฏยฏโž12(๐‘’โˆ’๐‘ฅ)โˆ’1/2โ‹…๐‘‘๐‘“2๐‘‘๐‘“1โž๐‘’โˆ’๐‘ฅโ‹…๐‘‘๐‘“1๐‘‘๐‘ฅโž(โˆ’1)

If you wrote your answer like we did at the top of this Example (repeated here, with the added labels like ๐‘‘๐‘“6๐‘‘๐‘“5), you have completely taken the derivative, so celebrate!

Furthermore, your grader is probably scanning for a line like this (without the labels), which clearly shows how you applied the Chain Rule to every inside function. If you got to this point, your Calculus is perfect.

Tip icon

Now here's a warning: most people, including us, are likely to introduce an algebraic error if they work to simplify โ€” especially when rushing on an exam. So check with your teacher about what an acceptable "final form" is for your answer. If you can box the result above and receive full credit, we strongly recommend doing so. (And again, celebrate your growing Calculus skills!)

For completeness, here is the same answer in simplified form:

๐‘‘๐‘ฆ๐‘‘๐‘ฅ=3cosโก(3โˆš๐‘’โˆ’๐‘ฅโˆ’1)2โˆš๐‘’๐‘ฅsin2โก(3โˆš๐‘’โˆ’๐‘ฅโˆ’1)

FAQ: When do I STOP applying the Chain Rule?

A student, Kiran, says:

"Now that I'm thinking about taking derivatives more layers down in the function, earlier why didn't we do ๐‘‘๐‘‘๐‘ฅsinโก(2๐‘ฅ)?โž=cosโก(2๐‘ฅ)โ‹…(2)โ‹…๐‘‘๐‘‘๐‘ฅ(2)0?โž=0?!? I mean, if I apply the Chain Rule to the every layer of the function it seems like I should take the derivative of that last "2," but that makes the whole thing zero! That doesn't seem right, or match what we did before. How do I know where to stop?!?"

Great question! Kiran is certainly right that he's gone a step too far in taking that last derivative. If when using the Chain Rule you suddenly find yourself taking the derivative of a constant and the whole thing goes to zero, like Kiran's example, then you've also gone a step too far.

The reason is that the innermost function in sinโก(2๐‘ฅ) is 2๐‘ฅ. Let's think about the chain for this compound function:

Links in a chain for the function f(x) = sin(2x). First link inside text: input something. Below that link is the input letter x. An arrow points to the second link, which has text inside: multiply it by 2. Text beneath that link says f_1(x) = 2x. An arrow then points to the third chain link, with text inside: take the sine of that. Text beneath the link says f_2(u) = sin(u).

Creating this image (in our heads, if nothing else) shows where the calculation above went wrong: there is no inner function that is ๐‘“3 =2, so there is no third term in the Chain Rule statement. Instead, ๐‘‘๐‘‘๐‘ฅsinโก(2๐‘ฅ)=๐‘‘๐‘“2๐‘‘๐‘“1โžcosโก(2๐‘ฅ)โ‹…๐‘‘๐‘“1๐‘‘๐‘ฅโž2โœ“ That is, we stop when we take the derivative of the innermost function, which is 2๐‘ฅ.

(We love that Kiran is thinking all of this through!)

And now, time to practice applying the Chain Rule to more complex functions!

Deeper Chain Rule Practice Problem #1

This problem requires using the Chain Rule twice.

Differentiate ๐‘“(๐‘ฅ) =cosโก(tanโก(3๐‘ฅ)).

Deeper Chain Rule Practice Problem #2

This problem requires using the Chain Rule twice.

Differentiate ๐‘“(๐‘ฅ) =โˆšsinโก(5๐‘ฅ).

Deeper Chain Rule Practice Problem #3

This problem requires using the Chain Rule three times.

Differentiate ๐‘“(๐‘ฅ) =(1+sin9โก(2๐‘ฅ+3))2.

Hint: Recall that sin9โก(โ‹ฏ) =[sinโก(โ‹ฏ)]9.

Deeper Chain Rule Practice Problem #4
Let ๐‘ฆ =cosโก(โˆš1+โˆš๐‘ฅ). Find ๐‘ฆโ€ฒ.
Deeper Chain Rule Practice Problem #5 (Prior uni exam question)
โ„Ž(๐‘ฅ) =๐‘’sinโก(โˆ’๐‘ฅ)

On the next and final screen in this Section on the Chain Rule, we'll use the rule to develop some further derivatives and facts that are useful to have in mind as we proceed. Of course that work will give you yet more practice at using the rule, too.


What questions do you have about what's on this screen, or other derivative problems you're working on? Please post on the Forum and let us know!