Cambridge International AS & A Level · Topic 2.6
A-Level Further Maths 9231 / Topic 2.6 / AS & A Level

Make the left side a perfect derivative.

A first order linear equation \(\dfrac{dy}{dx} + P(x)\,y = Q(x)\) usually cannot be separated, but one clever multiplier turns its left side into the derivative of a product. Find the integrating factor, integrate once, fix the constant from a condition, and read off what a tank or a cooling object does in the long run.

The key idea

Write the equation in standard form \(\dfrac{dy}{dx} + P(x)\,y = Q(x)\) (divide through by the coefficient of \(\dfrac{dy}{dx}\) first). The integrating factor is \(I(x) = e^{\int P\,dx}\), with no constant needed. Multiplying through makes the left side exactly \(\dfrac{d}{dx}\big(I y\big)\), so \(I y = \displaystyle\int I\,Q\,dx\), and the \(+\,C\) goes in at this step, BEFORE you divide by \(I\).

x y 1 2 3 4 −4 −2 2 4 C = −2 C = −1 C = 1 C = 2 C = 3 C = 0: y = x − 1 C > 0 C < 0 dy/dx + y = x y = x − 1 + Ce⁻ˣ Ce⁻ˣ → 0, so every curve approaches the line y = x − 1
Fig. 1: the general solution of dy/dx + y = x is y = x - 1 + Ce^(-x), one curve for each value of C. The particular solution is chosen by a condition such as y(0) = 2 (which gives C = 3). Because Ce^(-x) dies away, every curve approaches the line y = x - 1: the long-term behaviour does not depend on the starting value
Section 01

The integrating factor.

A first order linear equation has \(y\) and \(\dfrac{dy}{dx}\) only to the first power, with coefficients that are functions of \(x\). Put it in standard form \(\dfrac{dy}{dx} + P(x)\,y = Q(x)\). The idea comes from the product rule: \(\dfrac{d}{dx}(Iy) = I\dfrac{dy}{dx} + \dfrac{dI}{dx}\,y\). If we multiply the equation by \(I\), the left side is \(I\dfrac{dy}{dx} + IP\,y\), and this matches the product rule exactly when \(\dfrac{dI}{dx} = IP\). Separating that tiny equation gives \(I = e^{\int P\,dx}\).

\(P(x)\)\(\int P\,dx\)Integrating factor
\(3\)\(3x\)\(e^{3x}\)
\(-2\)\(-2x\)\(e^{-2x}\)
\(\dfrac{2}{x}\) (\(x \gt 0\))\(2\ln x = \ln x^{2}\)\(x^{2}\)
\(-\dfrac{1}{x}\) (\(x \gt 0\))\(-\ln x = \ln x^{-1}\)\(\dfrac{1}{x}\)

The method, every time: (1) standard form; (2) \(I = e^{\int P\,dx}\), simplified with \(e^{\ln f} = f\); (3) multiply through and write the left side as \(\dfrac{d}{dx}(Iy)\); (4) integrate both sides, adding \(C\); (5) divide by \(I\). No constant is needed in \(\int P\,dx\): a constant \(k\) would only multiply \(I\) by \(e^{k}\), which cancels.

