๐ŸŒก๏ธ Differential Equations

A Level Maths Year 2 ยท Integration

Level 3 · Ages 17–18

← Back to topic overview
1 What a Differential Equation Is
A differential equation is an equation involving a derivative, such as $\dfrac{dy}{dx} = 6x^2y$. Solving it means finding $y$ as a function of $x$ โ€” not a number. A first-order equation contains only the first derivative.

Differential equations are how most real situations are described: we often know how fast something is changing long before we know a formula for the thing itself.

Statement in wordsDifferential equation
A population $P$ grows at a rate proportional to its size.$\dfrac{dP}{dt} = kP$,  $k > 0$
The mass $m$ of a substance decreases at a rate proportional to the mass.$\dfrac{dm}{dt} = -km$,  $k > 0$
A body at temperature $\theta$ cools at a rate proportional to the difference between its temperature and the room temperature $20^\circ$C.$\dfrac{d\theta}{dt} = -k(\theta - 20)$
The volume $V$ of water in a tank decreases at a rate proportional to the square root of the volume.$\dfrac{dV}{dt} = -k\sqrt{V}$
Forming the equation: "rate of change of $y$" means $\dfrac{dy}{dt}$; "proportional to" means "$= k \times$"; "decreasing" means you write the minus sign explicitly, so that $k$ itself is positive.
2 Separating the Variables

At A Level every differential equation you solve is separable: the right-hand side factorises into a function of $x$ times a function of $y$.

Separation of variables
$\dfrac{dy}{dx} = \mathrm{f}(x)\,\mathrm{g}(y) \quad\Longrightarrow\quad \displaystyle\int\frac{1}{\mathrm{g}(y)}\,dy = \int\mathrm{f}(x)\,dx$
  1. Get all the $y$ terms (with $dy$) on one side, all the $x$ terms (with $dx$) on the other.
  2. Integrate both sides. Write one constant $c$, on the $x$ side.
  3. Use any given condition to find $c$.
  4. Rearrange into the form $y = \ldots$ if asked.
Worked Example 1 โ€” General solution

Find the general solution of $\dfrac{dy}{dx} = 6x^2y$, $y > 0$.

โ‘ Separate: $\displaystyle\int\frac{1}{y}\,dy = \int 6x^2\,dx$
โ‘ก$\ln y = 2x^3 + c$
โ‘ข$y = e^{2x^3 + c} = e^c \cdot e^{2x^3}$
โ‘ฃLet $A = e^c$:  $y = Ae^{2x^3}$
$e^{a + c}$ is $e^a \times e^c$, not $e^a + e^c$. Replacing $e^c$ by a new constant $A$ is the standard tidy-up.
Worked Example 2 โ€” Particular solution

Solve $\dfrac{dy}{dx} = y\cos x$, given $y = 3$ when $x = 0$.

โ‘ $\displaystyle\int\frac{1}{y}\,dy = \int\cos x\,dx \Rightarrow \ln y = \sin x + c$
โ‘ก$x = 0$, $y = 3$: $\ln 3 = 0 + c$, so $c = \ln 3$.
โ‘ข$\ln y = \sin x + \ln 3 \Rightarrow y = e^{\sin x}\cdot e^{\ln 3} = 3e^{\sin x}$
Worked Example 3 โ€” Leaving the answer implicit

Solve $\dfrac{dy}{dx} = \dfrac{x+1}{y^2}$, given $y = 2$ when $x = 0$.

โ‘ $\displaystyle\int y^2\,dy = \int(x+1)\,dx \Rightarrow \tfrac{1}{3}y^3 = \tfrac{1}{2}x^2 + x + c$
โ‘ก$x = 0$, $y = 2$: $\tfrac{8}{3} = c$.
โ‘ขMultiply by $3$: $y^3 = \tfrac{3}{2}x^2 + 3x + 8$, so $y = \sqrt[3]{\tfrac{3}{2}x^2 + 3x + 8}$.
Worked Example 4 โ€” Exponentials on both sides

Solve $\dfrac{dy}{dx} = e^{2x - y}$, given $y = 0$ when $x = 0$.

โ‘ $e^{2x - y} = e^{2x}e^{-y}$, so $\displaystyle\int e^y\,dy = \int e^{2x}\,dx$.
โ‘ก$e^y = \tfrac{1}{2}e^{2x} + c$.  At $(0, 0)$: $1 = \tfrac{1}{2} + c$, $c = \tfrac{1}{2}$.
โ‘ข$e^y = \tfrac{1}{2}\left(e^{2x} + 1\right) \Rightarrow y = \ln\left(\dfrac{e^{2x}+1}{2}\right)$
Find $c$ before you rearrange when the constant ends up inside an exponential or a power โ€” and never write $\ln y = \sin x + c$ as $y = e^{\sin x} + c$.
3 Separating with Partial Fractions

