☰ IB Maths AI HL · course menu
Topics
IB Maths AI HL · free cheatsheet
Coupled & Second-Order Differential Equations cheatsheet (IB Maths AI HL)
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. Written by an IB-certified teacher.
What this cheatsheet covers
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.
Writing a coupled system as a matrix equation
AHL 5.17Coupled 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 behaviourEquilibrium:where $\dot{\mathbf X}=\mathbf 0$; for a linear system this is the origin $(0,0)$
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.
Eigenvalues: the engine of the system
AHL 5.17Characteristic eq.:$\det(M-\lambda I)=0\ \Rightarrow\ \lambda^2-(\operatorname{tr}M)\lambda+\det M=0$Quadratic formula:$\lambda=\dfrac{\operatorname{tr}M\pm\sqrt{(\operatorname{tr}M)^2-4\det M}}{2}$ — the larger root takes the $+$ signSymmetric 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$
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$.
The discriminant & phase-portrait type
AHL 5.17Discriminant:$\Delta=(\operatorname{tr}M)^2-4\det M$$\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$)
Before solving anything, one number — the discriminant of the characteristic equation — tells you which family of phase portrait you are in.
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 |
The exact solution by the eigenvalue method
AHL 5.17Eigenvector: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}$
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.
Complex eigenvalues & spirals
AHL 5.17Complex 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 spinEnvelope:$\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}$
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.
Reducing a second-order ODE to a system
AHL 5.17Substitution: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 ODEMatrix form:$\dfrac{d}{dt}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}0&1\\-q&-p\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}$Initial conditions:$x(0)$ is the given displacement and $y(0)=\dot x(0)$ the given initial velocity
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.
Euler's method for a coupled system
AHL 5.17Vector form:$\mathbf X_{n+1}=\mathbf X_n+h\,M\mathbf X_n$ (linear), or $\mathbf X_{n+1}=\mathbf X_n+h\,\mathbf F(\mathbf X_n)$ (general)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 togetherTime step:$t_{n+1}=t_n+h$ — a smaller $h$ means more steps but a more accurate estimate
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$.
AI application: equilibria of predator–prey systems
AHL 5.17Predator–prey:$\dot x=x(p-qy),\quad \dot y=y(sx-r)$ — prey $x$, predator $y$Non-zero equilibrium:set both rates to $0$ and reject $(0,0)$; cancel $x\neq0$ and $y\neq0$Solve:$\dot y=0\Rightarrow x^{*}=\dfrac{r}{s}$ (predator equation); $\dot x=0\Rightarrow y^{*}=\dfrac{p}{q}$ (prey equation)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}$
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.
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$ | Pair each $\lambda$ with its own eigenvector |
| "Second-order ODE" | Let $y=\dot x$: get $\dot x=y,\ \dot y=-qx-py$ | Auxiliary eq $=$ characteristic eq $\lambda^2+p\lambda+q=0$ |
| "Use Euler's method" | $x_{n+1}=x_n+h\dot x_n$, $y_{n+1}=y_n+h\dot y_n$ | 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?
- How do I know whether an equilibrium is stable?
- When should I use the eigenvalue method and when Euler's method?
- How do I turn a second-order equation into a coupled system?
- Why does a complex eigenvalue make the system spiral?
What is the difference between a node, a saddle and a spiral?
How do I know whether an equilibrium is stable?
When should I use the eigenvalue method and when Euler's method?
How do I turn a second-order equation into a coupled system?
Why does a complex eigenvalue make the system spiral?
Your next step