Worked example P is a constant
Find the general solution of \(\dfrac{dy}{dx} + 3y = 6x\).
  1. Already in standard form with \(P = 3\), so \(I = e^{\int 3\,dx} = e^{3x}\).
  2. Multiply through: \(e^{3x}\dfrac{dy}{dx} + 3e^{3x}y = 6xe^{3x}\), that is \(\dfrac{d}{dx}\big(ye^{3x}\big) = 6xe^{3x}\).
  3. Integrate by parts (\(u = 6x\), \(v' = e^{3x}\)): \[ye^{3x} = 2xe^{3x} - \int 2e^{3x}\,dx = 2xe^{3x} - \tfrac{2}{3}e^{3x} + C.\]
  4. Divide by \(e^{3x}\): \(y = 2x - \tfrac{2}{3} + Ce^{-3x}\).
  5. Check: \(\dfrac{dy}{dx} = 2 - 3Ce^{-3x}\), and \(2 - 3Ce^{-3x} + 6x - 2 + 3Ce^{-3x} = 6x\).
Answer: \(y = 2x - \tfrac{2}{3} + Ce^{-3x}\)
Worked example Divide through first
Find the general solution of \(x\dfrac{dy}{dx} + 2y = 5x^{3}\) for \(x \gt 0\).
  1. Divide by \(x\) to reach standard form: \(\dfrac{dy}{dx} + \dfrac{2}{x}\,y = 5x^{2}\), so \(P = \dfrac{2}{x}\).
  2. \(I = e^{\int 2/x\,dx} = e^{2\ln x} = e^{\ln x^{2}} = x^{2}\).
  3. Multiply through: \(x^{2}\dfrac{dy}{dx} + 2xy = 5x^{4}\), that is \(\dfrac{d}{dx}\big(x^{2}y\big) = 5x^{4}\).
  4. Integrate: \(x^{2}y = x^{5} + C\).
  5. Divide by \(x^{2}\): \(y = x^{3} + \dfrac{C}{x^{2}}\).
Answer: \(y = x^{3} + \dfrac{C}{x^{2}}\)
Your turn
Find the general solution of \(\dfrac{dy}{dx} - y = e^{x}\).
Examiner trap

Find \(P\) only AFTER dividing by the coefficient of \(\dfrac{dy}{dx}\). For \(x\dfrac{dy}{dx} + 2y = 5x^{3}\), using \(P = 2\) gives \(I = e^{2x}\) and nonsense; the right factor is \(x^{2}\). And the right side must be multiplied by \(I\) too: \(\dfrac{d}{dx}(x^{2}y) = 5x^{4}\), not \(5x^{3}\).

Section 02

Trig, hyperbolic and particular solutions.

When \(P\) is \(\tan x\), \(\cot x\), \(\tanh x\) or \(\coth x\), the integral \(\int P\,dx\) is a logarithm, so \(e^{\int P\,dx}\) collapses to a single function. Be careful with the sign: \(\int \tan x\,dx = -\ln\cos x = \ln\sec x\), so the factor is \(\sec x\), not \(\cos x\). A condition such as \(y = 2\) when \(x = 0\) then fixes \(C\) and picks one curve from the family: the particular solution.

\(P(x)\)\(\int P\,dx\)Integrating factor
\(\tan x\)\(\ln\sec x\)\(\sec x\)
\(-\tan x\)\(\ln\cos x\)\(\cos x\)
\(\cot x\)\(\ln\sin x\)\(\sin x\)
\(\tanh x\)\(\ln\cosh x\)\(\cosh x\)
\(2\coth x\) (\(x \gt 0\))\(2\ln\sinh x\)\(\sinh^{2}x\)

Work on an interval where the logarithm makes sense (for \(\sec x\), take \(-\tfrac{\pi}{2} \lt x \lt \tfrac{\pi}{2}\)). Substitute the condition into the line \(Iy = \dots + C\), where the numbers are simplest, then divide by \(I\).

Worked example P = tan x, with a condition
Solve \(\dfrac{dy}{dx} + y\tan x = \cos^{2}x\) for \(-\tfrac{\pi}{2} \lt x \lt \tfrac{\pi}{2}\), given that \(y = 2\) when \(x = 0\).
  1. \(I = e^{\int\tan x\,dx} = e^{\ln\sec x} = \sec x\).
  2. Multiply through: \(\dfrac{d}{dx}\big(y\sec x\big) = \cos^{2}x\sec x = \cos x\).
  3. Integrate: \(y\sec x = \sin x + C\).
  4. \(x = 0\), \(y = 2\): \(2 \times 1 = 0 + C\), so \(C = 2\).
  5. Multiply by \(\cos x\): \(y = \sin x\cos x + 2\cos x\).
Answer: \(y = \sin x\cos x + 2\cos x\)
Worked example P = tanh x
Solve \(\dfrac{dy}{dx} + y\tanh x = 2\operatorname{sech}x\), given that \(y = 3\) when \(x = 0\), and describe what happens to \(y\) as \(x \to \infty\).
  1. \(I = e^{\int\tanh x\,dx} = e^{\ln\cosh x} = \cosh x\) (no modulus needed: \(\cosh x \gt 0\)).
  2. \(\dfrac{d}{dx}\big(y\cosh x\big) = 2\operatorname{sech}x\cosh x = 2\).
  3. Integrate: \(y\cosh x = 2x + C\). At \(x = 0\): \(3 \times 1 = 0 + C\), so \(C = 3\).
  4. \(y = \dfrac{2x + 3}{\cosh x}\).
  5. As \(x \to \infty\), \(\cosh x\) grows like \(\tfrac{1}{2}e^{x}\), far faster than \(2x + 3\), so \(y \to 0\).
Answer: \(y = (2x + 3)\operatorname{sech}x\), and \(y \to 0\) as \(x \to \infty\)
Your turn
Solve \(x\dfrac{dy}{dx} + y = 3x^{2}\) for \(x \gt 0\), given that \(y = 2\) when \(x = 1\).
Examiner trap

Two classic slips. First, \(\int\tan x\,dx = \ln\sec x\), so the factor is \(\sec x\); using \(\cos x\) makes the left side fail to be a derivative. Second, the constant: from \(y\sec x = \sin x + C\) the answer is \(y = \sin x\cos x + C\cos x\). Writing \(y = \sin x\cos x + C\) (dividing everything except \(C\)) gives a function that does not satisfy the equation.

Stage 1 · Learn

Check your understanding

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

What is the integrating factor for \(\dfrac{dy}{dx} + 4y = x^{2}\)?

Quick check+10 XP

What is the integrating factor for \(x\dfrac{dy}{dx} + 3y = x^{2}\), \(x \gt 0\)?

Quick check+10 XP

What is the integrating factor for \(\dfrac{dy}{dx} + y\tan x = \sin x\), \(0 \lt x \lt \tfrac{\pi}{2}\)?

Quick check+10 XP

After multiplying by the integrating factor, an equation becomes \(\dfrac{d}{dx}\big(x^{2}y\big) = 6x\). What is the general solution?

Section 03

Models and the long run.

Many models are built from \(\text{rate of change} = \text{rate in} - \text{rate out}\). When the rate out is proportional to the amount present, the equation is first order linear. Solve it with an integrating factor, use the starting value, then interpret: the term multiplied by \(C\) usually decays (a transient), and what is left describes the long-term behaviour.

A mixing tank: if brine of concentration \(c\) kg per litre flows in at \(a\) litres per minute and the well-stirred mixture flows out at \(b\) litres per minute, the volume is \(V = V_{0} + (a - b)t\) and the salt \(S\) kg satisfies

\[\dfrac{dS}{dt} = ac - \dfrac{b}{V}\,S.\]

When \(a \ne b\), \(V\) depends on \(t\), so the equation cannot be separated, but \(P = \dfrac{b}{V}\) has a logarithm as its integral and the integrating factor is a power of \(V\). Newton's law of cooling, \(\dfrac{d\theta}{dt} = -k(\theta - T)\), is separable when the surroundings stay at a fixed \(T\), but needs an integrating factor when \(T\) changes with time. Always state where the model stops working (the tank overflows, the room stops warming).

Worked example A filling tank
A tank holds 100 litres of pure water. Brine containing 0.2 kg of salt per litre flows in at 3 litres per minute, and the well-stirred mixture flows out at 2 litres per minute. Find the mass of salt \(S\) kg after \(t\) minutes, find \(S\) when \(t = 100\), and describe the concentration in the long run.
  1. \(V = 100 + t\). Salt in: \(3 \times 0.2 = 0.6\) kg per minute. Salt out: \(2 \times \dfrac{S}{100 + t}\). So \[\dfrac{dS}{dt} + \dfrac{2}{100 + t}\,S = 0.6.\]
  2. \(I = e^{2\ln(100 + t)} = (100 + t)^{2}\), so \(\dfrac{d}{dt}\Big(S(100 + t)^{2}\Big) = 0.6(100 + t)^{2}\).
  3. Integrate: \(S(100 + t)^{2} = 0.2(100 + t)^{3} + C\).
  4. \(t = 0\), \(S = 0\): \(0 = 0.2 \times 10^{6} + C\), so \(C = -200\,000\). \[S = 0.2(100 + t) - \dfrac{200\,000}{(100 + t)^{2}}.\]
  5. \(t = 100\): \(S = 40 - \dfrac{200\,000}{40\,000} = 35\) kg.
  6. Concentration \(\dfrac{S}{V} = 0.2 - \dfrac{200\,000}{(100 + t)^{3}} \to 0.2\) kg per litre: it rises towards the inflow concentration but never reaches it (until the tank overflows and the model ends).
Answer: \(S = 0.2(100 + t) - \dfrac{200\,000}{(100 + t)^{2}}\); \(S = 35\) kg at \(t = 100\); the concentration tends to 0.2 kg per litre
Worked example Cooling in a warming room
An object at 60 °C is placed in a room at 10 °C. The heating is on, so the room temperature after \(t\) hours is \(10 + t\) °C for \(0 \le t \le 12\). The object's temperature \(\theta\) °C satisfies \(\dfrac{d\theta}{dt} = -0.5\big(\theta - (10 + t)\big)\). Find \(\theta\) in terms of \(t\) and describe its behaviour once \(t\) is large.
  1. Standard form: \(\dfrac{d\theta}{dt} + 0.5\theta = 5 + 0.5t\). \(I = e^{0.5t}\).
  2. \(\dfrac{d}{dt}\big(\theta e^{0.5t}\big) = (5 + 0.5t)e^{0.5t}\).
  3. By parts, \(\int 0.5te^{0.5t}\,dt = te^{0.5t} - 2e^{0.5t}\), so \[\theta e^{0.5t} = 10e^{0.5t} + te^{0.5t} - 2e^{0.5t} + C = (t + 8)e^{0.5t} + C.\]
  4. \(\theta = t + 8 + Ce^{-0.5t}\). At \(t = 0\): \(60 = 8 + C\), so \(C = 52\).
  5. \(\theta = t + 8 + 52e^{-0.5t}\). The transient \(52e^{-0.5t}\) dies away, leaving \(\theta \approx t + 8\), while the room is at \(t + 10\).
  6. So the object first cools, then warms with the room, settling about 2 °C BELOW the room temperature: it lags behind because it is always catching up (at \(t = 12\) the gap is already 1.87 °C).
Answer: \(\theta = t + 8 + 52e^{-0.5t}\); for large \(t\) the object follows the room about 2 °C behind it
Your turn
A drug is given by a drip at 4 mg per hour and is removed at a rate of \(0.2Q\) mg per hour, where \(Q\) mg is the amount in the body. Given \(Q = 0\) at \(t = 0\), find \(Q\) in terms of \(t\), its long-term value, and when \(Q = 15\).
Examiner trap

Read the rate out carefully: it is (outflow rate) \(\times\) (concentration) \(= b \times \dfrac{S}{V}\), with \(V\) the CURRENT volume, not the starting volume. And when you interpret, say what happens in words with units (for example 'the concentration approaches 0.2 kg per litre'), and say where the model stops applying.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS & A Level Further Mathematics Paper 1 to 4 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

Find the general solution of \(\dfrac{dy}{dx} - \dfrac{2y}{x} = x\) for \(x \gt 0\).

Exam style+20 XP

Solve \(\dfrac{dy}{dx} + 2y = 4\), given that \(y = 5\) when \(x = 0\).

Exam style+20 XP

Pollutant in a lake satisfies \(\dfrac{dx}{dt} + \dfrac{x}{50} = 3\), where \(x\) tonnes is the amount at time \(t\) years and \(x = 0\) at \(t = 0\). What happens to \(x\) in the long run?

Exam style+20 XP

Find the general solution of \(\dfrac{dy}{dx} + y\coth x = 2\cosh x\) for \(x \gt 0\).

Skill unlocked

Standard form, integrating factor, one integration: linear equations solved.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Integrating factors for constant, \(k/x\), \(\tan x\) and \(\coth x\) coefficients, particular solutions from a condition, a filling tank that overflows, and a cooling model whose surroundings change.