Differential equations, explained with examples
A differential equation links a quantity to its rate of change. They model population growth, cooling, radioactive decay and much more, and they appear in the second year of A level Maths.
On this page
What a differential equation is
A differential equation contains a derivative, such as dy/dx or dP/dt. Instead of telling you y directly, it tells you how y changes. Solving it means finding the function y that makes the equation true. For example, dy/dx = 2x is solved by y = x² + c, because differentiating x² + c gives 2x.
The general solution contains an arbitrary constant c and describes a whole family of curves. A particular solution uses a given condition, such as y = 3 when x = 0, to find the value of c and pick out one curve from the family.
Separating variables
At A level, the main technique is separation of variables. It works when the equation can be written as dy/dx = f(x)g(y): a function of x times a function of y.
- Rearrange so all the y terms (with dy) are on one side and all the x terms (with dx) on the other: (1/g(y)) dy = f(x) dx.
- Integrate both sides. Add one constant of integration, on the x side.
- Rearrange to make y the subject if the question asks for it.
- Use any given condition to find the constant.
Worked examples
Example 1: a simple separation
Solve dy/dx = 6x²/y, given y = 4 when x = 0.
- Separate: y dy = 6x² dx.
- Integrate: y²/2 = 2x³ + c.
- At x = 0, y = 4: 8 = c. So y² = 4x³ + 16, and y = √(4x³ + 16), taking the positive root because y = 4 > 0.
Example 2: exponential growth
Solve dy/dx = 3y, given y = 2 when x = 0.
- Separate: (1/y) dy = 3 dx. Integrate: ln|y| = 3x + c.
- Exponentiate: y = e3x + c = Ae3x, where A = ec.
- y = 2 at x = 0 gives A = 2. y = 2e3x.
Example 3: a product on the right
Solve dy/dx = xy, given y = 1 when x = 0.
- (1/y) dy = x dx, so ln|y| = x²/2 + c.
- y = Aex²/2, and y(0) = 1 gives A = 1. y = ex²/2.
Example 4: separating with partial fractions
Solve dy/dx = y/(x(x + 1)) for x > 0, given y = 1 when x = 1.
- Separate: (1/y) dy = 1/(x(x + 1)) dx.
- Partial fractions: 1/(x(x + 1)) = 1/x − 1/(x + 1). Integrate: ln|y| = ln x − ln(x + 1) + c.
- Combine the logs: y = Ax/(x + 1). At x = 1, y = 1: 1 = A/2, so A = 2.
- y = 2x/(x + 1). Writing the constant as ln A instead of c often makes combining logs easier.
Forming differential equations from context
Many questions describe a situation in words and ask you to write the equation. Key phrases translate directly:
- “The rate of change of P is proportional to P”: dP/dt = kP.
- “The rate of decrease of m is proportional to m”: dm/dt = −km, with k > 0.
- “The rate of change of V is inversely proportional to the square root of V”: dV/dt = k/√V.
“Proportional to” introduces a constant k. Use a negative sign when the quantity is decreasing, so that k itself stays positive.
Example 5: population growth
A population grows at a rate proportional to its size. Initially it is 500, and after 2 years it is 800. Find the population after 5 years.
- dP/dt = kP, so P = 500ekt.
- 800 = 500e2k, so e2k = 1.6 and k = ½ ln 1.6 ≈ 0.235.
- P(5) = 500e5k = 500 × 1.62.5 ≈ 1619.
Example 6: Newton's law of cooling
A cup of tea at 90 °C cools in a room at 20 °C. The rate of cooling is proportional to the difference between its temperature θ and the room. After 10 minutes it is 60 °C. Find the time for it to reach 40 °C.
- dθ/dt = −k(θ − 20). Separate: ∫ 1/(θ − 20) dθ = ∫ −k dt, so ln(θ − 20) = −kt + c.
- θ − 20 = Ae−kt. At t = 0, A = 70. At t = 10: 40 = 70e−10k, so k = (1/10) ln(7/4) ≈ 0.0560.
- For θ = 40: 20 = 70e−kt, so t = ln(3.5)/k ≈ 22.4 minutes.
Interpreting and criticising models
Exam questions often ask about the model itself. An exponential growth model predicts that a population grows forever, which is unrealistic because food and space are limited. A cooling model predicts the tea approaches room temperature but never quite reaches it. Comment on whether the model's long-term behaviour makes sense, and suggest a refinement, such as a maximum population. These short answers carry real marks and need context.
Common mistakes
- Forgetting the constant of integration, or adding one on both sides.
- Writing ln y = 3x + c and then y = e3x + c instead of y = Ae3x.
- Using the wrong sign for decreasing quantities.
- Not finding the constant from the initial condition before answering the question.
Practice questions
Try each one before opening the answer.
Q1. Solve dy/dx = 4y, with y = 5 when x = 0.
Show answer
Q2. Solve dy/dx = cos x / y, with y = 2 when x = 0.
Show answer
Q3. Write a differential equation for: the rate of decrease of N is proportional to N.
Show answer
Q4. A substance decays with half-life 5 years. Find k in m = m0e−kt.
Show answer
Frequently asked questions
Are differential equations in A level Maths?
Yes. First-order equations solved by separating variables, and modelling with them, are in the second year of A level Maths. Second-order equations are in Further Maths.
Are differential equations in AP Calculus?
Yes. Separation of variables and exponential models are in Unit 7 of both AB and BC, and BC adds Euler's method and logistic growth.
Key takeaways
- A differential equation links a quantity to its rate of change.
- Separate variables: y terms with dy, x terms with dx.
- Add one constant of integration, then use the given condition.
- “Proportional to” means multiply by a constant k.
- Comment on the realism of the model in context.