Mathematics/Lessons/Integration/Differential Equations
Pure · Integration · Year 2

Differential Equations

An equation about rates of change can be pulled apart, integrated piece by piece, and reassembled into the function it was describing all along.

10 min read 4 worked examples
Prerequisite

Connected Rates of Change in the Differentiation module covers how a differential equation like $\dfrac{dV}{dt}=kV$ gets set up from a real-world description, often via the chain rule linking several changing quantities. This lesson picks up from an already-formed differential equation and focuses on solving it.

Separating the variables

A first-order differential equation of the form $\dfrac{dy}{dx}=f(x)g(y)$ is called separable, because all the $y$-terms can be gathered on one side and all the $x$-terms on the other. Treating $\dfrac{dy}{dx}$ algebraically as a fraction (which is valid here, since it falls out of the chain rule when integrating both sides),

$\dfrac{dy}{dx}=f(x)g(y) \quad\Longrightarrow\quad \int \dfrac{1}{g(y)}\,dy = \int f(x)\,dx$

Both sides are then integrated independently — with respect to $y$ on the left and $x$ on the right. Since two separate integrations are involved, only a single constant of integration is needed overall (the two constants can be combined into one, conventionally written on the right-hand side).

General vs. particular solutions

Integrating both sides produces a general solution: a whole family of curves, one for each value of the arbitrary constant $c$. A boundary condition — a known point $(x_0,y_0)$ that the solution must pass through — pins down the exact value of $c$, giving a single particular solution.

Working order

1) Separate the variables. 2) Integrate both sides, adding one constant $c$. 3) Substitute the boundary condition to find $c$. 4) Rearrange to express $y$ explicitly in terms of $x$, if required.

Interpreting the solution's limitations

A differential equation is usually a model of some real situation — population growth, cooling, chemical concentration — so the algebraic solution should always be checked against the context it came from. Solutions are often only valid for a restricted domain (e.g. $t\ge0$ for a time variable), and predictions far outside the range where the model was fitted (extrapolation) should be treated with caution, since the underlying assumptions may no longer hold.

Worked example 1

Finding a general solution
Find the general solution of $\dfrac{dy}{dx}=\dfrac{x}{y}$, for $y>0$.
MethodSeparate the variables, then integrate each side
1
Separate: $y\,dy = x\,dx$.
Multiply both sides by y and by dx to gather like terms.
2
$\displaystyle\int y\,dy = \int x\,dx$.
Integrate both sides independently.
3
$\dfrac{y^2}{2} = \dfrac{x^2}{2}+c$.
A single constant suffices for both integrations combined.
4
$y^2 = x^2+2c$, or writing $A=2c$: $y^2=x^2+A$.
Multiply through by 2 and rename the constant for a tidier form.
5
Since $y>0$: $y=\sqrt{x^2+A}$.
Take the positive square root, consistent with the given restriction.
▪ solved
A family of curves

Each value of $A$ traces out a different curve $y=\sqrt{x^2+A}$ — the general solution describes an entire family, all satisfying the same differential equation, differing only by a vertical shift-like parameter.

Worked example 2

Finding a particular solution
Given that $\dfrac{dy}{dx}=6x^2y$ and $y=4$ when $x=0$, find $y$ in terms of $x$.
MethodSeparate, integrate, then apply the boundary condition
1
Separate: $\dfrac{1}{y}\,dy = 6x^2\,dx$.
Gather y-terms and x-terms onto opposite sides.
2
$\displaystyle\int\dfrac1y\,dy = \int6x^2\,dx \Rightarrow \ln|y| = 2x^3+c$.
Integrate both sides.
3
Substitute $x=0,\,y=4$: $\ln4 = 0+c \Rightarrow c=\ln4$.
Apply the boundary condition to find c.
4
$\ln|y| = 2x^3+\ln4 \Rightarrow \ln|y|-\ln4 = 2x^3 \Rightarrow \ln\Big|\dfrac{y}{4}\Big|=2x^3$.
Combine logarithms using log laws.
5
$\dfrac{y}{4}=e^{2x^3} \Rightarrow y=4e^{2x^3}$.
Exponentiate both sides to make y the subject; y = 4 > 0 justifies dropping the modulus.
▪ solved

Worked example 3