After separating, the $y$-integral is sometimes a fraction that needs partial fractions. This is how logistic growth โ€” growth that levels off โ€” is modelled.

Worked Example 5 โ€” A limited growth model

Solve $\dfrac{dx}{dt} = x(3 - x)$, given $x = 1$ when $t = 0$, and describe what happens to $x$ in the long term.

โ‘ $\displaystyle\int\frac{1}{x(3-x)}\,dx = \int 1\,dt$, and $\dfrac{1}{x(3-x)} \equiv \dfrac{1}{3}\left(\dfrac{1}{x} + \dfrac{1}{3-x}\right)$.
โ‘ก$\tfrac{1}{3}\left[\ln x - \ln(3 - x)\right] = t + c$  (for $0 < x < 3$; note $\int\frac{1}{3-x}dx = -\ln(3-x)$).
โ‘ข$t = 0$, $x = 1$: $\tfrac{1}{3}\ln\tfrac{1}{2} = c$. So $\ln\dfrac{x}{3-x} = 3t + \ln\tfrac{1}{2}$.
โ‘ฃ$\dfrac{x}{3-x} = \tfrac{1}{2}e^{3t} \Rightarrow 2x = (3 - x)e^{3t} \Rightarrow x\left(2 + e^{3t}\right) = 3e^{3t}$
โ‘ค$x = \dfrac{3e^{3t}}{2 + e^{3t}} = \dfrac{3}{1 + 2e^{-3t}}$
โ‘ฅAs $t \to \infty$, $e^{-3t} \to 0$ so $x \to 3$: the quantity levels off at $3$.
4 Modelling and Interpreting Solutions
In a modelling question you usually have two unknown constants โ€” the constant of integration and the constant of proportionality $k$ โ€” so you need two pieces of information, typically the starting value and one later value.
Worked Example 6 โ€” Newton's law of cooling

A cup of tea at $90^\circ$C is left in a room at $20^\circ$C. Its temperature $\theta$ after $t$ minutes satisfies $\dfrac{d\theta}{dt} = -k(\theta - 20)$. After $5$ minutes it is $60^\circ$C. (a) Find $\theta$ in terms of $t$. (b) Find when it reaches $30^\circ$C.

โ‘ $\displaystyle\int\frac{1}{\theta - 20}\,d\theta = \int -k\,dt \Rightarrow \ln(\theta - 20) = -kt + c$
โ‘ก$\theta - 20 = Ae^{-kt}$.  $t = 0$: $70 = A$, so $\theta = 20 + 70e^{-kt}$.
โ‘ข$t = 5$: $40 = 70e^{-5k} \Rightarrow e^{-5k} = \tfrac{4}{7} \Rightarrow k = \tfrac{1}{5}\ln\tfrac{7}{4} \approx 0.112$.
โ‘ฃ(b) $30 = 20 + 70e^{-kt} \Rightarrow e^{-kt} = \tfrac{1}{7} \Rightarrow t = \dfrac{\ln 7}{k} = \dfrac{5\ln 7}{\ln(7/4)}$
โ‘ค$t \approx 17.4$ minutes.
Interpret: as $t \to \infty$, $\theta \to 20$ โ€” the tea approaches room temperature but, in this model, never quite reaches it.
Worked Example 7 โ€” A draining tank, and where the model breaks

The volume $V$ litres in a tank satisfies $\dfrac{dV}{dt} = -k\sqrt{V}$. Initially $V = 100$, and after $10$ minutes $V = 64$. Find when the tank is empty.

โ‘ $\displaystyle\int V^{-1/2}\,dV = \int -k\,dt \Rightarrow 2\sqrt{V} = -kt + c$
โ‘ก$t = 0$: $2(10) = c = 20$.  $t = 10$: $2(8) = -10k + 20 \Rightarrow k = 0.4$.
โ‘ข$2\sqrt{V} = 20 - 0.4t$, so $\sqrt{V} = 10 - 0.2t$ and $V = (10 - 0.2t)^2$.
โ‘ฃEmpty when $10 - 0.2t = 0$, i.e. $t = 50$ minutes.
The formula $V = (10 - 0.2t)^2$ starts increasing again after $t = 50$, which is impossible for a draining tank. The model is only valid for $0 \leqslant t \leqslant 50$ โ€” say so when asked to comment.
Typical "evaluate the model" comments: does the long-term behaviour make sense? Is the rate realistic at the start and the end? Is the quantity continuous (e.g. a population is really whole numbers)? Are conditions such as room temperature really constant?
5 Quick Reference

