Chain Rule: Problems and Solutions

This screen contains only a summary of how to use the Chain Rule to calculate derivatives, and free problems for you to practice, each with a complete solution immediately available. If you need to get this down quickly, and don't have time to work through the more comprehensive material earlier in this Chapter, this screen should help. These are also great problems to practice for an exam.

Chain Rule Summary

You can always access our Handy Table of Derivatives and Differentiation Rules via the Key Formulas menu item at the top of every page.

You must use the Chain rule to find the derivative of any function that is comprised of one function inside of another function.

     For instance, (𝑥2+1)7 is comprised of the inner function 𝑥2 +1 inside the outer function ()7.

As another example, 𝑒sin𝑥 is comprised of the inner function sin𝑥 inside the outer function 𝑒.

As yet another example, ln(𝑡32𝑡2+5) is comprised of the inner function 𝑡3 2𝑡2 +5 inside the outer function ln().

Since each of these functions is comprised of one function inside of another function — known as a composite function — we must use the Chain rule to find its derivative, as shown in the problems below.


Tip icon

How can I tell what the inner and outer functions are?

Here's a foolproof method: Imagine calculating the value of the function for a particular value of 𝑥 and identify the steps you would take, because you'll always automatically start with the inner function and work your way out to the outer function.

For example, imagine computing (𝑥2+1)7 for 𝑥 =3. Without thinking about it, you would first calculate 𝑥2 +1 (which equals 32 +1 =10), so that's the inner function, guaranteed. Then you would next calculate 107, and so ()7 is the outer function.

This imaginary computational process works every time to identify correctly what the inner and outer functions are.


Chain Rule

Consider a composite function whose outer function is 𝑓(𝑥) and whose inner function is 𝑔(𝑥). The composite function is thus 𝑓(𝑔(𝑥)). Its derivative is given by:

[𝑓(𝑔(𝑥))]=𝑓(𝑔(𝑥))𝑔(𝑥)=[derivative of the outer function, evaluated at the inner function] × [derivative of the inner function]

Alternatively, if we write 𝑦 =𝑓(𝑢) and 𝑢 =𝑔(𝑥), then

𝑑𝑦𝑑𝑥=𝑑𝑦𝑑𝑢𝑑𝑢𝑑𝑥

Informally:

𝑑𝑓𝑑𝑥=[𝑑𝑓𝑑(stuff), with the same stuff inside]×𝑑𝑑𝑥(stuff)
Tip icon

Even though few people admit it, almost everyone thinks along the lines of the informal approach in the blue boxes above. We'll illustrate in the problems below.


Chain Rule Example #1

Differentiate 𝑓(𝑥) =(𝑥2 +1)7.

Solutions.

We'll solve this using three different approaches — but we encourage you to become comfortable with the third approach as quickly as possible, because that's the one you'll use to compute derivatives quickly as the course progresses.

Solution 1.

Let's use the first form of the Chain rule above:

[𝑓(𝑔(𝑥))]=𝑓(𝑔(𝑥))𝑔(𝑥)=[derivative of the outer function, evaluated at the inner function] × [derivative of the inner function]

We have the outer function 𝑓(𝑢) =𝑢7 and the inner function 𝑢 =𝑔(𝑥) =𝑥2 +1.

Then 𝑓(𝑢) =7𝑢6, and 𝑔(𝑥) =2𝑥. Then

𝑓(𝑥)=7𝑢62𝑥=7(𝑥2+1)62𝑥

We could of course simplify the result algebraically to 14𝑥(𝑥2 +1)2, but we're leaving the result as written to emphasize the Chain rule term 2𝑥 at the end.

Solution 2.

Let's use the second form of the Chain rule above:

𝑑𝑦𝑑𝑥=𝑑𝑦𝑑𝑢𝑑𝑢𝑑𝑥

We have 𝑦 =𝑢7 and 𝑢 =𝑥2 +1.

Then 𝑑𝑦𝑑𝑢 =7𝑢6, and 𝑑𝑢𝑑𝑥 =2𝑥. Hence

𝑑𝑦𝑑𝑥=7𝑢62𝑥=7(𝑥2+1)62𝑥

Solution 3.

