topic badge
iGCSE (2021 Edition)

11.19 Differentiating composite functions

Lesson

In routine problems requiring differentiation, we can make use of several previously established rules for differentiating various types of functions. It is important, however, to keep in mind the meaning of the derivative as the function that gives the rate of change or gradient of the original function at each point in the domain.

In practice, we make great use of the facts that:

  • The derivative of a sum is the sum of the separate derivatives
  • The derivative of a constant multiple of a function is the constant multiple multiplied by the derivative of the function

A summary of the main rules that we have established is below:

Rules of differentiation
  • Product rule: If $y=uv$y=uv, then $y'=uv'+vu'$y=uv+vu
  • Quotient rule: If $y=\frac{u}{v}$y=uv, then $y'=\frac{vu'-uv'}{v^2}$y=vuuvv2
  • Chain rule (sometimes called the function-of-a-function rule): If $y=g\left(u\right)$y=g(u), where $u=f\left(x\right)$u=f(x), then we can write $\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\mathrm{d}y}{\mathrm{d}u}\cdot\frac{\mathrm{d}u}{\mathrm{d}x}$dydx=dydu·dudx
    • In the specific case where $y=f\left(x\right)^n$y=f(x)n, then we have $\frac{\mathrm{d}y}{\mathrm{d}x}\ =\ n\ f'\left(x\right)\ f\left(x\right)^{n-1}$dydx = n f(x) f(x)n1

We have also previously found the derivatives of a number of special functions:

Derivatives of special functions
$\frac{\mathrm{d}}{\mathrm{d}x}e^{f\left(x\right)}$ddxef(x) $=$= $f'\left(x\right)\ e^{f\left(x\right)}$f(x) ef(x)
$\frac{\mathrm{d}}{\mathrm{d}x}a^{f\left(x\right)}$ddxaf(x) $=$= $\ln a\ f'\left(x\right)\ a^{f\left(x\right)}$lna f(x) af(x)
$\frac{\mathrm{d}}{\mathrm{d}x}\ln\left(f\left(x\right)\right)$ddxln(f(x)) $=$= $\frac{f'\left(x\right)}{f\left(x\right)}$f(x)f(x)
$\frac{\mathrm{d}}{\mathrm{d}x}\log_a\left(f\left(x\right)\right)$ddxloga(f(x)) $=$= $\frac{f'\left(x\right)}{\ln a\ f\left(x\right)}$f(x)lna f(x)
$\frac{\mathrm{d}}{\mathrm{d}x}\sin\left(f\left(x\right)\right)$ddxsin(f(x)) $=$= $f'\left(x\right)\cos\left(f\left(x\right)\right)$f(x)cos(f(x))
$\frac{\mathrm{d}}{\mathrm{d}x}\cos\left(f\left(x\right)\right)$ddxcos(f(x)) $=$= $-f'\left(x\right)\sin\left(f\left(x\right)\right)$f(x)sin(f(x))
$\frac{\mathrm{d}}{\mathrm{d}x}\tan\left(f\left(x\right)\right)$ddxtan(f(x)) $=$= $f'\left(x\right)\sec^2\left(f\left(x\right)\right)$f(x)sec2(f(x))

Worked examples

Example 1

Find the derivative of $\sin\left(\ln x\right)$sin(lnx).

Think: This expression is a function of another function, so to differentiate it we will be able to use the chain rule. It may be helpful to think of the "inside" function $\ln$ln and the "outside" function $\sin$sin.

Do: We differentiate the outside function first, still evaluated at $\ln x$lnx, and then multiply by the derivative of the inside function.

So for $f\left(x\right)=\sin\left(\ln x\right)$f(x)=sin(lnx), we have

$f'\left(x\right)=\cos\left(\ln x\right)\left(\frac{1}{x}\right)$f(x)=cos(lnx)(1x)

Example 2

Find the derivative of the function $f\left(x\right)=\left(x+\sin x\right)^{\frac{3}{2}}$f(x)=(x+sinx)32 and calculate the gradient of $f$f at $x=0$x=0, $x=\frac{\pi}{4}$x=π4 and $x=\frac{\pi}{2}$x=π2.

Solution: First, we differentiate the power function to obtain:

$\frac{3}{2}\left(x+\sin x\right)^{\frac{1}{2}}$32(x+sinx)12

Then, we differentiate the inside function to obtain:

$1+\cos x$1+cosx

Finally, we have:

$f'\left(x\right)=\frac{3}{2}\left(x+\sin x\right)^{\frac{1}{2}}\left(1+\cos x\right)$f(x)=32(x+sinx)12(1+cosx)

We calculate:

$f'\left(0\right)=\frac{3}{2}\left(0+\sin0\right)^{\frac{1}{2}}\left(1+\cos0\right)=0$f(0)=32(0+sin0)12(1+cos0)=0

Next:

$f'\left(\frac{\pi}{4}\right)=\frac{3}{2}\left(\frac{\pi}{4}+\sin\frac{\pi}{4}\right)^{\frac{1}{2}}\left(1+\cos\frac{\pi}{4}\right)=\frac{3}{2}\sqrt{\frac{\pi}{4}+\frac{1}{\sqrt{2}}}\left(1+\frac{1}{\sqrt{2}}\right)\approx3.128$f(π4)=32(π4+sinπ4)12(1+cosπ4)=32π4+12(1+12)3.128

And lastly:

$f'\left(\frac{\pi}{2}\right)=\frac{3}{2}\left(\frac{\pi}{2}+\sin\frac{\pi}{2}\right)^{\frac{1}{2}}\left(1+\cos\frac{\pi}{2}\right)=\frac{3}{2}\sqrt{\frac{\pi}{2}+1}\approx2.405$f(π2)=32(π2+sinπ2)12(1+cosπ2)=32π2+12.405

Example 3

Find the gradient of $f\left(x\right)=e^{-x}\left(x^3-1\right)$f(x)=ex(x31) at $x=1$x=1.

Solution: Using the product rule and the function-of-a-function rule, we have:

$f'\left(x\right)=(-1)e^{-x}\left(x^3-1\right)+e^{-x}\left(3x^2\right)$f(x)=(1)ex(x31)+ex(3x2)

This can be written more tidily as

$f'\left(x\right)=e^{-x}\left(1+3x^2-x^3\right)$f(x)=ex(1+3x2x3),

and so we have

$f'\left(1\right)=e^{-1}\times3=\frac{3}{e}\approx1.1$f(1)=e1×3=3e1.1.

Practice questions

Question 1

Differentiate $y=\sin\left(x\right)e^x$y=sin(x)ex. Give your answer in factorised form.

Question 2

Find the derivative of $y=\cos\left(\ln x\right)$y=cos(lnx).

Question 3

Find the derivative of $\ln\left(\sin x\right)$ln(sinx).

Outcomes

0606C14.3B

Use the derivatives of the standard functions sinx, cos x, tan x, together with constant multiples, sums and composite functions.

0606C14.3C

Use the derivatives of the standard functions e^x, ln x, together with constant multiples, sums and composite functions.

What is Mathspace

About Mathspace