๐ŸŒŠ Exponentials, Logs and Trig

A Level Maths Year 2 ยท Differentiation

Level 3 · Ages 17–18

← Back to topic overview
1 Exponential Functions

In Year 1 you met the defining property of $\mathrm{e}$: the gradient of $y = \mathrm{e}^x$ at every point equals its $y$-value. Year 2 extends this to every exponential.

Exponentials
$\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\mathrm{e}^{kx}\right) = k\mathrm{e}^{kx}$     $\dfrac{\mathrm{d}}{\mathrm{d}x}\left(a^{kx}\right) = k\,a^{kx}\ln a$
Why $a^x$ gives $\ln a$. Since $a = \mathrm{e}^{\ln a}$, we can write $a^x = \left(\mathrm{e}^{\ln a}\right)^x = \mathrm{e}^{(\ln a)x}$. This is $\mathrm{e}^{kx}$ with $k = \ln a$, so its derivative is $(\ln a)\,\mathrm{e}^{(\ln a)x} = a^x\ln a$. Only for $a = \mathrm{e}$ is the multiplier $\ln a$ equal to $1$ โ€” that is what makes $\mathrm{e}$ special.
Worked Example 1 โ€” Exponentials with a coefficient in the power

Differentiate $y = 3\mathrm{e}^{2x} - 4\mathrm{e}^{-x/2}$.

โ‘ $\dfrac{\mathrm{d}}{\mathrm{d}x}\left(3\mathrm{e}^{2x}\right) = 3 \times 2\mathrm{e}^{2x} = 6\mathrm{e}^{2x}$
โ‘ก$\dfrac{\mathrm{d}}{\mathrm{d}x}\left(-4\mathrm{e}^{-x/2}\right) = -4 \times \left(-\tfrac12\right)\mathrm{e}^{-x/2} = 2\mathrm{e}^{-x/2}$
โ‘ข$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6\mathrm{e}^{2x} + 2\mathrm{e}^{-x/2}$
Worked Example 2 โ€” Other bases

Find the gradient of $y = 5^x$ at $x = 2$.

โ‘ $\dfrac{\mathrm{d}y}{\mathrm{d}x} = 5^x\ln 5$
โ‘กAt $x = 2$: $25\ln 5 = 40.2$ (3 s.f.)
$\dfrac{\mathrm{d}}{\mathrm{d}x}(5^x)$ is not $x \cdot 5^{x-1}$. The power rule only works when the index is constant and the base varies. Here it is the other way round.
2 The Natural Logarithm
Natural logarithm
$\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\ln x\right) = \dfrac{1}{x}$    $(x > 0)$
Where it comes from. If $y = \ln x$ then $x = \mathrm{e}^y$, so $\dfrac{\mathrm{d}x}{\mathrm{d}y} = \mathrm{e}^y = x$. Turning this upside down (see dy/dx = 1/(dx/dy)) gives $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{x}$.
Use the laws of logs first. $\ln(kx) = \ln k + \ln x$, and $\ln k$ is a constant, so $\dfrac{\mathrm{d}}{\mathrm{d}x}\ln(kx) = \dfrac1x$ for any positive constant $k$. Similarly $\ln\left(x^n\right) = n\ln x$ has derivative $\dfrac{n}{x}$.
Worked Example 3 โ€” Simplify, then differentiate

Differentiate (a) $y = \ln(3x)$  (b) $y = \ln\left(x^4\right)$  (c) $y = \ln\!\left(\dfrac{x^2}{\mathrm{e}}\right)$.

โ‘ (a) $\ln 3 + \ln x$, so $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{x}$.
โ‘ก(b) $4\ln x$, so $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{4}{x}$.
โ‘ข(c) $2\ln x - \ln\mathrm{e} = 2\ln x - 1$, so $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{2}{x}$.
3 Sine and Cosine from First Principles

The derivatives of $\sin x$ and $\cos x$ can be proved from the definition of the derivative, using the compound angle formulae and the small angle approximations. All angles are in radians โ€” the results are false in degrees.

