Combining the Chain Rule With Other Rules

Learning Outcomes

  • Apply the chain rule together with the power rule
  • Apply the chain rule and the product/quotient rules correctly in combination when both are necessary
  • Recognize the chain rule for a composition of three or more functions
  • Describe the proof of the chain rule

The Chain and Power Rules Combined

We can now apply the chain rule to composite functions, but note that we often need to use it with other rules. For example, to find derivatives of functions of the form [latex]h(x)=(g(x))^n[/latex], we need to use the chain rule combined with the power rule. To do so, we can think of [latex]h(x)=(g(x))^n[/latex] as [latex]f(g(x))[/latex] where [latex]f(x)=x^n[/latex]. Then [latex]f^{\prime}(x)=nx^{n-1}[/latex]. Thus, [latex]f^{\prime}(g(x))=n(g(x))^{n-1}[/latex]. This leads us to the derivative of a power function using the chain rule,

[latex]h^{\prime}(x)=n(g(x))^{n-1}g^{\prime}(x)[/latex]

 

Power Rule for Composition of Functions


For all values of [latex]x[/latex] for which the derivative is defined, if

[latex]h(x)=(g(x))^n[/latex]

 

Then

[latex]h^{\prime}(x)=n(g(x))^{n-1}g^{\prime}(x)[/latex]

 

Example: Using the Chain and Power Rules

Find the derivative of [latex]h(x)=\dfrac{1}{(3x^2+1)^2}[/latex]

Try It

Find the derivative of [latex]h(x)=(2x^3+2x-1)^4[/latex]

Watch the following video to see the worked solution to the above Try It.

Example: Using the Chain and Power Rules with a Trigonometric Function

Find the derivative of [latex]h(x)=\sin^3 x[/latex]

Example: Finding the Equation of a Tangent Line

Find the equation of a line tangent to the graph of [latex]h(x)=\dfrac{1}{(3x-5)^2}[/latex] at [latex]x=2[/latex].

Watch the following video to see the worked solution to Example: Finding the Equation of a Tangent Line.

Try It

Find the equation of the line tangent to the graph of [latex]f(x)=(x^2-2)^3[/latex] at [latex]x=-2[/latex].

Try It

The Chain and Trigonometric Functions Combined

Now that we can combine the chain rule and the power rule, we examine how to combine the chain rule with the other rules we have learned. In particular, we can use it with the formulas for the derivatives of trigonometric functions or with the product rule.

Example: Using the Chain Rule on a General Cosine Function

Find the derivative of [latex]h(x)= \cos (g(x))[/latex].

In the following example we apply the rule that we have just derived.

Example: Using the Chain Rule on a Cosine Function

Find the derivative of [latex]h(x)= \cos (5x^2)[/latex].

Example: Using the Chain Rule on Another Trigonometric Function

Find the derivative of [latex]h(x)= \sec (4x^5+2x)[/latex].

Watch the following video to see the worked solution to Example: Using the Chain Rule on Another Trigonometric Function.

Try It

Find the derivative of [latex]h(x)= \sin (7x+2)[/latex].

At this point we provide a list of derivative formulas that may be obtained by applying the chain rule in conjunction with the formulas for derivatives of trigonometric functions. Their derivations are similar to those used in the last three examples. For convenience, formulas are also given in Leibniz’s notation, which some students find easier to remember. (We discuss the chain rule using Leibniz’s notation at the end of this section.) It is not absolutely necessary to memorize these as separate formulas as they are all applications of the chain rule to previously learned formulas.

Using the Chain Rule with Trigonometric Functions


For all values of [latex]x[/latex] for which the derivative is defined,

[latex]\begin{array}{llll}\frac{d}{dx}(\sin (g(x)))= \cos (g(x))g^{\prime}(x) & & & \frac{d}{dx} \sin u= \cos u\frac{du}{dx} \\ \frac{d}{dx}(\cos (g(x)))=−\sin (g(x))g^{\prime}(x) & & & \frac{d}{dx} \cos u=−\sin u\frac{du}{dx} \\ \frac{d}{dx}(\tan (g(x)))= \sec^2 (g(x))g^{\prime}(x) & & & \frac{d}{dx} \tan u=\sec^2 u\frac{du}{dx} \\ \frac{d}{dx}(\cot (g(x)))=−\csc^2 (g(x))g^{\prime}(x) & & & \frac{d}{dx} \cot u=−\csc^2 u\frac{du}{dx} \\ \frac{d}{dx}(\sec (g(x)))= \sec (g(x)) \tan (g(x))g^{\prime}(x) & & & \frac{d}{dx} \sec u= \sec u \tan u\frac{du}{dx} \\ \frac{d}{dx}(\csc (g(x)))=−\csc (g(x)) \cot (g(x))g^{\prime}(x) & & & \frac{d}{dx} \csc u=−\csc u \cot u\frac{du}{dx} \end{array}[/latex]

 

The Chain and Product Rules Combined

Example: Combining the Chain Rule with the Product Rule

Find the derivative of [latex]h(x)=(2x+1)^5(3x-2)^7[/latex]

Watch the following video to see the worked solution to Example: Combining the Chain Rule with the Product Rule.

Try It

Find the derivative of [latex]h(x)=\dfrac{x}{(2x+3)^3}[/latex]

Try It

