Differential equations are equations involving derivatives of an unknown function. They arise
whenever a rate of change is related to the current state of a system — from population Growth to
electrical circuits. This chapter covers first-order equations (separable and integrating Factor
methods), second-order linear equations with constant coefficients, and modelling Applications.
Slope Field Explorer
Adjust the parameters in the graph above to explore the relationships between variables.
First-order + second-order linear with constant coefficients
OCR (A)
Paper 1
First-order + second-order linear with constant coefficients
CIE
P2
First-order (separable, integrating factor); second-order in P2
:::info All boards examine first-order ODEs. CIE and Edexcel require second-order linear ODEs. AQA
Focuses on first-order equations with growth and decay modelling. The formula booklet gives the
Integrating factor formula on Edexcel; AQA and OCR students must know it.
:::
1. First-Order ODEs: Separable Equations
1.1 Definition
Definition. A first-order ordinary differential equation (ODE) is separable if it can be
Written in the form
dxdy=f(x)g(y)
Where the right-hand side is a product of a function of x alone and a function of y alone.
1.2 Method
Separate the variables and integrate both sides:
∫g(y)1dy=∫f(x)dx
∫g(y)1dy=∫f(x)dx+C
1.3 Worked example
Solve dxdy=yx with y(0)=2.
Separate: ydy=xdx.
Integrate: 2y2=2x2+C.
Using y(0)=2: 24=0+C⟹C=2.
y2=x2+4,y=x2+4
(We take the positive root since y(0)=2>0.)
1.4 Domain restrictions
:::caution When dividing by g(y) during separation, we implicitly assume g(y)=0. If
g(y0)=0Then y=y0 is a constant (equilibrium) solution that may not appear in the general
Solution. Always check for these.
:::
Example.dxdy=y(1−y).
Separating: ∫y(1−y)1dy=∫dx.
Partial fractions: y(1−y)1=y1+1−y1.
ln∣y∣−ln∣1−y∣=x+C.
ln1−yy=x+C.
1−yy=Aex where A=±eC.
y=1+AexAex
But note y=0 and y=1 are also solutions (equilibrium solutions), corresponding to A=0
And the limiting case A→∞.
2. First-Order ODEs: Integrating Factor Method
2.1 Standard form
Definition. A first-order linear ODE has the form
dxdy+P(x)y=Q(x)
Where P(x) and Q(x) are continuous functions of x.
2.2 The integrating factor
The integrating factor is
μ(x)=e∫P(x)dx
2.3 Derivation of the method
Proof of the integrating factor technique
Multiply the ODE dxdy+P(x)y=Q(x) by μ(x):
μdxdy+μPy=μQ
The left-hand side is the derivative of μy because:
dxd(μy)=μdxdy+yL◆B◆dμ◆RB◆◆LB◆dx◆RB◆
Since L◆B◆dμ◆RB◆◆LB◆dx◆RB◆=μ⋅P(x) (because μ=e∫PdxSo
μ′=P⋅e∫Pdx=Pμ):
dxd(μy)=μdxdy+y⋅Pμ=μdxdy+μPy
This is exactly the left-hand side. Therefore:
dxd(μy)=μQ
Integrating both sides:
μy=∫μQdx+C
y=L◆B◆1◆RB◆◆LB◆μ◆RB◆(∫μQdx+C)
□
2.4 Worked example
Solve dxdy+x2y=x2 for x>0.
Here P(x)=x2, Q(x)=x2.
μ=e∫2/xdx=e2lnx=x2
Multiply through: x2dxdy+2xy=x4.
Left-hand side is dxd(x2y)=x4.
Integrate: x2y=5x5+C.
y=5x3+x2C
2.5 Worked example with boundary condition
Solve dxdy−3y=e2xGiven y(0)=1.
P(x)=−3, Q(x)=e2x.
μ=e∫−3dx=e−3x
dxd(e−3xy)=e−3x⋅e2x=e−x
e−3xy=∫e−xdx=−e−x+C
y=−e2x+Ce3x
Using y(0)=1: 1=−1+C⟹C=2.
y=2e3x−e2x
:::tip The constant of integration in μ=e∫Pdx can be omitted (absorbed into C).
Always choose the simplest antiderivative.
:::
3. Second-Order Linear ODEs with Constant Coefficients
3.1 General form
Definition. A second-order linear ODE with constant coefficients has the form
adx2d2y+bdxdy+cy=f(x)
Where a, b, c are constants with a=0.
The equation is homogeneous when f(x)=0:
adx2d2y+bdxdy+cy=0
3.2 The auxiliary equation
To solve the homogeneous equation, try y=emx. Then y′=memx and y′′=m2emx.
Substituting: am2emx+bmemx+cemx=0.
Since emx=0 for all x:
am2+bm+c=0
This is the auxiliary equation (or characteristic equation).
3.3 Three cases
The nature of the roots of am2+bm+c=0 determines the form of the general solution.
Case 1: Two distinct real rootsm1=m2 (discriminant Δ=b2−4ac>0):
y=Aem1x+Bem2x
Case 2: Repeated real rootm (discriminant Δ=0):
y=(A+Bx)emx
Case 3: Complex conjugate rootsm=α±βi (discriminant Δ<0):
y=eαx(Acosβx+Bsinβx)
Proof of the general solution for Case 3 (complex roots)
When m=α+βi and m=α−βiThe two linearly independent
Solutions are e(α+βi)x and e(α−βi)x.
Theorem (Superposition). If yh is the general solution of the homogeneous equation
ay′′+by′+cy=0 (the complementary function, CF), and yp is any particular solution of
ay′′+by′+cy=f(x) (a particular integral, PI), then the general solution is
y=yh+yp
Proof of the superposition principle
Let y1 satisfy ay1′′+by1′+cy1=0 and yp satisfy ayp′′+byp′+cyp=f(x).
So y1+yp satisfies the non-homogeneous equation. Since y1 contains two arbitrary constants,
The general solution y=yh+yp also contains two arbitrary constants. □
4.2 Method of undetermined coefficients
To find ypGuess the form based on f(x)Then determine coefficients by substitution.
f(x)
Trial yp (if not in CF)
If in CF, multiply by x
k (constant)
c
cx then cx2
kx+ℓ
px+q
x(px+q) then x2(px+q)
keαx
ceαx
cxeαx
kcosωx
ccosωx+dsinωx
x(ccosωx+dsinωx)
ksinωx
ccosωx+dsinωx
x(ccosωx+dsinωx)
Polynomial
General polynomial of same degree
Multiply by x as needed
:::caution If any term in your trial yp already appears in the complementary function yh
Multiply the entire trial by x. If it still appears, multiply by x2.
:::
4.3 Worked examples
Example 1. Solve y′′−3y′+2y=4e3x.
CF: m2−3m+2=0⟹(m−1)(m−2)=0⟹m=1,2. yh=Aex+Be2x.
PI: Since f(x)=4e3x and e3x is not in the CF, try yp=ce3x. yp′=3ce3xyp′′=9ce3x.
Substitute: 9ce3x−9ce3x+2ce3x=4e3x⟹2c=4⟹c=2.
y=Aex+Be2x+2e3x
Example 2. Solve y′′+y=sinx.
CF: m2+1=0⟹m=±i. yh=Acosx+Bsinx.
PI: f(x)=sinx. The terms cosx and sinx are in the CF, so multiply by x:
yp=x(ccosx+dsinx).
Definition. Newton’s law of cooling states that the rate of temperature change of a body is
Proportional to the difference between its temperature T and the ambient temperature Ta:
dtdT=−k(T−Ta)
Where k>0 is the cooling constant.
Solution. Let θ=T−Ta. Then L◆B◆dθ◆RB◆◆LB◆dt◆RB◆=−kθGiving
θ=θ0e−kt.
T=Ta+(T0−Ta)e−kt
Example. A cup of tea at 90°C is placed in a room at 20°C. After 10 minutes the temperature
Is 60°C. Find the temperature after 20 minutes.
The logistic equation models population growth with a carrying capacity M:
dtdP=kP(1−MP)
This is separable. The solution is
P(t)=1+Ae−ktM
Where A=P0M−P0.
5.4 Mixing problems
Example. A tank contains 100 litres of water with 10 kg of salt. Pure water flows in at 5 L/min,
And the mixture flows out at 5 L/min. Find the amount of salt after t minutes.
Let S(t) be the amount of salt (kg). Rate in = 0. Rate out = concentration × flow rate
=100S×5=20S.
dtdS=−20S
S=10e−t/20.
After 20 minutes: S(20)=10e−1≈3.68 kg.
6. Proof of the General Solution of the Second-Order Homogeneous ODE
Proof that the CF gives the general solution
We must show that for all three cases, the proposed general solution has two arbitrary constants and
Satisfies the ODE.
Case 1 (m1=m2Real). Let y1=em1x and y2=em2x.
Substituting y1 into ay′′+by′+cy=0:
am12em1x+bm1em1x+cem1x=(am12+bm1+c)em1x=0 since m1 is a
Root. Similarly for y2.
The Wronskian is
W=y1y2′−y1′y2=m2e(m1+m2)x−m1e(m1+m2)x=(m2−m1)e(m1+m2)x=0.
Since W=0, y1 and y2 are linearly independent, so y=Aem1x+Bem2x is the
General solution.
Case 2 (m repeated).y1=emx is one solution. We need a second linearly independent
Solution. Try y2=xemx.
y2′=emx(1+mx), y2′′=emx(2m+m2x).
ay2′′+by2′+cy2=emx[a(2m+m2x)+b(1+mx)+cx]
=emx[(am2+bm+c)x+(2am+b)]
The coefficient of x is zero since m satisfies the auxiliary equation. The constant:
2am+b=0 when the root is repeated (since m=−b/2a). So y2 is also a solution.
Forgetting the constant of integration when using an integrating factor
Integrate both sides after multiplying by μ; +C appears on the right
Using the wrong trial function for the particular integral
If the RHS is part of the complementary function, multiply by x (or x2 if needed)
Confusing Aemx (single root) with (A+Bx)emx (repeated root)
Check the discriminant: repeated root ⟺ discriminant =0
Not applying initial conditions to find A and B
Always substitute the given conditions into the general solution and its derivative
10. Additional Exam-Style Questions
Question 8
Solve dx2d2y−2dxdy−3y=6e2x.
Solution
CF: m2−2m−3=0⟹(m−3)(m+1)=0. yc=Ae3x+Be−x.
PI: Try yp=Ce2x. Substituting: 4C−4C−3C=6⟹C=−2.
y=Ae3x+Be−x−2e2x
Question 9
A body cools according to L◆B◆dθ◆RB◆◆LB◆dt◆RB◆=−k(θ−20)Where θ is the
Temperature in °C and 20°C is the room temperature. If θ(0)=90 and
θ(10)=50Find θ(30).
Prove that the Wronskian W(y1,y2)=y1y2′−y1′y2=0 if and only if y1 and y2
Are linearly independent solutions of a second-order linear ODE.
Solution
If y1 and y2 are linearly dependent, y2=cy1Then W=y1(cy1′)−y1′(cy1)=0.
Conversely, if W=0 at some point and both satisfy the same linear ODE, then the initial value
Problem with initial conditions matching y1 and y2 would have two solutions, contradicting
Uniqueness. Hence y1 and y2 must be linearly dependent.
Therefore W=0⟺ linearly independent. ■
14. Advanced Topics
14.1 The integrating factor method — derivation
For dxdy+P(x)y=Q(x)Multiply by μ=e∫Pdx:
μdxdy+μPy=μQ
dxd(μy)=μQ
μy=∫μQdx+C
y=L◆B◆1◆RB◆◆LB◆μ◆RB◆∫μQdx+L◆B◆C◆RB◆◆LB◆μ◆RB◆
14.2 Systems of linear ODEs
For the system x˙=Ax where x=(x1,…,xn):
If A is diagonalisable with A=PDP−1Let
z=P−1x:
z˙=DzGiving zi=cieλit.
x=Pz=∑cieλitvi.
14.3 Boundary value problems vs initial value problems
An IVP specifies y and y′ at one point. A BVP specifies y at two (or more) points. BVPs may
Have zero, one, or multiple solutions, unlike IVPs which (for linear ODEs) have a unique solution.
14.4 Phase portraits
For autonomous 2D systems x˙=f(x,y), y˙=g(x,y)The phase portrait shows
Trajectories in the xy-plane. Key features:
Fixed points: where x˙=y˙=0
Stability: determined by the eigenvalues of the Jacobian at each fixed point
15. Further Exam-Style Questions
Question 14
Solve dxdy=xyx2+y2 using an appropriate substitution.
Solution
This is homogeneous: dxdy=y/x1+(y/x)2. Let v=y/x:
v+xdxdv=v1+v2=v1+v.
xdxdv=v1.
∫vdv=∫xdx⟹2v2=ln∣x∣+C.
2x2y2=ln∣x∣+C.
y2=2x2(ln∣x∣+C).
Question 15
Prove that the general solution of dx2d2y+ω2y=0 can be written as
y=Rcos(ωx−δ) where R and δ are constants.
Solution
The general solution is y=Acosωx+Bsinωx.
Let Rcosδ=A and Rsinδ=B. Then R=A2+B2 and δ=arctan(B/A).