IB Math AI HL Coupled & Second-Order Differential Equations — Complete Cheatsheet
Every AHL 5.17 method for IB Mathematics Applications & Interpretation HL coupled and second-order differential equations — the matrix form, the eigenvalue solution, node, saddle and spiral phase portraits, Euler's method on a system, and reducing a second-order ODE to a coupled pair. Hand-built by an IBO-certified Singapore tutor, with a print-ready PDF to download.
Coupled and second-order differential equations are the summit of the IB Mathematics Applications & Interpretation HL calculus strand, and a Paper 3 favourite. AI is a modelling subject, so the point of AHL 5.17 is never the algebra for its own sake — it is predicting how two quantities that feed on each other evolve together: predator and prey, two chemical concentrations, or the displacement and velocity of a damped spring. Because a GDC is always allowed, the marks live in setting the system up as a matrix, reading its eigenvalues, and classifying the phase portrait — not in grinding the exponentials by hand.
This cheatsheet condenses the whole of AHL 5.17 — writing $\dot{\mathbf X}=M\mathbf X$, the eigenvalue method for the exact solution, classifying the equilibrium as a node, saddle, spiral or centre, Euler's method on a system, and reducing a second-order ODE to a coupled pair — onto one page, and flags the traps that quietly cost method marks. The print-ready PDF is at the bottom, free to download.
§1 — Writing a coupled system as a matrix equation AHL 5.17
A coupled system is two first-order equations in which each rate depends on both variables. Stack the variables into a vector and the coefficients collapse into a single matrix — the object that drives everything else.
Coupled system:$\dfrac{dx}{dt}=ax+by,\quad \dfrac{dy}{dt}=cx+dy$ — each rate depends on both $x$ and $y$
Matrix form:$\dot{\mathbf X}=M\mathbf X$, with $\mathbf X=\begin{pmatrix}x\\y\end{pmatrix}$ and $M=\begin{pmatrix}a&b\\c&d\end{pmatrix}$
Trace & determinant:$\operatorname{tr}M=a+d$ and $\det M=ad-bc$ — the two numbers that decide the behaviour
Equilibrium:where $\dot{\mathbf X}=\mathbf 0$; for a linear system this is the origin $(0,0)$
TrickRead the coefficients straight into $M$ row by row: the top row is the $\dot x$ equation, the bottom row the $\dot y$ equation. Then $\operatorname{tr}M=a+d$ and $\det M=ad-bc$ are all you need to launch the eigenvalue method.
NoteEverything on this sheet flows from $\operatorname{tr}M$ and $\det M$. They are the sum and product of the eigenvalues, so keep them to hand — they double as an instant check on the two values you find.
§2 — Eigenvalues: the engine of the system AHL 5.17
The eigenvalues of $M$ decide whether the system grows, decays, oscillates or spirals. They are the roots of the characteristic equation — a plain quadratic in $\lambda$.
Quadratic formula:$\lambda=\dfrac{\operatorname{tr}M\pm\sqrt{(\operatorname{tr}M)^2-4\det M}}{2}$ — the larger root takes the $+$ sign
Symmetric shortcut:for $M=\begin{pmatrix}m&n\\n&m\end{pmatrix}$ the roots are simply $\lambda=m\pm n$
Long-run:with real eigenvalues the solution mixes $e^{\lambda_1 t}$ and $e^{\lambda_2 t}$; the largest $\lambda$ dominates as $t\to\infty$
TrickOn the GDC you can enter $M$ and read the eigenvalues straight off, or solve $\lambda^2-(\operatorname{tr}M)\lambda+\det M=0$ with the polynomial solver. Reach for the algebra only when a question says "show that" or gives $M$ in terms of a parameter.
TrapYou subtract $\lambda$ on the leading diagonal only: $M-\lambda I=\begin{pmatrix}a-\lambda&b\\c&d-\lambda\end{pmatrix}$. Subtracting it from every entry is the classic set-up error, and it wrecks the characteristic equation.
§3 — The discriminant & phase-portrait type AHL 5.17
Before solving anything, one number — the discriminant of the characteristic equation — tells you which family of phase portrait you are in.
$\Delta>0$:two real distinct eigenvalues — a node (same sign) or a saddle (opposite signs)
$\Delta=0$:a repeated eigenvalue — a degenerate (improper) node
$\Delta<0$:a complex pair $\lambda=p\pm qi$ — a spiral ($p\neq0$) or a centre ($p=0$)
NoteThis is just the discriminant $b^2-4ac$ you already know, applied to $\lambda^2-(\operatorname{tr}M)\lambda+\det M=0$ (so $a=1$, $b=-\operatorname{tr}M$, $c=\det M$). Its sign alone fixes the type of equilibrium before you compute a single eigenvalue.
TrickA one-line shortcut: if $\det M<0$ the eigenvalues are automatically real with opposite signs, so the equilibrium must be a saddle — you need not compute $\Delta$ at all.
§4 — Classifying the equilibrium: node, saddle, spiral, centre AHL 5.17
Put the sign information together and the phase portrait — the picture of every trajectory near the equilibrium — is fixed. Stability asks whether trajectories head toward the origin (stable) or away from it (unstable).
Eigenvalues
Phase portrait
Stability
Real, both negative
Node — trajectories flow in
Stable
Real, both positive
Node — trajectories flow out
Unstable
Real, opposite signs
Saddle
Unstable (always)
Complex, $p<0$
Spiral inward
Stable
Complex, $p>0$
Spiral outward
Unstable
Pure imaginary, $p=0$
Centre — closed loops
Neutral
A stable spiral: a complex eigenvalue pair with negative real part, $\lambda=-1\pm2i$, so the trajectory rotates (rate $q=2$) inside a shrinking envelope $e^{-t}$ and winds inward to the equilibrium at the origin.
TrickOne rule covers stability: the equilibrium is stable only if every eigenvalue has a negative real part. For a spiral that means $p=\tfrac12\operatorname{tr}M<0$; for a node it means both real roots are negative — equivalently $\operatorname{tr}M<0$ and $\det M>0$.
TrapA saddle is always unstable, however negative one eigenvalue is — the single positive eigenvalue flings almost every trajectory off to infinity. Only the two special directions along the eigenvectors behave differently.
§5 — The exact solution by the eigenvalue method AHL 5.17
For real distinct eigenvalues the general solution is a combination of $e^{\lambda t}$ terms, one per eigenvector. The eigenvectors give the special straight-line directions; the two constants are fixed by the starting point.
Eigenvector:solve $(M-\lambda I)\mathbf v=\mathbf 0$ using one row only; set $\mathbf v=\begin{pmatrix}1\\k\end{pmatrix}$
General solution:$\mathbf X(t)=c_1e^{\lambda_1 t}\mathbf v_1+c_2e^{\lambda_2 t}\mathbf v_2$
Fit start values:at $t=0$ every $e^{\lambda t}=1$, so $c_1\mathbf v_1+c_2\mathbf v_2=\mathbf X(0)$ — a $2\times2$ system for $c_1,c_2$
Along an eigenvector:if $\mathbf X(0)$ is a multiple of $\mathbf v_1$, the trajectory stays on that line, scaling as $e^{\lambda_1 t}$
NoteBecause every exponential equals $1$ at $t=0$, fitting the initial state is just a linear system $c_1\mathbf v_1+c_2\mathbf v_2=\mathbf X(0)$. Solve it on the GDC, or by adding and subtracting when the eigenvectors are the tidy $\begin{pmatrix}1\\1\end{pmatrix}$ and $\begin{pmatrix}1\\-1\end{pmatrix}$.
TrapEach exponential rides its own eigenvector: $c_1e^{\lambda_1 t}\mathbf v_1+c_2e^{\lambda_2 t}\mathbf v_2$. Pairing $\lambda_1$ with $\mathbf v_2$ is a fatal mix-up — label each eigenvalue with its eigenvector the moment you find it.
§6 — Complex eigenvalues & spirals AHL 5.17
When $\Delta<0$ the eigenvalues form a conjugate pair $p\pm qi$ and the trajectory spirals. Euler's formula turns the complex exponential into a real rotation-and-scaling, which is all the phase portrait needs.
Complex pair:$\lambda=p\pm qi$ with $p=\dfrac{\operatorname{tr}M}{2}$ and $q=\dfrac{\sqrt{-\Delta}}{2}$
Rotation & scaling:$e^{(p+qi)t}=e^{pt}\big(\cos qt+i\sin qt\big)$ — Euler's formula splits growth from spin
Envelope:$\lvert e^{\lambda t}\rvert=e^{pt}$ — the amplitude grows if $p>0$, decays if $p<0$
Period & amplitude:one full turn takes $T=\dfrac{2\pi}{q}$; each cycle the amplitude scales by $e^{pT}=e^{2\pi p/q}$
TrickYou never need the full quadratic for the real part — just halve the trace: $p=\tfrac12\operatorname{tr}M$. Its sign alone decides the spiral: $p<0$ inward (stable), $p>0$ outward (unstable), $p=0$ a closed centre.
NoteThis is the Coupled DEs × Complex Numbers crossover examiners love. The modulus $e^{pt}$ is the spiral's envelope and the argument $qt$ carries it round, so from one peak to the next the amplitude is multiplied by $e^{2\pi p/q}$ — below $1$ for an inward spiral, above $1$ for an outward one.
§7 — Reducing a second-order ODE to a system AHL 5.17
Any linear second-order equation — a damped spring, an $RLC$ circuit — becomes a coupled first-order pair by naming the first derivative as a new variable. Then every method above applies unchanged.
Substitution:for $\ddot x+p\dot x+qx=0$, let $y=\dfrac{dx}{dt}$, so $\dot y=\ddot x$
Coupled pair:$\dot x=y,\qquad \dot y=-qx-py$ — read the second row off the rearranged ODE
Initial conditions:$x(0)$ is the given displacement and $y(0)=\dot x(0)$ the given initial velocity
TrickThe companion matrix $\begin{pmatrix}0&1\\-q&-p\end{pmatrix}$ has trace $-p$ and determinant $q$, so its characteristic equation is $\lambda^2+p\lambda+q=0$ — identical to the auxiliary equation of the original ODE. Under-, over- and critical damping map exactly onto spiral, node and repeated node.
TrapThe bottom row carries the ODE's coefficients with flipped signs: $\dot y=-qx-py$. Forgetting to move $p\dot x$ and $qx$ across the equals sign — so dropping those minus signs — is the standard slip when reducing.
§8 — Euler's method for a coupled system AHL 5.17
When the eigenvalues are ugly, or the system is nonlinear (predator–prey), there is no tidy formula — so you step forward numerically. Euler treats each rate as constant over a short step $h$.
Component form:$x_{n+1}=x_n+h\,\dot x_n$ and $y_{n+1}=y_n+h\,\dot y_n$
Both rates first:evaluate $\dot x_n$ and $\dot y_n$ at the current $(x_n,y_n)$, then update both together
Time step:$t_{n+1}=t_n+h$ — a smaller $h$ means more steps but a more accurate estimate
TrapCompute both derivatives from the current point before updating either variable. Feeding a half-updated $x_{n+1}$ into $\dot y_n$ is the most common Euler error on a coupled system — it silently corrupts every step that follows.
TrickLay the work out as a table with columns $t,\ x,\ y,\ \dot x,\ \dot y$: fill a whole row from the current $(x,y)$, then write the next row's $x,y$ underneath. The GDC's list or spreadsheet mode automates this for many steps.
§9 — AI application: equilibria of predator–prey systems AHL 5.17
The headline AI HL application is the nonlinear Lotka–Volterra predator–prey model, where the interesting equilibrium is not the origin. Both rates vanish there, so factor out the non-zero population to pin it down.
Conserved total:if $\dot x=-\dot y$ then $x+y=S$ is fixed; $\dot x=0$ gives a ratio $y=kx$, so $x^{*}=\dfrac{S}{1+k}$
Trap$x^{*}=\dfrac{r}{s}$ comes from the predator equation ($\dot y=0$) and $y^{*}=\dfrac{p}{q}$ from the prey equation ($\dot x=0$) — each species' level is fixed by the other's parameters. Don't swap them, and always reject the trivial $(0,0)$.
NoteWhen the two rates are exact negatives the total is conserved, so there is a whole line of equilibria rather than a single point. Combine the ratio $y=kx$ from $\dot x=0$ with the fixed total $x+y=S$: $x^{*}=\dfrac{S}{1+k}$ — never just halve $S$.
§10 — Exam attack plan All sections
Question cue
What to do
Watch for
"Write as $\dot{\mathbf X}=M\mathbf X$"
Read coefficients row by row into $M=\begin{pmatrix}a&b\\c&d\end{pmatrix}$
Top row is the $\dot x$ equation; keep every sign
"Find the eigenvalues"
Solve $\lambda^2-(\operatorname{tr}M)\lambda+\det M=0$ (GDC or formula)
Check sum $=\operatorname{tr}M$, product $=\det M$
"Classify the equilibrium"
Sign of $\Delta$ → real/complex; signs of $\lambda$ → node/saddle/spiral
Saddle always unstable; stable needs every $\operatorname{Re}\lambda<0$
"Complex eigenvalues / spiral"
$p=\tfrac12\operatorname{tr}M$, $q=\tfrac12\sqrt{-\Delta}$; inward if $p<0$
Period $T=2\pi/q$; amplitude $\times\,e^{2\pi p/q}$ per cycle
"Exact solution"
$\mathbf X=c_1e^{\lambda_1t}\mathbf v_1+c_2e^{\lambda_2t}\mathbf v_2$; fit at $t=0$
Both rates from the current point; don't half-update
"Predator–prey equilibrium"
Set both rates $0$; cancel $x,y\neq0$
$x^{*}=r/s$, $y^{*}=p/q$; reject $(0,0)$
Worked Example — Classifying & Solving a Coupled System
Question (AI HL Paper 3 style — 10 marks)
Two interacting quantities are modelled by the coupled system $$\frac{dx}{dt}=-x-2y,\qquad \frac{dy}{dt}=2x-y,$$ with initial state $x(0)=1$, $y(0)=0$.
(a) Write the system in the form $\dot{\mathbf X}=M\mathbf X$.
(b) Show that the eigenvalues of $M$ are $\lambda=-1\pm2i$.
(c) Classify the equilibrium at the origin and describe the long-term behaviour of the trajectory.
(d) Use Euler's method with step length $h=0.1$ to estimate $x$ and $y$ after one step.
(e) Find the exact time for one complete revolution, and the factor by which the distance from the origin is multiplied over that revolution.
Solution
(a) Reading the coefficients row by row, $M=\begin{pmatrix}-1&-2\\2&-1\end{pmatrix}$ and $\mathbf X=\begin{pmatrix}x\\y\end{pmatrix}$, so $\dot{\mathbf X}=M\mathbf X$. (A1)
(b) $\operatorname{tr}M=-1+(-1)=-2$ and $\det M=(-1)(-1)-(-2)(2)=1+4=5$. (M1) The characteristic equation is $\lambda^2-(-2)\lambda+5=0$, i.e. $\lambda^2+2\lambda+5=0$. (M1) Hence $\lambda=\dfrac{-2\pm\sqrt{4-20}}{2}=\dfrac{-2\pm\sqrt{-16}}{2}=\dfrac{-2\pm4i}{2}=-1\pm2i$. (A1)(check: sum $=-2=\operatorname{tr}M$, product $=(-1)^2+2^2=5=\det M$.)
(c) The eigenvalues are complex ($\Delta=(-2)^2-4(5)=-16<0$), so the origin is a spiral. The real part is $p=-1<0$, so trajectories spiral inward: the equilibrium is a stable spiral and the trajectory decays toward $(0,0)$. (A1)(A1)
(d) At $(x_0,y_0)=(1,0)$: $\dot x_0=-1-2(0)=-1$ and $\dot y_0=2(1)-0=2$. (M1) Then $x_1=1+0.1(-1)=0.9$ and $y_1=0+0.1(2)=0.2$, giving $(x_1,y_1)=(0.9,\,0.2)$. (A1)
(e) Here $q=2$, so one revolution takes $T=\dfrac{2\pi}{q}=\dfrac{2\pi}{2}=\pi\approx3.14$. (M1) Over that turn the amplitude scales by $e^{pT}=e^{-1\cdot\pi}=e^{-\pi}\approx0.043$, so the distance from the origin drops to about $4.3\%$ of its starting value. (A1)(a rapidly decaying, tightly wound inward spiral.)
Examiner's note: the whole question turns on $\operatorname{tr}M$ and $\det M$ — get those two right and the eigenvalues, the classification and the period all follow. Justify "spiral" from the sign of the discriminant and "stable" from the sign of the real part, and keep exact values ($\pi$, $e^{-\pi}$) until the final decimal. In part (d), evaluate both rates at $(1,0)$ before updating — never feed the new $x$ into $\dot y$.
Common Student Questions
What is the difference between a node, a saddle and a spiral?
They are the three main shapes of the phase portrait, and the eigenvalues of $M$ decide which you get. Real eigenvalues of the same sign give a node — every trajectory flows straight in if both are negative, straight out if both are positive. Real eigenvalues of opposite signs give a saddle, which is always unstable: trajectories swoop in along one direction and back out along another. A complex pair gives a spiral that rotates as it grows or decays, and a pure-imaginary pair gives the borderline centre — closed loops that neither grow nor shrink. In AI you rarely sketch these by hand; you just name the type from the eigenvalue signs.
How do I know whether an equilibrium is stable?
An equilibrium is stable exactly when every eigenvalue has a negative real part — then all nearby trajectories decay toward it. For real eigenvalues that means both are negative (equivalently $\operatorname{tr}M<0$ and $\det M>0$); for a complex pair it means the real part $p=\tfrac12\operatorname{tr}M<0$, an inward spiral. If any eigenvalue has a positive real part the equilibrium is unstable — which is why a saddle, with one positive and one negative eigenvalue, can never be stable.
When should I use the eigenvalue method and when Euler's method?
Use the eigenvalue method when the system is linear ($\dot{\mathbf X}=M\mathbf X$) and you want an exact solution or a classification — the eigenvalues hand you the growth rates and the phase-portrait type directly. Use Euler's method when there is no tidy formula: the system is nonlinear (such as a Lotka–Volterra predator–prey model), or the question simply asks you to march forward numerically from a starting point. Euler only approximates the true trajectory, so a smaller step $h$ gives a more accurate estimate at the cost of more steps.
How do I turn a second-order equation into a coupled system?
Introduce the first derivative as a new variable. For $\ddot x+p\dot x+qx=0$, let $y=\dfrac{dx}{dt}$; then $\dot x=y$, and rearranging the ODE gives $\dot y=\ddot x=-qx-py$. In matrix form that is $\begin{pmatrix}0&1\\-q&-p\end{pmatrix}$, whose characteristic equation $\lambda^2+p\lambda+q=0$ is exactly the auxiliary equation of the original ODE. The initial conditions carry straight over as $x(0)$ (displacement) and $y(0)=\dot x(0)$ (velocity), after which every method on this sheet applies to the pair.
Why does a complex eigenvalue make the system spiral?
A complex eigenvalue $p\pm qi$ carries the factor $e^{(p+qi)t}$, and Euler's formula splits it apart: $e^{(p+qi)t}=e^{pt}(\cos qt+i\sin qt)$. The $\cos qt+i\sin qt$ part is a rotation — it turns the trajectory once every period $T=2\pi/q$ — while $e^{pt}$ is a scaling that stretches the radius if $p>0$ or shrinks it if $p<0$. Rotation combined with steady scaling is exactly a spiral. If $p=0$ there is no scaling at all, so the loops close up into a centre.
What's NOT in this cheatsheet
This page gives you the formulas and traps for free. The full Photon Academy IB Math AI HL library (enrolled students, or the lifetime resource library) adds:
Notes PDF — every coupled and second-order DE method in full: the matrix form, eigenvalue solutions, phase-portrait classification and Euler's method, with the exact GDC keystrokes.
Tutorial booklet — 25+ AI HL-style questions, from writing a system as a matrix equation to full phase-portrait, Euler and second-order-reduction problems.
Tutorial Solutions — mark-scheme-style solutions with M1/A1 annotations for every eigenvalue, classification and Euler step.
Predicted-paper questions — the exact coupled-DE and phase-portrait question types most likely in the next Paper 3.