A separable equation requiring partial fractions
Given $\dfrac{dP}{dt}=P(10-P)$ and $P=2$ when $t=0$, find the particular solution for $P$ in terms of $t$.
MethodSeparate, decompose into partial fractions, integrate, then apply the boundary condition
1
Separate: $\displaystyle\int\dfrac{1}{P(10-P)}\,dP = \int1\,dt$.
Gather P-terms and t-terms; the right side integrates trivially.
2
$\dfrac{1}{P(10-P)}\equiv\dfrac{1/10}{P}+\dfrac{1/10}{10-P}$ (by partial fractions).
The left-hand integrand needs decomposing before it can be integrated.
3
$\displaystyle\int\Big(\dfrac{1/10}{P}+\dfrac{1/10}{10-P}\Big)dP = \dfrac1{10}\ln|P| - \dfrac1{10}\ln|10-P| = t+c$.
Integrate; note the extra minus sign from differentiating (10 − P) inside the log.
4
$\dfrac1{10}\ln\Big|\dfrac{P}{10-P}\Big| = t+c \Rightarrow \ln\Big|\dfrac{P}{10-P}\Big| = 10t+10c$.
Combine logs and multiply through by 10.
5
At $t=0,\,P=2$: $\ln\Big|\dfrac{2}{8}\Big|=\ln\dfrac14=10c \Rightarrow c = \dfrac{1}{10}\ln\dfrac14$.
Apply the boundary condition.
6
$\ln\Big|\dfrac{P}{10-P}\Big| = 10t + \ln\dfrac14 \Rightarrow \dfrac{P}{10-P} = \dfrac14e^{10t} \Rightarrow P = \dfrac{10e^{10t}}{4+e^{10t}}$.
Exponentiate and rearrange to make P the subject.
▪ solved

Worked example 4

Interpreting the solution in context · Challenge
For the model in Example 3 (where $P$ represents a population in thousands, $t$ in years), state what happens to $P$ as $t\to\infty$, and comment on a limitation of the model.
MethodAnalyse the long-term behaviour of the solution, then evaluate the model's realism
1
As $t\to\infty$, $e^{10t}\to\infty$, so $P=\dfrac{10e^{10t}}{4+e^{10t}} \to \dfrac{10e^{10t}}{e^{10t}} = 10$.
Divide numerator and denominator by e^(10t) to see the dominant behaviour.
2
So the population approaches a long-term limit of $P=10$ (i.e. 10,000), never quite reaching or exceeding it.
This matches P(10 − P) = 0 at P = 10, a natural "capacity" where growth stops.
3
This behaviour is consistent with the differential equation itself: when $P$ is close to $10$, $\dfrac{dP}{dt}=P(10-P)$ is close to zero, so growth slows to a halt near this ceiling.
A sanity check that the algebraic solution matches the original equation's structure.
4
Limitation: the model assumes continuous, smooth growth with a fixed carrying capacity of exactly 10 — real populations are affected by discrete events (disease, migration, resource shocks) that this simple model cannot capture, especially over long time horizons.
Solutions to real-world differential equations should always be interpreted with their modelling assumptions in mind.
▪ solved
Look deeper — the shape of the family

Different boundary conditions (different starting populations) all produce curves approaching the same limit $P=10$ as $t\to\infty$, but starting populations above $10$ would decrease towards it instead — the general solution describes this entire family of possible behaviours, of which the particular solution is just one member.

Common mistake

Adding a constant of integration to both sides after separating the variables. Since the two constants can always be combined into one (by subtracting one from the other), only a single constant $c$ should appear in the working — usually written on the side with the "simpler" variable, by convention.

Check yourself

Given $\dfrac{dy}{dx}=\dfrac{2y}{x}$ for $x>0,\,y>0$, and $y=3$ when $x=1$, find $y$ in terms of $x$.
(Hint: separate the variables, integrate, then use the boundary condition to find c.)

Method
1
$\displaystyle\int\dfrac1y\,dy = \int\dfrac2x\,dx \Rightarrow \ln|y| = 2\ln|x|+c$.
Separate and integrate.
2
At $x=1,\,y=3$: $\ln3 = 0+c \Rightarrow c=\ln3$.
Apply the boundary condition.
3
$\ln|y| = 2\ln|x|+\ln3 = \ln(3x^2) \Rightarrow y=3x^2$.
Combine logs (2 ln x = ln x²) and exponentiate.
▪ solved