Applying the Chain Rule Multiple Times

We can now combine the chain rule with other rules for differentiating functions, but when we are differentiating the composition of three or more functions, we need to apply the chain rule more than once. If we look at this situation in general terms, we can generate a formula, but we do not need to remember it, as we can simply apply the chain rule multiple times.

In general terms, first we let

[latex]k(x)=h(f(g(x)))[/latex]

Then, applying the chain rule once we obtain

[latex]k^{\prime}(x)=\frac{d}{dx}(h(f(g(x))))=h^{\prime}(f(g(x))) \cdot \frac{d}{dx}(f(g(x)))[/latex]

 

Applying the chain rule again, we obtain

[latex]k^{\prime}(x)=h^{\prime}(f(g(x)))f^{\prime}(g(x))g^{\prime}(x)[/latex]

 

Chain Rule for a Composition of Three Functions


For all values of [latex]x[/latex] for which the function is differentiable, if

[latex]k(x)=h(f(g(x)))[/latex],

 

then

[latex]k^{\prime}(x)=h^{\prime}(f(g(x)))f^{\prime}(g(x))g^{\prime}(x)[/latex]

 

In other words, we are applying the chain rule twice.

Notice that the derivative of the composition of three functions has three parts. (Similarly, the derivative of the composition of four functions has four parts, and so on.) Also, remember, we always work from the outside in, taking one derivative at a time.

Example: Differentiating a Composite of Three Functions

Find the derivative of [latex]k(x)=\cos^4 (7x^2+1)[/latex]

Don’t forget that [latex]{\cos }^{n}t[/latex] is a commonly used shorthand notation for [latex]{\left(\cos \left(t\right)\right)}^{n}[/latex]. When we write it without the shorthand notation, we can clearly see why the chain rule is necessary in these situations.

Try It

Find the derivative of [latex]h(x)=\sin^6 (x^3)[/latex]

Try It

Example: Using the Chain Rule in a Velocity Problem

A particle moves along a coordinate axis. Its position at time [latex]t[/latex] is given by [latex]s(t)= \sin (2t)+ \cos (3t)[/latex]. What is the velocity of the particle at time [latex]t=\frac{\pi}{6}[/latex]?

Watch the following video to see the worked solution to Example: Using the Chain Rule in a Velocity Problem.

Try It

A particle moves along a coordinate axis. Its position at time [latex]t[/latex] is given by [latex]s(t)= \sin (4t)[/latex]. Find its acceleration at time [latex]t[/latex].

Proof of the Chain Rule

At this point, we present a very informal proof of the chain rule. For simplicity’s sake we ignore certain issues: For example, we assume that [latex]g(x)\ne g(a)[/latex] for [latex]x\ne a[/latex] in some open interval containing [latex]a[/latex]. We begin by applying the limit definition of the derivative to the function [latex]h(x)[/latex] to obtain [latex]h^{\prime}(a)[/latex]:

[latex]h^{\prime}(a)=\underset{x\to a}{\lim}\dfrac{f(g(x))-f(g(a))}{x-a}[/latex]

 

Rewriting, we obtain

[latex]h^{\prime}(a)=\underset{x\to a}{\lim}\dfrac{f(g(x))-f(g(a))}{g(x)-g(a)} \cdot \dfrac{g(x)-g(a)}{x-a}[/latex]

 

Although it is clear that

[latex]\underset{x\to a}{\lim}\dfrac{g(x)-g(a)}{x-a}=g^{\prime}(a)[/latex],

 

it is not obvious that

[latex]\underset{x\to a}{\lim}\dfrac{f(g(x))-f(g(a))}{g(x)-g(a)}=f^{\prime}(g(a))[/latex]

 

To see that this is true, first recall that since [latex]g[/latex] is differentiable at [latex]a, \, g[/latex] is also continuous at [latex]a[/latex]. Thus,

[latex]\underset{x\to a}{\lim}g(x)=g(a)[/latex].

 

Next, make the substitution [latex]y=g(x)[/latex] and [latex]b=g(a)[/latex] and use change of variables in the limit to obtain

[latex]\underset{x\to a}{\lim}\dfrac{f(g(x))-f(g(a))}{g(x)-g(a)}=\underset{y\to b}{\lim}\dfrac{f(y)-f(b)}{y-b}=f^{\prime}(b)=f^{\prime}(g(a))[/latex].

 

Finally,

[latex]h^{\prime}(a)=\underset{x\to a}{\lim}\dfrac{f(g(x))-f(g(a))}{g(x)-g(a)} \cdot \dfrac{g(x)-g(a)}{x-a}=f^{\prime}(g(a))g^{\prime}(a)[/latex]

[latex]_\blacksquare[/latex]

Example: Using the Chain Rule with Functional Values

Let [latex]h(x)=f(g(x))[/latex]. If [latex]g(1)=4, \, g^{\prime}(1)=3[/latex], and [latex]f^{\prime}(4)=7[/latex], find [latex]h^{\prime}(1)[/latex].

Watch the following video to see the worked solution to Example: Using the Chain Rule with Functional Values.

Try It

Let [latex]h(x)=f(g(x))[/latex]. If [latex]g(2)=-3, \, g^{\prime}(2)=4[/latex], and [latex]f^{\prime}(-3)=7[/latex], find [latex]h^{\prime}(2)[/latex].