First-order differential equations

A-Level Mathematics · Vectors and Differential Equations

Separating the variables

If $\dfrac{dy}{dx}=f(x)g(y)$ then

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

One arbitrary constant, added once, on either side. A boundary condition turns the general solution into a particular solution.

Forming a differential equation

Long-term behaviour

As $t\to\infty$, $e^{-kt}\to 0$ for $k>0$. Reading the limit off the solution is usually worth a mark on its own, and it also checks the model: a cooling body must tend to room temperature, not to zero.

x = 5 (saturation value) starts below the ceiling: rises, then slows starts above the ceiling: falls to exactly that ceiling t x
Why the ceiling of the model can be read off without solving. For $\dfrac{dx}{dt}=kx(5-x)$, the right-hand side equals $0$ when $x=0$ or $x=5$ — these are the two steady states. Starting from any positive value, the solution curve creeps toward $x=5$: from below it rises and slows down, from above it falls and slows down. In other words, the long-term limit is the solution of the equation right-hand side equals zero, not the result of integrating — and the exam question "state the limiting value" can be answered in three seconds this way.

Worked example: logistic differential equation

A population $x$ (thousands of individuals) satisfies $\dfrac{dx}{dt}=0.2\,x(5-x)$, with $x=1$ when $t=0$. Find $x$ in terms of $t$, and state the limiting value as $t\to\infty$.

Solution

Step 1 — separate the variables.

$$\int\frac{1}{x(5-x)}\,dx=\int 0.2\,dt$$

Step 2 — partial fractions. Let $\dfrac{1}{x(5-x)}\equiv\dfrac{A}{x}+\dfrac{B}{5-x}$, giving $1\equiv A(5-x)+Bx$. Substituting $x=0$ gives $A=\dfrac{1}{5}$; substituting $x=5$ gives $B=\dfrac{1}{5}$.

$$\frac{1}{5}\int\left(\frac{1}{x}+\frac{1}{5-x}\right)dx=\int 0.2\,dt$$$$\frac{1}{5}\Big[\ln x-\ln(5-x)\Big]=0.2t+c$$

Note the minus sign on the second term: the antiderivative of $\dfrac{1}{5-x}$ is $-\ln(5-x)$ because the inner derivative is $-1$.

Step 3 — use the initial condition now. Multiply both sides by $5$:

$$\ln\frac{x}{5-x}=t+C$$

At $t=0$, $x=1$: $\ln\dfrac{1}{4}=C$. So

$$\frac{x}{5-x}=\frac{1}{4}e^{t}\;\Longrightarrow\;4x=(5-x)e^{t}\;\Longrightarrow\;x=\frac{5e^{t}}{4+e^{t}}$$

Step 4 — the limit. Divide numerator and denominator by $e^{t}$: $x=\dfrac{5}{4e^{-t}+1}\to 5$ as $t\to\infty$.

The limit $5$ matches the steady state read directly from the original equation — that is the final check, and it catches every sign error in the integration step.

Worked example: Newton's law of cooling

An object at $80^{\circ}$C is placed in a room at $20^{\circ}$C. After $5$ minutes the object's temperature is $65^{\circ}$C. Find the object's temperature after $15$ minutes.

Solution

Step 1 — form the equation. The rate of cooling is proportional to the difference from the surroundings:

$$\frac{d\theta}{dt}=-k(\theta-20),\qquad k>0$$

Step 2 — separate the variables and solve.

$$\int\frac{d\theta}{\theta-20}=-\int k\,dt\;\Longrightarrow\;\ln(\theta-20)=-kt+c$$$$\theta-20=Ae^{-kt}$$

Step 3 — two conditions, two constants. At $t=0$, $\theta=80$: $A=60$. At $t=5$, $\theta=65$:

$$45=60e^{-5k}\;\Longrightarrow\;e^{-5k}=0.75$$

Step 4 — use powers instead of calculating $k$. After $15$ minutes:

$$\theta-20=60e^{-15k}=60\left(e^{-5k}\right)^{3}=60(0.75)^{3}=60(0.421875)=25.3$$$$\theta=45.3^{\circ}\text{C}$$

There is no need to calculate $k$ at all. Recognizing $e^{-15k}=\left(e^{-5k}\right)^{3}$ is both faster and avoids rounding error — and that error is what tends to shift the last decimal digit of the answer.

Common mistake

Putting the minus sign into the constant $k$ and then writing another minus sign in the equation. The question says "the temperature decreases at a rate proportional to the difference", and the correct form is $\dfrac{d\theta}{dt}=-k(\theta-20)$ with $k>0$. Anyone who treats $k$ as already carrying a negative sign and then writes $\dfrac{d\theta}{dt}=-k(\theta-20)$ again is actually describing an object that heats up without limit — and the solution comes out as $\theta=20+60e^{+kt}$, that is, an object in a $20^{\circ}$C room whose temperature rises forever. That is exactly the way to catch it: after solving, try a very large $t$ and ask whether the result makes physical sense. A cooling model must approach room temperature, a decay model must approach $0$, a model with a ceiling must approach the ceiling.

Key takeaway

Differential equations in Paper 3 are marked at both ends: forming the equation from the wording, and interpreting the meaning of the solution. The middle part — separating variables and integrating — is a technique learned in the previous chapter. Anyone who practices the middle and skips both ends can do exercises but cannot do the exam paper.

← Lines in three dimensions · All A-Level Mathematics lessons · Practice A-Level Mathematics questions (free, instant scoring) · Arithmetic, conjugates and polynomial roots →