Differential Equations (AI HL)
A differential equation describes how a quantity changes, rather than giving its value directly - like \(\dfrac{dP}{dt}=0.04P\) for a population growing at a rate proportional to its size. Solving one recovers the underlying function. This topic covers setting up a model from a real context, solving it exactly by separation of variables, distinguishing a general solution from a particular one, and using Euler's method to approximate a solution numerically when an exact one is hard to find.
What the syllabus says
This topic maps onto two points in the AHL Calculus content.
| Code | Syllabus content |
|---|---|
| AHL5.14 | Setting up a model or differential equation from a context, for example that the growth of algae \(G\) at time \(t\) is proportional to \(G\). Solving by separation of variables, for example \(\dfrac{dy}{dx}=ky\). The term "general solution". |
| AHL5.16 | Euler's method for finding the approximate numerical solution to first-order differential equations of the form \(\dfrac{dy}{dx}=f(x,y)\), and to coupled systems \(\dfrac{dx}{dt}=f_1(x,y,t)\), \(\dfrac{dy}{dt}=f_2(x,y,t)\). Spreadsheets should be used to generate approximate solutions; in examinations, values are generated using permitted technology. |
Both are AHL-only content, building on the SL5.5 anti-differentiation and boundary-condition work covered in Integration.
Key terms
Five words worth knowing cold before you touch the formulas below - each with a worked example showing exactly what it means.
What is a differential equation?
A differential equation is an equation that relates a function to its own rate of change, rather than stating the function directly. Solving it means finding the function that makes the equation true.
e.g. \(\dfrac{dP}{dt}=0.04P\) models a population whose growth rate is proportional to its current size.
What is separation of variables?
Separation of variables is a technique for solving a differential equation of the form \(\dfrac{dy}{dx}=f(x)g(y)\): you rearrange so every \(y\)-term (with \(dy\)) is on one side and every \(x\)-term (with \(dx\)) is on the other, then integrate both sides separately.
e.g. \(\dfrac{dy}{dx}=2y \Rightarrow \displaystyle\int\dfrac1y\,dy=\int2\,dx \Rightarrow \ln|y|=2x+c \Rightarrow y=Ae^{2x}\).
What's the difference between a general and a particular solution?
A general solution contains an arbitrary constant and describes every curve satisfying the differential equation. A particular solution substitutes a given boundary condition to pin that constant down to one specific value, giving one specific curve.
e.g. General solution \(y=Ae^{2x}\); with \(y(0)=3\), \(A=3\), so the particular solution is \(y=3e^{2x}\).
What is Euler's method?
Euler's method estimates a solution to \(\dfrac{dy}{dx}=f(x,y)\) numerically, step by step, when an exact solution is hard or impossible to find algebraically. Each step uses the current gradient to project forward by a small step size \(h\).
e.g. For \(\dfrac{dy}{dx}=x+y\), \(y(0)=1\), \(h=0.1\): \(y(0.1)\approx1+0.1(0+1)=1.1\).
What is an exponential growth/decay model?
Many contexts - population growth, radioactive decay, cooling - lead to a differential equation of the form \(\dfrac{dy}{dt}=ky\), whose solution is always an exponential \(y=Ae^{kt}\): growth if \(k>0\), decay if \(k<0\).
e.g. \(\dfrac{dN}{dt}=-0.5N\), \(N(0)=100\), gives \(N(t)=100e^{-0.5t}\), so \(N(2)=100e^{-1}\approx36.8\).
Key formulas
One general technique and one numerical method cover almost every question on this topic. The tables below summarise them at a glance - the explanations underneath go into more depth on each one.
Formula reference
Euler's update formula is on the formula booklet; separation of variables is a technique you apply, not a formula you look up.
| Formula | Used for | Booklet? |
|---|---|---|
| \(\displaystyle\int\dfrac{1}{g(y)}\,dy=\int f(x)\,dx\) | Separation of variables | Not in booklet - method, not a formula |
| \(\dfrac{dy}{dx}=ky \Rightarrow y=Ae^{kt}\) | Exponential growth/decay solution | Not in booklet - a derived result, re-derive each time |
| \(y_{n+1}=y_n+h\,f(x_n,y_n)\) | Euler's method update step | ✓ Yes |
| \(\%\text{ error}=\dfrac{|\text{exact}-\text{estimate}|}{\text{exact}}\times100\) | Comparing an Euler estimate with the exact solution | Not in this topic's booklet section - general percentage-error formula |
General solution vs particular solution
Every separable differential equation has infinitely many solution curves until a condition pins one down.
| Feature | General solution | Particular solution |
|---|---|---|
| Contains an arbitrary constant? | Yes (usually \(A\) or \(c\)) | No - the constant has a fixed value |
| Represents | A whole family of curves | One specific curve |
| Needs a boundary condition? | No | Yes, e.g. \(y(0)=3\) |
| Example | \(y=Ae^{2x}\) | \(y=3e^{2x}\) |
Solving by separation of variables
The same three-step process applies whether the equation models population growth, cooling, or decay.
Set up the model
Translate a worded rate-of-change context into a differential equation.
Phrases like "proportional to" translate directly to \(\dfrac{dy}{dt}=ky\) or \(\dfrac{dy}{dt}=-k(y-L)\) for a limiting value \(L\).
Not in the formula booklet - modelling skillSeparate and integrate
\[\int\dfrac1{g(y)}\,dy=\int f(x)\,dx\]
Both sides need their own constant of integration - combine them into a single constant once, on one side only.
Not in the formula booklet - methodApply the boundary condition
Substitute the given point into the general solution to solve for the constant.
Do this after rearranging into \(y=\dots\) form - it's much easier than solving for the constant while still in logarithmic form.
Not in the formula booklet - methodNumerical solution: Euler's method
When separation of variables isn't possible, Euler's method builds an approximate solution one small step at a time.
The update formula
\[y_{n+1}=y_n+h\,f(x_n,y_n)\]
Always use the gradient at the start of the step, evaluated with the current \((x_n,y_n)\) - not the new value you're about to calculate.
✓ In the formula bookletIterating step by step
Repeat the update formula, incrementing \(x_n\) by \(h\) each time, to march forward from the initial condition.
Keep a table of \(x_n,\ y_n,\ f(x_n,y_n)\) at each step - it's much easier to check for arithmetic slips.
Not in the formula booklet - applying the update repeatedlyWhy it has error
Euler's method assumes the gradient is constant across each step, when it's really changing continuously.
A smaller step size \(h\) reduces the error per step but needs more steps to cover the same interval.
Not in the formula booklet - conceptual pointWorked examples
Two full exam-style questions, marked exactly like the real thing. Try each one yourself before checking the worked solution.
A population grows so that \(\dfrac{dP}{dt} = 0.04P\), with \(P(0) = 500.\)
(a) Solve the differential equation.
(b) Find the population after 25 years.
Worked solution
(a) \(\int \tfrac1P\,dP = \int 0.04\,dt \Rightarrow \ln P\) M1
\(= 0.04t + c.\) A1
\(P = Ae^{0.04t};\ A\) A1
\(= 500.\) A1
(b) \(P(25) = 500e^{1}\) M1
\(\approx 1359.\) A1
A body cools according to \(\dfrac{d\theta}{dt} = -k(\theta - 20)\), where \(\theta\) is temperature (°C) and the surroundings are at 20°C. Initially \(\theta = 90\), and after 10 min \(\theta = 60.\)
(a) Show that \(\theta = 20 + 70e^{-kt}.\)
(b) Find \(k.\)
Worked solution
(a) \(u = \theta - 20\): \(\tfrac{du}{dt} = -ku \Rightarrow u\) M1
\(= Ae^{-kt}.\) A1
At \(t=0, u=70 \Rightarrow A=70.\) \(\theta\) A1
\(= 20 + 70e^{-kt}.\) A1 AG
(b) \(60 = 20 + 70e^{-10k} \Rightarrow e^{-10k}\) M1
\(= \tfrac47.\) A1
\(k \approx 0.0560.\) A1
Common mistakes
The four slip-ups that account for most of the marks lost on this topic - worth reading before you start practising, not just after you get one wrong.
- Dropping the constant of integration when separating variables. Both sides technically need one, but combine them into a single constant \(c\) (or \(A\), after exponentiating) - forgetting it entirely loses the ability to apply any boundary condition.
- Algebra slips converting from \(\ln|y|=\dots\) to \(y=\dots\). Exponentiate both sides carefully - \(\ln|y|=kt+c \Rightarrow y=e^{kt+c}=e^c\cdot e^{kt}=Ae^{kt}\), where \(A=e^c\) is the new constant, not \(c\) itself.
- Using the updated \(y\)-value too early in Euler's method. Each step evaluates \(f(x_n,y_n)\) using the value from the previous step, not a value you've already updated within the same step.
- Quoting the general solution when the particular solution was asked for. If a boundary condition is given anywhere in the question, use it to find the constant - an answer left as \(y=Ae^{kt}\) is usually incomplete.
Using your GDC
Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.
Faster and safer than algebra for messy equations - and essential once separation of variables has left you with an equation like \(60 = 20 + 70e^{-10k}\) to solve for a constant.
- Graph f(x) first so you can see how many solutions exist and roughly where they are.
- Rearrange so everything is on one side: f(x) = 0 - or graph both sides as separate functions and find intersections.
- MATH → Solver: enter the expression, type a starting guess close to one root, press ALPHA + ENTER. Move the guess to near a different root and repeat for each solution.TI-84
- Type nSolve(f(x)=0, x, guess) - include a guess or interval e.g. nSolve(f(x)=0, x, 2) or nSolve(f(x)=0, x, {1,5}) to target a specific root.Nspire
- Run-Matrix → SolveN(f(x), x) returns all real roots at once; or use the Equation app for a visual approach.Casio
- For transcendental equations (e.g. \(e^x = 3x\)), graph both sides, count crossings, then use the intersection tool for each one.
- Always verify each solution by substituting back into the original equation.
Tip: The solver finds ONE root near your starting guess - change the guess to find others. The graph shows you how many to expect.
See the full GDC guide for more calculator models and topics.
Ready to practise properly?
Differential equations questions, marked instantly like the real exam.
Quick answers
The questions students on this topic ask most often.
What's the difference between a general and a particular solution?
A general solution contains an arbitrary constant (usually \(A\) or \(c\)) and represents every possible curve that satisfies the differential equation. A particular solution uses a given boundary condition, like \(y(0)=3\), to find the exact value of that constant, pinning down one specific curve.
How do I know if an equation can be solved by separation of variables?
Check whether you can rearrange the equation so every \(y\)-term (including \(dy\)) is on one side and every \(x\)-term (including \(dx\)) is on the other. If \(\dfrac{dy}{dx} = f(x)g(y)\), you can always separate it into \(\dfrac{1}{g(y)}\,dy = f(x)\,dx\) and integrate both sides.
Why does Euler's method give an approximate answer, not an exact one?
Euler's method assumes the gradient stays constant across each step, when really it's changing continuously - so every step introduces a small error that can build up over several steps. Smaller step sizes reduce the error but need more steps to reach the same point.
Can I use my GDC to solve a differential equation on the exam?
Your GDC can't do the separation-of-variables algebra for you, but once you've reached an equation like \(60 = 20 + 70e^{-10k}\), its equation solver finds \(k\) numerically in seconds - and it's essential for Euler's method, where you're often asked to iterate several steps by hand or using lists. See the GDC guide for model-specific instructions.
Sub-topics
Differential Equations broken down into its individual skills, each with its own focused page.
Related topics
More Calculus topics from the same AI HL syllabus unit, in case you want to keep going.