The tools
$\mathrm{f}'(x) = \displaystyle\lim_{h \to 0}\frac{\mathrm{f}(x + h) - \mathrm{f}(x)}{h}$    $\sin h \approx h$,  $\cos h \approx 1 - \dfrac{h^2}{2}$ for small $h$
Worked Example 4 โ€” Proving the derivative of $\sin x$

Prove from first principles that $\dfrac{\mathrm{d}}{\mathrm{d}x}(\sin x) = \cos x$.

โ‘ $\mathrm{f}'(x) = \displaystyle\lim_{h \to 0}\frac{\sin(x + h) - \sin x}{h}$
โ‘กExpand: $\sin(x + h) = \sin x\cos h + \cos x\sin h$, so the numerator is $\sin x(\cos h - 1) + \cos x\sin h$.
โ‘ขFor small $h$: $\cos h - 1 \approx -\dfrac{h^2}{2}$ and $\sin h \approx h$, so the fraction is approximately $\dfrac{-\tfrac12 h^2\sin x + h\cos x}{h} = -\tfrac12 h\sin x + \cos x$.
โ‘ฃAs $h \to 0$, $-\tfrac12 h\sin x \to 0$, leaving $\mathrm{f}'(x) = \cos x$. $\blacksquare$
An equivalent version uses the limits $\dfrac{\sin h}{h} \to 1$ and $\dfrac{\cos h - 1}{h} \to 0$ as $h \to 0$. Either is acceptable; state clearly which results you use.
Worked Example 5 โ€” Proving the derivative of $\cos x$

Prove from first principles that $\dfrac{\mathrm{d}}{\mathrm{d}x}(\cos x) = -\sin x$.

โ‘ $\mathrm{f}'(x) = \displaystyle\lim_{h \to 0}\frac{\cos(x + h) - \cos x}{h}$
โ‘ก$\cos(x + h) = \cos x\cos h - \sin x\sin h$, so the numerator is $\cos x(\cos h - 1) - \sin x\sin h$.
โ‘ขUsing the small angle results: $\dfrac{-\tfrac12 h^2\cos x - h\sin x}{h} = -\tfrac12 h\cos x - \sin x$.
โ‘ฃAs $h \to 0$ this tends to $-\sin x$. $\blacksquare$
x y ฯ€/2 ฯ€ 3ฯ€/2 2ฯ€ โˆ’1 1 y = sin x y = cos x (gradient of sin x)

The diagram confirms the result: where $\sin x$ has a horizontal tangent ($x = \tfrac{\pi}{2}, \tfrac{3\pi}{2}$), $\cos x = 0$; where $\sin x$ is steepest uphill ($x = 0, 2\pi$), $\cos x = 1$.

4 $\sin kx$, $\cos kx$ and $\tan kx$
$y$$\dfrac{\mathrm{d}y}{\mathrm{d}x}$Memory aid
$\sin kx$$k\cos kx$sin โ†’ cos
$\cos kx$$-k\sin kx$cos โ†’ minus sin
$\tan kx$$k\sec^2 kx$from $\tan = \dfrac{\sin}{\cos}$ by the quotient rule
The factor $k$ appears because the inside of the function changes $k$ times as fast as $x$ โ€” this is the chain rule, covered fully in Chain, Product and Quotient Rules. The result for $\tan kx$ is proved there as well.
Worked Example 6 โ€” Trigonometric derivatives

Differentiate $y = 2\sin 3x + \cos\dfrac{x}{2}$.

โ‘ $\dfrac{\mathrm{d}}{\mathrm{d}x}(2\sin 3x) = 2 \times 3\cos 3x = 6\cos 3x$
โ‘ก$\dfrac{\mathrm{d}}{\mathrm{d}x}\left(\cos\tfrac{x}{2}\right) = -\tfrac12\sin\tfrac{x}{2}$
โ‘ข$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6\cos 3x - \tfrac12\sin\dfrac{x}{2}$
Worked Example 7 โ€” A tangent to a tan curve

Find the equation of the tangent to $y = 3\tan 2x$ at the point where $x = \dfrac{\pi}{8}$.