Let's use the third form of the Chain rule above:

Tip icon

Instead, you'll think something like: "The function is a bunch of stuff to the 7th power. So the derivative is 7 times that same stuff to the 6th power, times the derivative of that stuff."

𝑑𝑓𝑑𝑥=[𝑑𝑓𝑑(stuff), with the same stuff inside]×𝑑𝑑𝑥(stuff) 𝑓(𝑥)=(stuff)7;stuff=𝑥2+1Then𝑓(𝑥)=𝑑𝑓𝑑𝑥=7(stuff)6(𝑑𝑑𝑥(𝑥2+1))=7(𝑥2+1)6(2𝑥)

Note: You'd never actually write out "stuff = ...." Instead just hold in your head what that "stuff" is, and proceed to write down the required derivatives.


There are lots more completely solved example problems below!

The problems below are grouped for practice purposes to use the Chain rule and: [Power rule] [Exponentials] [Trig Functions] [Product rule & Quotient rule] [Chain rule multiple times] [More problems and University exam problems]

Chain Rule & Power Rule

If𝑓(𝑥)=(stuff)𝑛,then𝑑𝑓𝑑𝑥=𝑛(that stuff)𝑛1𝑑𝑑𝑥(that stuff)
You'll usually see this written as
𝑑𝑑𝑥(𝑢𝑛)=𝑛𝑢𝑛1𝑑𝑢𝑑𝑥

The following six problems illustrate.

Chain Rule Practice Problem #1
Given 𝑓(𝑥) =(3𝑥24𝑥+5)8, 𝑓(𝑥) =
(A) 8(3𝑥24𝑥+5)7(B) 8(3𝑥24𝑥+5)7(6𝑥4)(C) 8(6𝑥4)7
 (D) (3𝑥24𝑥+5)8(E) none of these
Chain Rule Practice Problem #2

Given 𝑓(𝑥) =tan3𝑥, 𝑓(𝑥) =

Hint: Recall tan3𝑥 =[tan𝑥]3. Also recall that 𝑑𝑑𝑥tan𝑥 =sec2𝑥.

(A) 3sec4𝑥(B) 3tan2𝑥(C) tan3𝑥sec2𝑥 (D) 3tan2𝑥sec2𝑥(E) none of these
Chain Rule Practice Problem #3
Given 𝑓(𝑥) =(cos𝑥 sin𝑥)2, 𝑓(𝑥) =
(A) 2(cos𝑥sin𝑥)1(sin𝑥cos𝑥)(B) 2(cos𝑥sin𝑥)3
(C) 2(cos𝑥sin𝑥)3(sin𝑥cos𝑥)(D) 2(sin𝑥cos𝑥)3(cos𝑥sin𝑥)
(E) none of these
Chain Rule Practice Problem #4
Given 𝑓(𝑥) =(𝑥5+𝑒𝑥)99, 𝑓(𝑥) =
(A) 99(𝑥5+𝑒𝑥)98(5𝑥4+𝑒𝑥)(B) 99(𝑥5+𝑒𝑥)98(C) 99(𝑥5+𝑒𝑥)98(5𝑥4+𝑒𝑥1)
(D) 99(5𝑥4+𝑒𝑥)98(E) none of these
Chain Rule Practice Problem #5
Given 𝑓(𝑥) =𝑥2+1, 𝑓(𝑥) =
(A) 121𝑥2+1(2𝑥)(B) 121𝑥2+1(C) 1212𝑥 (D) 12𝑥2+1(E) none of these
Chain Rule Practice Problem #6
Given 𝑓(𝑥) =sin𝑥, 𝑓(𝑥) =
(A) 121sin𝑥(B) 12sin𝑥cos𝑥(C) 121sin𝑥cos𝑥
(D) 121sin𝑥cos𝑥(E) none of these

Chain Rule & Exponentials

If𝑓(𝑥)=𝑒(stuff),then𝑑𝑓𝑑𝑥=𝑒(that stuff)𝑑𝑑𝑥(that stuff)

You'll usually see this written as

𝑑𝑑𝑥𝑒𝑢=𝑒𝑢𝑑𝑢𝑑𝑥

