Free Cheatsheet · AHL 5.18

IB Math AA HL Differential Equations — Complete Cheatsheet

Every method, model, trick, and trap for IB Mathematics Analysis & Approaches HL Differential Equations. Separable, integrating factor, homogeneous, and Euler's numerical method — plus all the real-world models the IB loves to test.

Topic: Differential Equations Syllabus: AHL 5.18 Read time: ~12 minutes Last updated: Apr 2026

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

FormTypeMethod
$\dfrac{dy}{dx} = f(x) \cdot g(y)$SeparableSeparate & 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)$HomogeneousSubstitution $y = vx$
Any $\dfrac{dy}{dx} = f(x, y)$NumericalEuler's method
TrickCheck in this order: (1) Can I factorise the RHS as $f(x)\,g(y)$? $\to$ Separable. (2) Is it linear in $y$? $\to$ Integrating factor. (3) Same total degree in every term? $\to$ Homogeneous. (4) None of the above? $\to$ Euler's method.
Trap$y' + Py = Q$ is linear only if $P$ and $Q$ depend on $x$ alone (no $y^2$, $\sin y$, etc.). Check before applying the integrating factor.

§2 — Variables Separable AHL 5.18

Method

  1. Rearrange: $\dfrac{1}{g(y)}\,dy = f(x)\,dx$.
  2. Integrate both sides.
  3. Write $+ C$ on one side only.
  4. Apply the initial condition (IC) to find $C$.
  5. 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.
Trap$\int \dfrac{1}{y}\,dy = \ln|y|$ — absolute value bars required. And $+ C$ must appear on one side only; do not write $C_1$ on the LHS and $C_2$ on the RHS.
TrickFor the logistic DE, partial fractions give $\dfrac{1}{P(a-P)} = \dfrac{1/a}{P} + \dfrac{1/a}{a-P}$. The factor $\dfrac{1}{a}$ in each term is easy to miss — write the algebra out fully.

§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).

  1. Divide through so the coefficient of $y'$ is $1$.
  2. Compute $\mu = e^{\int P\,dx}$.
  3. Multiply both sides by $\mu$.
  4. The LHS now equals $\dfrac{d}{dx}(\mu y)$ — verify by expanding.
  5. Integrate: $\mu y = \int \mu Q\,dx + C$.
  6. 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.

TrapForgetting to divide to standard form first. If the DE is $2y' + 4y = 6$, divide by $2$ to get $y' + 2y = 3$ before reading off $P = 2$.
Trap$P(x)$ is the coefficient of $y$, not of $y'$. For $y' - 2y = x$, $P = -2$ (negative), so $\mu = e^{-2x}$, not $e^{2x}$.
TrickAfter multiplying by $\mu$, verify that the LHS is $\dfrac{d}{dx}(\mu y)$ by expanding — this catches sign errors before you waste time integrating the wrong expression.

§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.

TrapThe substitution gives $\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}$ — not just $x\dfrac{dv}{dx}$. Forgetting the $v$ term is the most common method-mark loss in this section.
TrapBack-substituting $v = y/x$ at the end is mandatory. Leaving the answer in terms of $v$ and $x$ is incomplete and loses the final A1.
TrickAfter $v + x\dfrac{dv}{dx} = f(v)$, simplify to $x\dfrac{dv}{dx} = f(v) - v$ before separating — this always cancels nicely and exposes the separable form.

§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\%$.
TrapEuler uses the slope at the current point $(x_n, y_n)$, not the next one. $y_{n+1} = y_n + h \cdot f(x_n, y_n)$ — never use $f(x_{n+1}, y_{n+1})$.
TrickShow the full table even for 2 steps — IB mark schemes award method marks for the table structure, not just the final answer.
NoteNumber of steps from $x_0$ to a target $x_T$ with step size $h$ is $\dfrac{x_T - x_0}{h}$ — check this before starting so you don't run out of rows.

§6 — Real-World DE Models AHL 5.18

Common models — exam favourites

