Differential Equations (AHL 5.18) is a self-contained but compact topic in IB Mathematics Analysis & Approaches HL. It bundles four solution techniques (separable, integrating factor, homogeneous substitution, Euler's method), one numerical procedure, and a handful of recurring real-world models — exponential growth, Newton's law of cooling, the logistic equation, mixing problems, and population with migration. Despite the small footprint, the topic is examined nearly every session, and it carries serious weight on Paper 3.
The challenge is rarely the integration itself — it is correctly identifying which type of DE you have and matching it to the right technique. Get that wrong and you waste 15 minutes attacking a homogeneous equation as if it were separable. This cheatsheet condenses the entire AHL 5.18 syllabus, with a decision table at the start, the full method for each technique, and the top traps that cost marks every session.
§1 — Identifying the DE Type AHL 5.18
Decision table
| Form | Type | Method |
|---|---|---|
| $\dfrac{dy}{dx} = f(x) \cdot g(y)$ | Separable | Separate & integrate both sides |
| $\dfrac{dy}{dx} + P(x) y = Q(x)$ | Linear (1st order) | Integrating factor $\mu = e^{\int P\,dx}$ |
| $\dfrac{dy}{dx} = f\!\left(\dfrac{y}{x}\right)$ | Homogeneous | Substitution $y = vx$ |
| Any $\dfrac{dy}{dx} = f(x, y)$ | Numerical | Euler's method |
§2 — Variables Separable AHL 5.18
Method
- Rearrange: $\dfrac{1}{g(y)}\,dy = f(x)\,dx$.
- Integrate both sides.
- Write $+ C$ on one side only.
- Apply the initial condition (IC) to find $C$.
- Solve for $y$ if required.
Equilibrium solutions: set $g(y) = 0$ before separating. These are constant solutions that the standard method misses (because it requires dividing by $g(y)$).
Key results
- $y' = ky \Rightarrow y = A e^{kx}$
- $y' = k(y - T) \Rightarrow y = T + A e^{kx}$
- Logistic: $P' = kP(a - P) \Rightarrow P = \dfrac{a}{1 + B e^{-akt}}$, where $B = \dfrac{a - P_0}{P_0}$ and the carrying capacity is $a$.
- Newton's law of cooling: $T' = k(T - T_0) \Rightarrow T = T_0 + A e^{kt}$, with $k < 0$ for cooling.
§3 — Integrating Factor AHL 5.18
Formula & steps
Standard form: $\dfrac{dy}{dx} + P(x)\, y = Q(x)$. The integrating factor is $\mu = e^{\int P(x)\,dx}$ (no $+ C$ here).
- Divide through so the coefficient of $y'$ is $1$.
- Compute $\mu = e^{\int P\,dx}$.
- Multiply both sides by $\mu$.
- The LHS now equals $\dfrac{d}{dx}(\mu y)$ — verify by expanding.
- Integrate: $\mu y = \int \mu Q\,dx + C$.
- Solve for $y$ and apply the IC.
Common $\mu$ values
| $P(x)$ | $\mu$ |
|---|---|
| $\dfrac{k}{x}$ | $x^k$ |
| $k$ (constant) | $e^{kx}$ |
| $\tan x$ | $\sec x$ |
| $-\tan x$ | $\cos x$ |
| $-k/x$ | $x^{-k} = 1/x^k$ |
| $2x$ | $e^{x^2}$ |
Always simplify $e^{k \ln x}$ to $x^k$ before multiplying through.
§4 — Homogeneous Differential Equations AHL 5.18
Recognition & method
Recognise: divide the RHS by $x^n$. If it simplifies to a function of $y/x$ only, the DE is homogeneous.
Substitution: let $y = vx$, so $\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}$. The DE becomes
$$x\frac{dv}{dx} = f(v) - v,$$
which separates as $\displaystyle\int \frac{dv}{f(v) - v} = \int \frac{dx}{x} = \ln|x| + C$. Always finish by back-substituting $v = y/x$ to express the answer in $x$ and $y$.
Common reduction results
- $\dfrac{dy}{dx} = \dfrac{x - y}{x + y} \to x\dfrac{dv}{dx} = \dfrac{1 - 2v - v^2}{1 + v} \to x^2 - 2xy - y^2 = C$
- $\dfrac{dy}{dx} = \dfrac{y^2 + xy}{x^2} \to x\dfrac{dv}{dx} = v^2 \to -\dfrac{1}{v} = \ln x + C \to y = \dfrac{x}{C - \ln x}$
After separation, you often need partial fractions to integrate.
§5 — Euler's Method AHL 5.18
Formulas
Given $\dfrac{dy}{dx} = f(x, y)$, IC $(x_0, y_0)$, step size $h$:
$$x_{n+1} = x_n + h, \qquad y_{n+1} = y_n + h \cdot f(x_n, y_n).$$
Always set up a table:
| $n$ | $x_n$ | $y_n$ | $f_n = f(x_n, y_n)$ |
|---|---|---|---|
| 0 | $x_0$ | $y_0$ | $f(x_0, y_0)$ |
| 1 | $x_0 + h$ | $y_0 + h f_0$ | $f(x_1, y_1)$ |
| 2 | $x_1 + h$ | $y_1 + h f_1$ | $\ldots$ |
Accuracy & error
- Concave up ($y'' > 0$): tangent lies below the curve $\to$ Euler underestimates.
- Concave down ($y'' < 0$): tangent lies above the curve $\to$ Euler overestimates.
- Smaller $h$ $\Rightarrow$ better accuracy (and more steps required).
- Percentage error $= \dfrac{|\text{approx} - \text{exact}|}{|\text{exact}|} \times 100\%$.
§6 — Real-World DE Models AHL 5.18
Common models — exam favourites
| Context | DE | Type | Solution form |
|---|---|---|---|
| Exponential growth/decay | $P' = kP$ | Separable | $P = P_0 e^{kt}$ |
| Newton's law of cooling | $T' = k(T - T_0)$ | Separable | $T = T_0 + A e^{kt}$ |
| Logistic growth | $P' = kP(a - P)$ | Separable + PF | $P = \dfrac{a}{1 + B e^{-akt}}$ |
| Carbon dating | $N' = -\lambda N$ | Separable | $N = N_0 e^{-\lambda t}$ |
| Population + migration | $P' = kP + m$ | Linear (IF) | $P = C e^{kt} - m/k$ |
| Mixing / dilution | Rate in $-$ rate out | Usually IF | Depends on setup |
§7 — Exam Attack Plan All sections
| Trigger | Method |
|---|---|
| RHS factorises as $f(x)\,g(y)$ | Separable: $\int \dfrac{dy}{g} = \int f\,dx$ |
| Set $g(y) = 0$ before separating | Find equilibrium (constant) solutions |
| DE is linear: $y' + P(x)y = Q(x)$ | Integrating factor $\mu = e^{\int P\,dx}$ |
| Coefficient of $y'$ is not $1$ | Divide through first to reach standard form |
| All terms have same total degree | Homogeneous: let $y = vx$ |
| RHS depends only on $y/x$ | Homogeneous (same method) |
| After $y = vx$: simplify $x\dfrac{dv}{dx} = f(v) - v$ | Then separate in $v$ and $x$ |
| "Use Euler's method with $h = \ldots$" | Set up table, 3–4 steps max in IB |
| "Find approximate value of $y$ at $x = \ldots$" | Euler's method with given $h$ |
| Population / temperature / mass model | Identify type, write DE, solve |
| "Carrying capacity" | Logistic DE; capacity $= a$ |
| "Sketch a direction (slope) field" | Draw tangent segments using $f(x_n, y_n)$ |
| "Particular solution" | Solve general, then apply IC |
| "Show that…" with substitution | $y = vx$: always show $y' = v + xv'$ explicitly |
Top 5 marks lost — based on past papers
- Wrong sign on $P(x)$ in the integrating factor. For $y' - 2y = x$, $P = -2$, so $\mu = e^{-2x}$. Writing $e^{2x}$ is the most frequent IF error and turns a correct method into a wrong answer throughout.
- Missing the $v$ term when substituting $y = vx$. $\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}$, not just $x\dfrac{dv}{dx}$. The forgotten $v$ derails every subsequent step.
- Not back-substituting $v = y/x$. The final answer must be in $x$ and $y$. Leaving it in $v$ and $x$ loses the final A1 even if all working is correct.
- Euler's method: using the wrong point for the slope. $y_{n+1} = y_n + h \cdot f(x_n, y_n)$ — the slope uses the current step values, not the next.
- Forgetting equilibrium solutions. For $y' = y^2 - 3$, the constant solutions $y = \pm\sqrt{3}$ are never found by separating (which requires dividing by $y^2 - 3$). Always check $g(y) = 0$ first.
Worked Example — IB-Style Integrating Factor
Question (HL Paper 2 style — 7 marks)
Solve the differential equation $\dfrac{dy}{dx} - \dfrac{2y}{x} = x^2 \cos x$, given $x > 0$ and $y(\pi/2) = 0$.
Solution
- Identify the equation as linear of the form $y' + P(x)y = Q(x)$ with $P(x) = -\dfrac{2}{x}$ and $Q(x) = x^2 \cos x$. (Note: the coefficient of $y'$ is already $1$.) (M1)
- Compute the integrating factor: $\mu = e^{\int -2/x\,dx} = e^{-2\ln x} = e^{\ln x^{-2}} = x^{-2} = \dfrac{1}{x^2}$. (A1)
- Multiply through by $\mu = 1/x^2$: $\dfrac{1}{x^2}y' - \dfrac{2}{x^3}y = \cos x$. The LHS is $\dfrac{d}{dx}\!\left(\dfrac{y}{x^2}\right)$ — verify by differentiating. (M1)(R1)
- Integrate both sides with respect to $x$: $\dfrac{y}{x^2} = \int \cos x\,dx = \sin x + C$. (A1)
- Apply the initial condition $y(\pi/2) = 0$: $0 = \sin(\pi/2) + C = 1 + C$, so $C = -1$. (M1)
- State the particular solution: $y = x^2 (\sin x - 1)$. (A1)
Examiner's note: The most common error here is taking $P(x) = +2/x$ (ignoring the negative sign in front of $2y/x$), which gives $\mu = x^2$ and a completely wrong answer. Always rewrite the equation in $y' + P(x)y = Q(x)$ form before reading off $P$, and remember to simplify $e^{k\ln x}$ to $x^k$.
Common Student Questions
How do I identify which type of differential equation I have?
What is the integrating factor and when do I divide first?
Why does Euler's method always underestimate (or overestimate)?
Why must I keep the $v$ term when substituting $y = vx$ in a homogeneous DE?
How do I solve the logistic equation $P' = kP(a - P)$?
Get the printable PDF version
Same cheatsheet, formatted for A4 print — keep it next to your study desk. Free for signed-in users.