The next three problems illustrate.

Chain Rule Practice Problem #7

Given 𝑓(𝑥) =𝑒sin𝑥, 𝑓(𝑥) =

(A) 𝑒cos𝑥cos𝑥(B) 𝑒(sin𝑥1)𝑒cos𝑥(C) 𝑒sin𝑥cos𝑥 (D) 𝑒sin𝑥cos𝑥(E) none of these

Chain Rule Practice Problem #8
Given 𝑓(𝑥) =𝑒𝑥2, 𝑓(𝑥) =
(A) 𝑒𝑥2𝑒2𝑥(B) 𝑒𝑥22𝑥(C) 𝑒𝑥2(D) 𝑒2𝑥(E) none of these
Chain Rule Practice Problem #9
Given 𝑓(𝑥) =𝑒(𝑥74𝑥3+𝑥), 𝑓(𝑥) =
(A) 𝑒(𝑥74𝑥3+𝑥)(7𝑥612𝑥2)(B) 𝑒(𝑥74𝑥3+𝑥)(7𝑥612𝑥2+1)(C) 𝑒(𝑥74𝑥3+𝑥)
(D) 𝑒(7𝑥612𝑥2+1)(E) none of these

Chain Rule & Trig Functions

If𝑓(𝑥)=sin(stuff),then𝑑𝑓𝑑𝑥=cos(that stuff)𝑑𝑑𝑥(that stuff)
You'll usually see this written as
𝑑𝑑𝑥sin𝑢=cos𝑢𝑑𝑢𝑑𝑥

If𝑓(𝑥)=cos(stuff),then𝑑𝑓𝑑𝑥=sin(that stuff)𝑑𝑑𝑥(that stuff)
You'll usually see this written as
𝑑𝑑𝑥cos𝑢=sin𝑢𝑑𝑢𝑑𝑥

If𝑓(𝑥)=tan(stuff),then𝑑𝑓𝑑𝑥=sec2(that stuff)𝑑𝑑𝑥(that stuff)

You'll usually see this written as

𝑑𝑑𝑥tan𝑢=sec2𝑢𝑑𝑢𝑑𝑥

The next two problems illustrate.

Chain Rule Practice Problem #10
Given 𝑓(𝑥) =sin(2𝑥), 𝑓(𝑥) =
(A) cos(2𝑥)(2)(B) sin(2𝑥)(2)(C) cos(2𝑥)(2) (D) cos(2)(E) none of these
Chain Rule Practice Problem #11

Given 𝑓(𝑥) =tan(𝑒𝑥), 𝑓(𝑥) = (A) sec(𝑒𝑥)tan(𝑒𝑥)𝑒𝑥(B) sec(𝑒𝑥)𝑒𝑥(C) sec2(𝑒𝑥) (D) sec2(𝑒𝑥)𝑒𝑥(E) none of these

Chain Rule & Product Rule or Quotient Rule

The next few problems require using the Chain rule with the Product rule or with the Quotient rule.

Chain Rule Practice Problem #12

This problem combines the Product Rule with the Chain Rule.

Given 𝑓(𝑥) =(𝑥2+1)7(3𝑥 7)4, 𝑓(𝑥) =

(A) 28(𝑥2+1)6(3𝑥 7)3

(B) 28(𝑥2+1)6(3𝑥 7)3 (2𝑥) (3)

(C) [7(𝑥2+1)6(2𝑥)](3𝑥 7)4 +(𝑥2+1)7[4(3𝑥7)3(3)]

(D) 7(𝑥2+1)6(3𝑥 7)4 +4(𝑥2+1)7(3𝑥 7)3

(E) none of these

Chain Rule Practice Problem #13

This problem combines the Quotient rule with the Chain rule.

Given (𝑥) =𝑒2𝑥1𝑥2, 𝑓(𝑥) =
 

(A) (𝑒2𝑥2)(1𝑥2)(𝑒2𝑥)(2𝑥)(1𝑥2)2(2𝑥)

(B) (𝑒2𝑥2)(1𝑥2)(𝑒2𝑥)(2𝑥)(1𝑥2)2

(C) (𝑒2𝑥2)(1𝑥2)2(𝑒2𝑥)(1𝑥2)2