ContextDETypeSolution 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 / dilutionRate in $-$ rate outUsually IFDepends on setup
TrickIn any modelling question, write the DE explicitly before solving — IB mark schemes award an M mark just for setting up the correct DE.
TrapFor Newton's law of cooling, $k < 0$ (the temperature decreases toward ambient). Students who leave $k > 0$ get an increasing temperature, which is physically nonsense and loses marks.

§7 — Exam Attack Plan All sections

TriggerMethod
RHS factorises as $f(x)\,g(y)$Separable: $\int \dfrac{dy}{g} = \int f\,dx$
Set $g(y) = 0$ before separatingFind 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 degreeHomogeneous: 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 modelIdentify 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. 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)
  2. 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)
  3. 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)
  4. Integrate both sides with respect to $x$: $\dfrac{y}{x^2} = \int \cos x\,dx = \sin x + C$.  (A1)
  5. Apply the initial condition $y(\pi/2) = 0$: $0 = \sin(\pi/2) + C = 1 + C$, so $C = -1$.  (M1)
  6. 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?
Check in this order: (1) Can the RHS be factorised as $f(x) \cdot g(y)$? Then it's separable — separate and integrate. (2) Is it linear in $y$, i.e. $y' + P(x)y = Q(x)$? Use the integrating factor $\mu = e^{\int P\,dx}$. (3) Does the RHS depend only on $y/x$ (or do all terms have the same total degree)? It's homogeneous — substitute $y = vx$. (4) None of the above? You'll typically be asked to use Euler's method numerically.
What is the integrating factor and when do I divide first?
For $y' + P(x)y = Q(x)$, the integrating factor is $\mu = e^{\int P(x)\,dx}$ (no $+C$ here). Multiply both sides by $\mu$ and the LHS becomes $\dfrac{d}{dx}(\mu y)$, which integrates directly. CRITICAL: $P(x)$ is the coefficient of $y$ after the equation is in standard form with coefficient $1$ on $y'$. If you have $2y' + 4y = 6$, divide by $2$ first to get $y' + 2y = 3$, then $P = 2$ and $\mu = e^{2x}$. Reading $P$ off before dividing is the most common error.
Why does Euler's method always underestimate (or overestimate)?
Euler's method uses the tangent line at the current point to step forward. If the curve is concave up ($y'' > 0$), the tangent lies below the curve, so each step underestimates the true value. If concave down ($y'' < 0$), the tangent lies above the curve, so each step overestimates. A smaller step size $h$ reduces the error but doesn't change the direction of the bias. IB exams often ask you to identify the bias from the sign of $y''$.
Why must I keep the $v$ term when substituting $y = vx$ in a homogeneous DE?
Because $y = vx$ is a product of two functions of $x$ ($v$ depends on $x$ too), so by the product rule $\dfrac{dy}{dx} = v + x \cdot \dfrac{dv}{dx}$ — NOT just $x \cdot \dfrac{dv}{dx}$. The forgotten $v$ is the most common method-mark loss in homogeneous DE questions. After substituting, the equation always rearranges to $x\dfrac{dv}{dx} = f(v) - v$, which is separable in $v$ and $x$. Always finish by back-substituting $v = y/x$ to get the answer in $x$ and $y$.
How do I solve the logistic equation $P' = kP(a - P)$?
It's separable. Separate as $\int \dfrac{dP}{P(a-P)} = \int k\,dt$. The fraction needs partial fractions: $\dfrac{1}{P(a-P)} = \dfrac{1/a}{P} + \dfrac{1/a}{a-P}$ — note the $\dfrac{1}{a}$ in each term, easy to miss. Integrate to get $\dfrac{1}{a}\ln\!\left|\dfrac{P}{a-P}\right| = kt + C$, then solve algebraically for $P$. Standard form: $P = \dfrac{a}{1 + B e^{-akt}}$ where $B = \dfrac{a - P_0}{P_0}$ and the carrying capacity is $a$ (the long-term limit as $t \to \infty$).

Get the printable PDF version

Same cheatsheet, formatted for A4 print — keep it next to your study desk. Free for signed-in users.