# Chain rule review

Review your knowledge of the Chain rule for derivatives, and use it to solve problems.
The chain rule says:
start fraction, d, divided by, d, x, end fraction, open bracket, f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, close bracket, equals, f, prime, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, g, prime, left parenthesis, x, right parenthesis
It tells us how to differentiate composite functions.

## Quick review of composite functions

A function is composite if you can write it as f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis. In other words, it is a function within a function, or a function of a function.
For example, start color greenD, cosine, left parenthesis, end color greenD, start color goldD, x, start superscript, 2, end superscript, end color goldD, start color greenD, right parenthesis, end color greenD is composite, because if we let start color greenD, f, left parenthesis, x, right parenthesis, equals, cosine, left parenthesis, x, right parenthesis, end color greenD and start color goldD, g, left parenthesis, x, right parenthesis, equals, x, start superscript, 2, end superscript, end color goldD, then start color greenD, cosine, left parenthesis, end color greenD, start color goldD, x, start superscript, 2, end superscript, end color goldD, start color greenD, right parenthesis, end color greenD, equals, start color greenD, f, left parenthesis, end color greenD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color greenD, right parenthesis, end color greenD.
start color goldD, g, end color goldD is the function within start color greenD, f, end color greenD, so we call start color goldD, g, end color goldD the "inner" function and start color greenD, f, end color greenD the "outer" function.
On the other hand, cosine, left parenthesis, x, right parenthesis, dot, x, start superscript, 2, end superscript is not a composite function. It is the product of f, left parenthesis, x, right parenthesis, equals, cosine, left parenthesis, x, right parenthesis and g, left parenthesis, x, right parenthesis, equals, x, start superscript, 2, end superscript, but neither of the functions is within the other one.
Problem 1
Is g, left parenthesis, x, right parenthesis, equals, left parenthesis, 2, x, plus, 1, right parenthesis, start superscript, 4, end superscript a composite function? If so, what are the "inner" and "outer" functions?
Please choose from one of the following options.

Problem 2
Is h, left parenthesis, x, right parenthesis, equals, start fraction, x, minus, 8, divided by, e, start superscript, x, end superscript, end fraction a composite function? If so, what are the "inner" and "outer" functions?
Please choose from one of the following options.

Want more practice? Try this exercise.

## Worked example of applying the chain rule

Let's see how the chain rule is applied by differentiating h, left parenthesis, x, right parenthesis, equals, left parenthesis, 5, minus, 6, x, right parenthesis, start superscript, 5, end superscript. Notice that h is a composite function:
Because h is composite, we can differentiate it using the chain rule:
start fraction, d, divided by, d, x, end fraction, open bracket, start color greenD, f, left parenthesis, end color greenD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color greenD, right parenthesis, end color greenD, close bracket, equals, start color blueD, f, prime, left parenthesis, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, right parenthesis, end color blueD, dot, start color maroonD, g, prime, left parenthesis, x, right parenthesis, end color maroonD
Described verbally, the rule says that the derivative of the composite function is the inner function start color goldD, g, end color goldD within the derivative of the outer function start color blueD, f, prime, end color blueD, multiplied by the derivative of the inner function start color maroonD, g, prime, end color maroonD.
Before applying the rule, let's find the derivatives of the inner and outer functions:
\begin{aligned} \maroonD{g'(x)}&=\maroonD{-6} \\\\ \blueD{f'(x)}&=\blueD{5x^4} \end{aligned}
Now let's apply the chain rule:
\begin{aligned} &\dfrac{d}{dx}\left[f\Bigl(g(x)\Bigr)\right] \\\\ =&\blueD{f'\Bigl(\goldD{g(x)}\Bigr)}\cdot\maroonD{g'(x)} \\\\ =&\blueD{5(\goldD{5-6x})^4} \cdot \maroonD{-6} \\\\ =&-30(5-6x)^4 \end{aligned}

### Practice applying the chain rule

This problem set will walk you through the steps of differentiating sine, left parenthesis, 2, x, start superscript, 3, end superscript, minus, 4, x, right parenthesis.
Problem 3.A
What are the inner and outer functions in sine, left parenthesis, 2, x, start superscript, 3, end superscript, minus, 4, x, right parenthesis?
Please choose from one of the following options.

Problem 4
start fraction, d, divided by, d, x, end fraction, open bracket, square root of, cosine, left parenthesis, x, right parenthesis, end square root, close bracket, equals, space, question mark
Please choose from one of the following options.

Want more practice? Try this exercise.
Problem 5
xf, left parenthesis, x, right parenthesish, left parenthesis, x, right parenthesisf, prime, left parenthesis, x, right parenthesish, prime, left parenthesis, x, right parenthesis
minus, 19minus, 1minus, 5minus, 6
23minus, 116
G, left parenthesis, x, right parenthesis, equals, f, left parenthesis, h, left parenthesis, x, right parenthesis, right parenthesis
G, prime, left parenthesis, 2, right parenthesis, equals