Proportional

"Rate $\propto y$" $\Rightarrow \dfrac{dy}{dt} = ky$.

Separate

$\int\dfrac{1}{\mathrm{g}(y)}\,dy = \int\mathrm{f}(x)\,dx$

One constant

Only one $+\,c$, on the $x$ side.

General solution

Contains an arbitrary constant โ€” a family of curves.

Particular solution

Constant fixed by a given condition.

ln y = f(x) + c

$y = Ae^{\mathrm{f}(x)}$ with $A = e^c$.

Growth / decay

$\dfrac{dy}{dt} = ky \Rightarrow y = y_0e^{kt}$

Cooling

$\dfrac{d\theta}{dt} = -k(\theta - \theta_0) \Rightarrow \theta = \theta_0 + Ae^{-kt}$

Two unknowns

Need two conditions to find $c$ and $k$.

Interpret

Long-term value, validity range, limitations.

6 Practice Questions
Question 1

The rate at which the radius $r$ cm of a circular ink blot increases is inversely proportional to the radius. Write down a differential equation for $r$ in terms of the time $t$ seconds.

โ–ถ Show solution

"Inversely proportional to $r$" means $= \dfrac{k}{r}$.

$\dfrac{dr}{dt} = \dfrac{k}{r}$, where $k$ is a positive constant.

Question 2

Solve $\dfrac{dy}{dx} = 3y$, given $y = 5$ when $x = 0$.

โ–ถ Show solution

$\displaystyle\int\frac{1}{y}\,dy = \int 3\,dx \Rightarrow \ln y = 3x + c \Rightarrow y = Ae^{3x}$.

$x = 0$: $A = 5$.  $y = 5e^{3x}$

Question 3

Solve $\dfrac{dy}{dx} = \dfrac{x}{y}$, given $y = 3$ when $x = 0$, giving $y$ in terms of $x$.

โ–ถ Show solution

$\displaystyle\int y\,dy = \int x\,dx \Rightarrow \tfrac{1}{2}y^2 = \tfrac{1}{2}x^2 + c$.

$x = 0$, $y = 3$: $c = \tfrac{9}{2}$. So $y^2 = x^2 + 9$.

Since $y = 3 > 0$ at the start, take the positive root: $y = \sqrt{x^2 + 9}$.

Question 4

Solve $\dfrac{dy}{dx} = y\sin x$, given $y = 1$ when $x = 0$.

โ–ถ Show solution

$\ln y = -\cos x + c$.  $x = 0$, $y = 1$: $0 = -1 + c$, $c = 1$.

$\ln y = 1 - \cos x \Rightarrow y = e^{1 - \cos x}$

Question 5

Solve $\dfrac{dy}{dx} = 2xy^2$, given $y = 1$ when $x = 1$.

โ–ถ Show solution

$\displaystyle\int y^{-2}\,dy = \int 2x\,dx \Rightarrow -\frac{1}{y} = x^2 + c$.

$x = 1$, $y = 1$: $-1 = 1 + c$, $c = -2$.

$-\dfrac{1}{y} = x^2 - 2 \Rightarrow y = \dfrac{1}{2 - x^2}$

Question 6

Given that $x > 0$, solve $\dfrac{dy}{dx} = \dfrac{y}{x(x+1)}$ with $y = 2$ when $x = 1$.

โ–ถ Show solution

$\displaystyle\int\frac{1}{y}\,dy = \int\frac{1}{x(x+1)}\,dx$, and $\dfrac{1}{x(x+1)} \equiv \dfrac{1}{x} - \dfrac{1}{x+1}$.

$\ln y = \ln x - \ln(x+1) + c = \ln\dfrac{x}{x+1} + c \Rightarrow y = \dfrac{Ax}{x+1}$

$x = 1$, $y = 2$: $2 = \tfrac{A}{2}$, $A = 4$.  $y = \dfrac{4x}{x+1}$

Question 7

A radioactive substance decays at a rate proportional to the amount $N$ present. Its half-life is $8$ days. How long does it take for the amount to fall to $10\%$ of its initial value?