โ‘ $y = 3\tan\dfrac{\pi}{4} = 3$, so the point is $\left(\dfrac{\pi}{8}, 3\right)$.
โ‘ก$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6\sec^2 2x$. At $x = \dfrac{\pi}{8}$: $\sec^2\dfrac{\pi}{4} = \dfrac{1}{\cos^2(\pi/4)} = 2$, so the gradient is $12$.
โ‘ข$y - 3 = 12\left(x - \dfrac{\pi}{8}\right)$, i.e. $y = 12x + 3 - \dfrac{3\pi}{2}$.
5 Using the New Derivatives

Everything from Year 1 โ€” tangents, normals, stationary points, rates of change โ€” now works for these functions too.

Worked Example 8 โ€” A stationary point

Find the stationary point of $y = \mathrm{e}^x - 2x$ and determine its nature.

โ‘ $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \mathrm{e}^x - 2 = 0 \Rightarrow \mathrm{e}^x = 2 \Rightarrow x = \ln 2$.
โ‘ก$y = \mathrm{e}^{\ln 2} - 2\ln 2 = 2 - 2\ln 2$.
โ‘ข$\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = \mathrm{e}^x$, which is $2 > 0$ at $x = \ln 2$: a minimum at $(\ln 2,\ 2 - 2\ln 2)$.
Leave answers in exact form ($\ln 2$, not $0.693$) unless a decimal is asked for โ€” many questions say "give your answer in the form $a + b\ln c$".
Worked Example 9 โ€” Exponential growth

A culture of bacteria has $N = 500\mathrm{e}^{0.2t}$ cells after $t$ hours. Show that $\dfrac{\mathrm{d}N}{\mathrm{d}t} = 0.2N$ and interpret this.

โ‘ $\dfrac{\mathrm{d}N}{\mathrm{d}t} = 500 \times 0.2\,\mathrm{e}^{0.2t} = 0.2 \times 500\mathrm{e}^{0.2t} = 0.2N$.
โ‘กThe rate of growth is proportional to the current size: the more bacteria there are, the faster they multiply. This is the defining feature of exponential models.
6 Quick Reference

$\mathrm{e}^{kx}$

$\to k\mathrm{e}^{kx}$

$a^{kx}$

$\to k\,a^{kx}\ln a$

$\ln x$

$\to \dfrac1x$; and $\ln(kx) \to \dfrac1x$ too.

$\sin kx$

$\to k\cos kx$

$\cos kx$

$\to -k\sin kx$

$\tan kx$

$\to k\sec^2 kx$

Radians

The trig results only hold in radians.

First principles

Compound angle formula, then $\sin h \approx h$, $\cos h \approx 1 - \tfrac12 h^2$.

Logs first

Use log laws to simplify before differentiating.

7 Practice Questions
Question 1

Differentiate (a) $4\mathrm{e}^{3x}$  (b) $\mathrm{e}^{-5x}$  (c) $\dfrac{2}{\mathrm{e}^{x}}$.

โ–ถ Show solution

(a) $12\mathrm{e}^{3x}$   (b) $-5\mathrm{e}^{-5x}$

(c) Rewrite as $2\mathrm{e}^{-x}$; derivative $-2\mathrm{e}^{-x}$.

Question 2

Find the gradient of $y = 2^x$ at $x = 3$, giving an exact answer and a decimal to $3$ s.f.

โ–ถ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2^x\ln 2$. At $x = 3$: $8\ln 2 = 5.55$ (3 s.f.).

Question 3

Differentiate $y = \ln(5x) + \ln\left(x^2\right)$.

โ–ถ Show solution

$y = \ln 5 + \ln x + 2\ln x = \ln 5 + 3\ln x$.

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{3}{x}$.

Question 4

Differentiate $y = \sin 4x - 3\cos 2x$.

โ–ถ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 4\cos 4x - 3(-2\sin 2x) = 4\cos 4x + 6\sin 2x$.

Question 5

