topic badge

2.02 Composite functions and the chain rule

Lesson

We have seen how to differentiate functions involving multiple terms raised to powers. 

Let's consider a function of the form $y=\left(3x^2-2\right)^5$y=(3x22)5, where we have an expression raised to a power. How can we find $\frac{dy}{dx}$dydx?

So far with what we know about finding derivatives, we'd need to expand the function and differentiate term by term. This method quickly becomes inefficient for even relatively small powers.

We can consider the function given above as a composite function, which leads us to a very important tool in calculus called the chain rule. The chain rule uses substitution to break the function up into its composite parts that we can differentiate. 

First let's practice identifying the composite parts of a function. 

Look for patterns in the following table for how to identify the breakdown of a function, $y$y of $x$x, into a composition of two functions $u=g\left(x\right)$u=g(x) and $f\left(u\right)$f(u) such that $y=f\left(g\left(x\right)\right)$y=f(g(x)):

$y=f\left(g\left(x\right)\right)$y=f(g(x)) $u$u $f\left(u\right)$f(u)
$y=\left(3x^2-2\right)^5$y=(3x22)5 $u=3x^2-2$u=3x22 $f\left(u\right)=u^5$f(u)=u5
$y=\left(4x^3-2x+7\right)^{10}$y=(4x32x+7)10 $u=4x^3-2x+7$u=4x32x+7 $f\left(u\right)=u^{10}$f(u)=u10
$y=\sqrt{x^5-8x}$y=x58x $u=x^5-8x$u=x58x $f\left(u\right)=\sqrt{u}$f(u)=u
$y=\frac{3}{\left(5x^2-1\right)^4}$y=3(5x21)4 $u=5x^2-1$u=5x21 $f\left(u\right)=\frac{3}{u^4}$f(u)=3u4
$y=\sin\left(3x+5\right)$y=sin(3x+5) $u=3x+5$u=3x+5 $f\left(u\right)=\sin\left(u\right)$f(u)=sin(u)
$y=e^{\tan\left(x\right)}$y=etan(x) $u=\tan\left(x\right)$u=tan(x) $f\left(u\right)=e^u$f(u)=eu

To breakdown a function for the chain rule look for an inside function, $u$u, often in brackets. Then identify the outside function, $f\left(u\right)$f(u), by considering what we need to do to $u$u to obtain the original function.

Practice questions
Question 1

Consider the function $f\left(x\right)=\left(5x^3-4x^2+3x-5\right)^7$f(x)=(5x34x2+3x5)7.

Redefine the function as composite functions $f\left(u\right)$f(u) and $u\left(x\right)$u(x), where $u\left(x\right)$u(x) is a polynomial.

  1. $u\left(x\right)=\editable{}$u(x)=
    $f\left(u\right)=\left(\editable{}\right)^{\editable{}}$f(u)=()

Question 2

Consider the function $f\left(x\right)=e^{-2x^2+3}$f(x)=e2x2+3.

Redefine the function as composite functions $f\left(u\right)$f(u) and $u\left(x\right)$u(x), where $u\left(x\right)$u(x) is a polynomial.

  1. $u\left(x\right)=\editable{}$u(x)=
    $f\left(u\right)=\editable{}$f(u)=

The Chain rule

Once we recognise the composite parts of a function we can apply the chain rule. Let's explore how that works.

Exploration

Starting with the original function:

$y$y $=$= $\left(3x^2-2\right)^5$(3x22)5


We will let the function found inside the brackets be $u$u. Let $u=3x^2-2$u=3x22, therefore:

$y$y $=$= $u^5$u5

Then we can differentiate the components. Differentiating $u$u with respect to $x$x gives:

$\frac{du}{dx}$dudx $=$= $6x$6x

And differentiating $y$y with respect to $u$u gives:

$\frac{dy}{du}$dydu $=$= $5u^4$5u4


Remember that we want to find $\frac{dy}{dx}$dydx. To find this we can use $\frac{dy}{du}$dydu and $\frac{du}{dx}$dudx to create a chain as follows:

$\frac{dy}{dx}$dydx $=$= $\frac{dy}{du}\times\frac{du}{dx}$dydu×dudx

Which can be proven using first principles.

Hence we have:

$\frac{dy}{dx}$dydx $=$= $\frac{dy}{du}\times\frac{du}{dx}$dydu×dudx

 

  $=$= $5u^4\times6x$5u4×6x

 

  $=$= $5\left(3x^2-2\right)^4\times6x$5(3x22)4×6x

Make the substitution $u=3x^2-2$u=3x22

  $=$= $30x\left(3x^2-2\right)^4$30x(3x22)4

Simplify

 

 


Chain rule

If $y=f\left(u\right)$y=f(u) and $u=g\left(x\right)$u=g(x), then:

$\frac{dy}{dx}=\frac{dy}{du}\times\frac{du}{dx}$dydx=dydu×dudx

Alternatively. this can be written in the form:

If we have the composite function $h\left(x\right)=f\left(g\left(x\right)\right)$h(x)=f(g(x)), then:

$h'\left(x\right)=f'\left(g\left(x\right)\right)g'\left(x\right)$h(x)=f(g(x))g(x)