Want more practice? Try this exercise.

## Common mistakes when applying the chain rule

### Most common mistake: Forgetting to multiply by the derivative of the inner function

To help us wrap our minds around this particular mistake, let's try a practice problem where we spot the mistake in someone else's work:
Problem 6
Katy tried to find the derivative of left parenthesis, 2, x, start superscript, 2, end superscript, minus, 4, right parenthesis, start superscript, 3, end superscript. Here is her work:
Step 1: Let start color greenD, f, left parenthesis, x, right parenthesis, equals, x, start superscript, 3, end superscript, end color greenD and start color goldD, g, left parenthesis, x, right parenthesis, equals, 2, x, start superscript, 2, end superscript, minus, 4, end color goldD, then start color greenD, left parenthesis, end color greenD, start color goldD, 2, x, start superscript, 2, end superscript, minus, 4, end color goldD, start color greenD, right parenthesis, start superscript, 3, end superscript, end color greenD, equals, start color greenD, f, left parenthesis, end color greenD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color greenD, right parenthesis, end color greenD.
Step 2: start color blueD, f, prime, left parenthesis, x, right parenthesis, equals, 3, x, start superscript, 2, end superscript, end color blueD
Step 3: The derivative is start color blueD, f, prime, left parenthesis, end color blueD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color blueD, right parenthesis, end color blueD:
start fraction, d, divided by, d, x, end fraction, open bracket, start color greenD, left parenthesis, end color greenD, start color goldD, 2, x, start superscript, 2, end superscript, minus, 4, end color goldD, start color greenD, right parenthesis, start superscript, 3, end superscript, end color greenD, close bracket, equals, start color blueD, 3, left parenthesis, end color blueD, start color goldD, 2, x, start superscript, 2, end superscript, minus, 4, end color goldD, start color blueD, right parenthesis, start superscript, 2, end superscript, end color blueD
Is Katy's work correct? If not, what's her mistake?
Please choose from one of the following options.

A common mistake is for students to only differentiate the out function, which results in f, prime, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, while the correct derivative is f, prime, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis, g, prime, left parenthesis, x, right parenthesis.

#### Computing $f'\big(g'(x)\big)$f, prime, left parenthesis, g, prime, left parenthesis, x, right parenthesis, right parenthesis

Another common mistake is to differentiate f, left parenthesis, g, left parenthesis, x, right parenthesis, right parenthesis as the composition of the derivatives, f, prime, left parenthesis, g, prime, left parenthesis, x, right parenthesis, right parenthesis.
This is also incorrect. The function that should be inside of f, prime, left parenthesis, x, right parenthesis is g, left parenthesis, x, right parenthesis, not g, prime, left parenthesis, x, right parenthesis.
Remember: The derivative of start color greenD, f, left parenthesis, end color greenD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color greenD, right parenthesis, end color greenD is start color blueD, f, prime, left parenthesis, end color blueD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color blueD, right parenthesis, end color blueD, start color maroonD, g, prime, left parenthesis, x, right parenthesis, end color maroonD. Not start color blueD, f, prime, left parenthesis, end color blueD, start color goldD, g, left parenthesis, x, right parenthesis, end color goldD, start color blueD, right parenthesis, end color blueD and not start color blueD, f, prime, left parenthesis, end color blueD, start color maroonD, g, prime, left parenthesis, x, right parenthesis, end color maroonD, start color blueD, right parenthesis, end color blueD.

#### Not recognizing whether a function is composite or not

Usually, the only way to differentiate a composite function is using the chain rule. If we don't recognize that a function is composite and that the chain rule must be applied, we will not be able to differentiate correctly.
On the other hand, applying the chain rule on a function that isn't composite will also result in a wrong derivative.
Especially with transcendental functions (e.g., trigonometric and logarithmic functions), students often confuse products like natural log, left parenthesis, x, right parenthesis, sine, left parenthesis, x, right parenthesis with compositions like natural log, left parenthesis, sine, left parenthesis, x, right parenthesis, right parenthesis.

#### Wrong identification of the inner and outer function

Even when a student recognized that a function is composite, they might get the inner and the outer functions wrong. This will surely end in a wrong derivative.
For example, in the composite function cosine, start superscript, 2, end superscript, left parenthesis, x, right parenthesis, the outer function is x, start superscript, 2, end superscript and the inner function is cosine, left parenthesis, x, right parenthesis. Students are often confused by this sort of function and think that cosine, left parenthesis, x, right parenthesis is the outer function.