(D) (𝑒2𝑥2)(1𝑥2)+(𝑒2𝑥)(2𝑥)(1𝑥2)2

(E) none of these

Using the Chain Rule Multiple Times

The next few problems require using the Chain rule multiple times.

Chain Rule Practice Problem #14

This problem requires using the Chain Rule twice.

Differentiate 𝑓(𝑥) =cos(tan(3𝑥)).

Chain Rule Practice Problem #15

This problem requires using the Chain Rule twice.

Differentiate 𝑓(𝑥) =sin(5𝑥).

Chain Rule Practice Problem #16

This problem requires using the Chain Rule three times.

Differentiate 𝑓(𝑥) =(1+sin9(2𝑥+3))2.

Hint: Recall that sin9() =[sin()]9.

More Problems and University Exam Problems

The following problems use the Chain Rule in different ways, and contain some actual university exam problems.

Chain Rule Practice Problem #17
Given that 𝑓(2) =1, 𝑓(4) =5, 𝑔(2) =4, and 𝑔(2) =8, find [𝑓(𝑔(2))].

(A) 5(B) 10(C) 40(D) 8(E) 32

Chain Rule Practice Problem #18

Let 𝑓 and 𝑔 be differentiable functions and let the values of 𝑓,𝑔,𝑓 and 𝑔 at 𝑥 =1 and 𝑥 =2 be given by the table.

𝑥𝑓(𝑥)𝑔(𝑥)𝑓(𝑥)𝑔(𝑥)1532722146

Find lim0𝑓(𝑔(2+))𝑓(𝑔(2)).

Chain Rule Practice Problem #19
Show the following, as requested.
(a)
Use the Chain Rule and the Product Rule to develop the Quotient Rule. Start from 𝑓(𝑥)𝑔(𝑥) =𝑓(𝑥)(𝑔(𝑥))1.
(b)
Prove that the derivative of an even function is an odd function. [Recall that for an even function, 𝑓( 𝑥) =𝑓(𝑥).]
(c)
Prove that the derivative of an odd function is an even function. [Recall that for an odd function, 𝑓( 𝑥) = 𝑓(𝑥).]
Chain Rule Practice Problem #20

Show that 𝑑𝑑𝑥𝑎𝑥 =𝑎𝑥ln𝑎, where 𝑎 is a constant and 𝑎 >0. (For example, 𝑑𝑑𝑥2𝑥 =2𝑥ln2.)

Hint: Start with 𝑎𝑥 =𝑒ln𝑎𝑥, and use 𝑑𝑑𝑥𝑒𝑢 =𝑒𝑢 𝑑𝑢𝑑𝑥.

Chain Rule Practice Problem #21
If 𝑦 =𝑓(𝑥2) and 𝑓(𝑥) =3𝑥+5, show that 𝑑𝑦𝑑𝑥 =2𝑥3𝑥2+5.
Chain Rule Practice Problem #22
Derive the following, as requested.
(a)
Find the derivative of sec𝜃 =1cos𝜃. Hint: Remember the Chain Rule.
(b)
Find the derivative of cot𝜃 =cos𝜃sin𝜃 =(cos𝜃)(sin𝜃)1. Use the Product Rule.
(c)
Find the derivative of cot𝜃 =cos𝜃sin𝜃. Use the Quotient Rule.
Chain Rule Practice Problem #23
Find the requested information.
(a)

[This problem appeared on an exam at a well-known science and engineering university.]

Differentiate 𝑓(𝑥) =sin(2𝑥)𝑥.

(b)
Let 𝑦 =cos(1+𝑥). Find 𝑦.
Chain Rule Practice Problem #24
Find the derivative of the following functions.
(a)
(𝑥) =𝑒sin(𝑥)
(b)

[This problem appeared on an exam at a well-known science and engineering university.]

Differentiate 𝑔(𝑥) =𝑥21𝑥.


Please let us know on our Forum:

  • What questions do you have about the solutions above?
  • Which ones are giving you the most trouble?
  • What other problems are you trying to work through for your class about calculating derivatives that you don't know how to do easily yet?

If you let us know, we'll do our best to help!