Differentiate $y = \tan\dfrac{x}{3}$, and find the gradient at $x = \dfrac{3\pi}{4}$.

โ–ถ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac13\sec^2\dfrac{x}{3}$.

At $x = \dfrac{3\pi}{4}$: $\sec^2\dfrac{\pi}{4} = 2$, so the gradient is $\dfrac23$.

Question 6

Find the gradient of $y = 3\sin 2x$ at $x = \dfrac{\pi}{6}$, and the equation of the normal there.

โ–ถ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6\cos 2x$; at $x = \dfrac{\pi}{6}$, $6\cos\dfrac{\pi}{3} = 3$.

The point: $y = 3\sin\dfrac{\pi}{3} = \dfrac{3\sqrt3}{2}$.

Normal gradient $-\dfrac13$:  $y - \dfrac{3\sqrt3}{2} = -\dfrac13\left(x - \dfrac{\pi}{6}\right)$.

Question 7

Find the exact coordinates of the stationary point of $y = 4x - \mathrm{e}^{2x}$ and show that it is a maximum.

โ–ถ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 4 - 2\mathrm{e}^{2x} = 0 \Rightarrow \mathrm{e}^{2x} = 2 \Rightarrow x = \tfrac12\ln 2$.

$y = 4 \times \tfrac12\ln 2 - 2 = 2\ln 2 - 2$.

$\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = -4\mathrm{e}^{2x} = -8 < 0$ there, so it is a maximum at $\left(\tfrac12\ln 2,\ 2\ln 2 - 2\right)$.

Question 8

Find the equation of the tangent to $y = \ln x$ at $x = \mathrm{e}$, and show that it passes through the origin.

โ–ถ Show solution

Point: $(\mathrm{e}, 1)$. Gradient: $\dfrac{1}{\mathrm{e}}$.

$y - 1 = \dfrac{1}{\mathrm{e}}(x - \mathrm{e}) \Rightarrow y = \dfrac{x}{\mathrm{e}} - 1 + 1 = \dfrac{x}{\mathrm{e}}$.

When $x = 0$, $y = 0$, so the tangent passes through the origin.

Question 9

Using the small angle approximations, prove from first principles that the derivative of $\sin 2x$ is $2\cos 2x$.

โ–ถ Show solution

$\mathrm{f}'(x) = \displaystyle\lim_{h \to 0}\frac{\sin(2x + 2h) - \sin 2x}{h}$.

$\sin(2x + 2h) = \sin 2x\cos 2h + \cos 2x\sin 2h$.

For small $h$: $\cos 2h \approx 1 - \dfrac{(2h)^2}{2} = 1 - 2h^2$ and $\sin 2h \approx 2h$.

So the fraction $\approx \dfrac{\sin 2x(-2h^2) + \cos 2x(2h)}{h} = -2h\sin 2x + 2\cos 2x$.

As $h \to 0$ this tends to $2\cos 2x$. $\blacksquare$

Question 10

The population of a town is modelled by $P = 20\,000\,\mathrm{e}^{0.03t}$, where $t$ is the time in years.

(a) Find $\dfrac{\mathrm{d}P}{\mathrm{d}t}$ and show that it equals $0.03P$.
(b) Find the rate of growth when $t = 10$, to the nearest whole number.
(c) Find the value of $t$ at which the population is growing at $1000$ people per year.

โ–ถ Show solution

(a) $\dfrac{\mathrm{d}P}{\mathrm{d}t} = 20\,000 \times 0.03\,\mathrm{e}^{0.03t} = 600\mathrm{e}^{0.03t} = 0.03P$.

(b) $600\mathrm{e}^{0.3} = 809.9\ldots \approx 810$ people per year.

(c) $600\mathrm{e}^{0.03t} = 1000 \Rightarrow \mathrm{e}^{0.03t} = \dfrac53 \Rightarrow t = \dfrac{\ln(5/3)}{0.03} = 17.0$ years (3 s.f.).

(At that moment $P = 1000 \div 0.03 \approx 33\,300$.)

Exponentials, Logs and Trig · A Level Maths Year 2 · Created with MathJax