We can remember this as take the derivative of the outside, times the derivative of the inside.

 

Practice questions 

Question 3

We want to differentiate the function $y=\left(2x^4+6\right)^5$y=(2x4+6)5 using the substitution $u=2x^4+6$u=2x4+6.

  1. Determine $\frac{du}{dx}$dudx.

  2. Express $y$y as a function of $u$u

  3. Determine $\frac{dy}{du}$dydu.

  4. Hence determine $\frac{dy}{dx}$dydx.

Question 4

Let $y=\sqrt{5+x^2}$y=5+x2 be defined as a composition of the functions $y=\sqrt{u}$y=u and $u=5+x^2$u=5+x2.

  1. Determine $\frac{dy}{du}$dydu, expressing your answer in surd form.

  2. Determine $\frac{du}{dx}$dudx.

  3. Hence determine $\frac{dy}{dx}$dydx, expressing your answer in surd form.

 

Special case of the chain rule 

With the exception of simple cases such as $y=\left(x+5\right)^2$y=(x+5)2,  substitution and the chain rule is more efficient way of finding a derivative than expanding out questions involving a polynomial to a power. Did you notice a pattern when working through the examples above? When dealing with functions to a power the chain rule simplifies to the following formula, which can be useful to speed up the process by not requiring substitution.

Formula

If $y=\left[f\left(x\right)\right]^n$y=[f(x)]n then:

$\frac{dy}{dx}=n\left[f\left(x\right)\right]^{n-1}\times f'\left(x\right)$dydx=n[f(x)]n1×f(x)

Again, we can remember this as taking the derivative of the outside, times the derivative of the inside.

 

Worked examples

Example 1

Differentiate $y=\left(7x^3-1\right)^4$y=(7x31)4

Think: This function is in the form that allows us to use the chain rule for differentiation.

$y$y $=$= $f\left(x\right)^n$f(x)n

Where $f\left(x\right)=7x^3-1$f(x)=7x31 and $n=4$n=4.

Do: Differentiating the outside function:

$n\ \left(f\left(x\right)\right)^{n-1}$n (f(x))n1 $=$= $4\left(7x^3-1\right)^3$4(7x31)3
 

Differentiating the inside function:

$f'\left(x\right)$f(x) $=$= $21x^2$21x2

Putting it all together:

$\frac{dy}{dx}$dydx $=$= $4\left(7x^3-1\right)^3\times21x^2$4(7x31)3×21x2
  $=$= $84x^2\left(7x^3-1\right)^3$84x2(7x31)3
Example 2

Find the equation of the tangent to $y=\sqrt{3x+10}$y=3x+10 at the point where $x=-2$x=2

Think: Let's first find the point of contact and then the gradient of the tangent at $x=-2$x=2. Then use the point and gradient to find the equation of the tangent.

Do:

Point of contact: When $x=-2$x=2:

$y$y $=$= $\sqrt{3\left(-2\right)+10}$3(2)+10
  $=$= $\sqrt{4}$4
  $=$= $2$2

Hence, the point of contact is $\left(-2,2\right)$(2,2) 

Gradient of the tangent: When $x=-2$x=2:

$\frac{dy}{dx}$dydx $=$= $\frac{1}{2}\left(3x+10\right)^{\frac{-1}{2}}\times3$12(3x+10)12×3

Derivative of outside function times inside function.

  $=$= $\frac{3}{2\sqrt{3x+10}}$323x+10

Simplify

  $=$= $\frac{3}{2\sqrt{3\left(-2\right)+10}}$323(2)+10

Substitute $x=-2$x=2

  $=$= $\frac{3}{2\sqrt{4}}$324

Simplify

  $=$= $\frac{3}{4}$34

 

Hence, the gradient of the tangent to the curve at $x=-2$x=2 is $m=\frac{3}{4}$m=34.


The equation of the tangent can be found using:

$y-y_1=m\left(x-x_1\right)$yy1=m(xx1)

where $\left(x_1,y_1\right)$(x1,y1) is the point of contact

 
$y-2$y2 $=$= $\frac{3}{4}\left(x+2\right)$34(x+2)
$y$y $=$= $\frac{3}{4}x+3.5$34x+3.5

 

Careful!

Watch out for negatives inside the brackets! Some functions inside the brackets might look like their derivative is $1$1 and will not affect the chain, but in fact is equal to $-1$1.

For example, if $y=\left(2-x\right)^4$y=(2x)4, then $\frac{dy}{dx}=-1\times4\times\left(2-x\right)^3$dydx=1×4×(2x)3

 

Practice questions

Question 5

Find the gradient of $f\left(x\right)=\left(x-5\right)^3$f(x)=(x5)3 at the point $\left(8,27\right)$(8,27).

Denote this gradient by $f'\left(8\right)$f(8).

Question 6

Find the $x$x-coordinate(s) of the point(s) at which $f\left(x\right)=\left(x+2\right)^3$f(x)=(x+2)3 has a gradient of $48$48.

If there is more than one solution, write all the solutions on the same line, separated by commas.

Outcomes

3.2.4.1

select and apply the product rule, quotient rule and chain rule to differentiate functions; express derivatives in simplest and factorised form

What is Mathspace

About Mathspace