โ–ถ Show solution

$\dfrac{dN}{dt} = -kN \Rightarrow N = N_0e^{-kt}$.

Half-life: $\tfrac{1}{2} = e^{-8k} \Rightarrow k = \dfrac{\ln 2}{8}$.

$0.1 = e^{-kt} \Rightarrow t = \dfrac{\ln 10}{k} = \dfrac{8\ln 10}{\ln 2} \approx 26.6$ days.

Question 8

A coffee at $85^\circ$C is placed in a room at $20^\circ$C, and $\dfrac{d\theta}{dt} = -k(\theta - 20)$. After $10$ minutes it is $55^\circ$C. Find the exact temperature after $20$ minutes, then give it to 1 decimal place.

โ–ถ Show solution

$\theta = 20 + Ae^{-kt}$; $t = 0$ gives $A = 65$.

$t = 10$: $35 = 65e^{-10k} \Rightarrow e^{-10k} = \tfrac{7}{13}$.

$t = 20$: $e^{-20k} = \left(e^{-10k}\right)^2 = \tfrac{49}{169}$, so $\theta = 20 + 65 \times \tfrac{49}{169} = 20 + \tfrac{245}{13} = \tfrac{505}{13}$.

$\theta \approx 38.8^\circ$C. (Notice $k$ never needed to be found.)

Question 9

The depth $h$ m of water in a tank satisfies $\dfrac{dh}{dt} = -0.2\sqrt{h}$, where $t$ is in minutes, and initially $h = 9$. (a) Find $h$ in terms of $t$. (b) Find when the tank empties. (c) State the range of $t$ for which your formula is valid.

โ–ถ Show solution

(a) $\displaystyle\int h^{-1/2}\,dh = \int -0.2\,dt \Rightarrow 2\sqrt{h} = -0.2t + c$.  $t = 0$: $c = 6$.

$\sqrt{h} = 3 - 0.1t \Rightarrow h = (3 - 0.1t)^2$

(b) $3 - 0.1t = 0 \Rightarrow t = 30$ minutes.

(c) $0 \leqslant t \leqslant 30$; beyond this the formula would predict the depth rising again.

Question 10

A population of $P$ rabbits on an island is modelled by $\dfrac{dP}{dt} = \dfrac{P(500 - P)}{1000}$, where $t$ is in years. Initially there are $100$ rabbits.

(a) Express $\dfrac{1}{P(500-P)}$ in partial fractions.   (b) Show that $P = \dfrac{500}{1 + 4e^{-t/2}}$.   (c) Find the exact time at which the population reaches $250$, and give it to 3 significant figures.   (d) State what the model predicts in the long term, and give one limitation of the model.

โ–ถ Show solution

(a) $1 \equiv A(500 - P) + BP$.  $P = 0$: $A = \tfrac{1}{500}$.  $P = 500$: $B = \tfrac{1}{500}$.

$\dfrac{1}{P(500-P)} \equiv \dfrac{1}{500}\left(\dfrac{1}{P} + \dfrac{1}{500 - P}\right)$

(b) $\displaystyle\int\frac{1000}{P(500-P)}\,dP = \int 1\,dt \Rightarrow 2\left[\ln P - \ln(500 - P)\right] = t + c$

$t = 0$, $P = 100$: $c = 2\ln\tfrac{100}{400} = 2\ln\tfrac{1}{4}$.

$\ln\dfrac{P}{500 - P} = \dfrac{t}{2} + \ln\tfrac{1}{4} \Rightarrow \dfrac{P}{500-P} = \tfrac{1}{4}e^{t/2}$

$4P = (500 - P)e^{t/2} \Rightarrow P\left(4 + e^{t/2}\right) = 500e^{t/2} \Rightarrow P = \dfrac{500e^{t/2}}{4 + e^{t/2}} = \dfrac{500}{1 + 4e^{-t/2}}$ โœ“

(c) $250 = \dfrac{500}{1 + 4e^{-t/2}} \Rightarrow 1 + 4e^{-t/2} = 2 \Rightarrow e^{-t/2} = \tfrac{1}{4}$

$t = 2\ln 4 = 4\ln 2 \approx 2.77$ years.

(d) As $t \to \infty$, $P \to 500$: the population levels off at $500$ (the most the island can support). Limitations: the model treats $P$ as continuous although rabbits are whole numbers, and it ignores events such as disease, predators or seasonal breeding.

Differential Equations · A Level Maths Year 2 · Created with MathJax