Skip to main content
SingaporeFurther MathsSyllabus dot point

How do we solve first-order differential equations by separating variables and by the integrating factor method?

Solve first-order differential equations by separation of variables and by the integrating factor method, applying initial conditions

A focused answer to the H2 Further Mathematics outcome on first-order differential equations. Separation of variables, the integrating factor method for linear equations, general and particular solutions, and applying initial conditions.

Generated by Claude Opus 4.811 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

SEAB wants you to solve first-order differential equations by two methods: separation of variables, for equations where the variables can be split onto opposite sides, and the integrating factor method, for linear equations of the form dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x). You must produce a general solution and then a particular solution by applying an initial condition.

The answer

Separation of variables

If a first-order equation can be written so that all the yy (and dy\mathrm{d}y) terms are on one side and all the xx (and dx\mathrm{d}x) terms on the other,

g(y)dy=h(x)dx,\mathrm{g}(y)\,\mathrm{d}y = \mathrm{h}(x)\,\mathrm{d}x,

then integrate both sides. The single constant of integration (combine the two into one) is fixed later by the initial condition.

Recognising a separable equation

An equation is separable when dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} equals a product (or quotient) of a function of xx and a function of yy. If xx and yy are tangled additively (for example dydx=x+y\dfrac{\mathrm{d}y}{\mathrm{d}x} = x + y), separation fails and the integrating factor method is the tool.

The integrating factor method

For a linear first-order equation

dydx+P(x)y=Q(x),\frac{\mathrm{d}y}{\mathrm{d}x} + P(x)\,y = Q(x),

multiply through by the integrating factor

μ(x)=eP(x)dx.\mu(x) = \mathrm{e}^{\int P(x)\,\mathrm{d}x}.

The left side then collapses to the derivative of a product: ddx(μy)=μQ\dfrac{\mathrm{d}}{\mathrm{d}x}\big(\mu y\big) = \mu Q. Integrate both sides and divide by μ\mu to find yy.

General and particular solutions

Both methods give a general solution containing one arbitrary constant. Substituting the initial condition (a value of yy at a given xx) fixes the constant, producing the particular solution that the question asks for.

Examples in context

Example 1. Newton's law of cooling. The temperature of a cooling body obeys dTdt=k(TTs)\dfrac{\mathrm{d}T}{\mathrm{d}t} = -k(T - T_s), a separable equation whose solution T=Ts+(T0Ts)ektT = T_s + (T_0 - T_s)\mathrm{e}^{-kt} is the exponential approach to the surroundings, the workhorse of cooling and heating models.

Example 2. A mixing tank. The mass of dissolved substance in a tank with inflow and outflow satisfies a linear equation dmdt+rVm=c\dfrac{\mathrm{d}m}{\mathrm{d}t} + \dfrac{r}{V}m = c, solved by an integrating factor, which is why the integrating factor method appears throughout chemical and environmental modelling.

Try this

Q1. State the integrating factor for dydx+3y=x\dfrac{\mathrm{d}y}{\mathrm{d}x} + 3y = x. [1 mark]

  • Cue. μ=e3dx=e3x\mu = \mathrm{e}^{\int 3\,\mathrm{d}x} = \mathrm{e}^{3x}.

Q2. Separate the variables in dydx=xy\dfrac{\mathrm{d}y}{\mathrm{d}x} = xy. [1 mark]

  • Cue. 1ydy=xdx\dfrac{1}{y}\,\mathrm{d}y = x\,\mathrm{d}x, integrating to lny=12x2+C\ln|y| = \tfrac{1}{2}x^2 + C.

Q3. Why does the integrating factor method work after multiplying through? [2 marks]

  • Cue. The left side becomes ddx(μy)\dfrac{\mathrm{d}}{\mathrm{d}x}(\mu y) by the product rule, so the equation can be integrated directly.

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original6 marksSolve the differential equation dydx=x(1+y2)y\dfrac{dy}{dx} = \dfrac{x(1 + y^2)}{y}, given that y=1y = 1 when x=0x = 0.
Show worked answer →

This is separable. Gather yy on the left and xx on the right:

y1+y2dy=xdx.\frac{y}{1 + y^2}\,dy = x\,dx.

Integrate both sides. On the left, the numerator is half the derivative of 1+y21 + y^2:
y1+y2dy=12ln(1+y2),xdx=12x2.\int \frac{y}{1 + y^2}\,dy = \tfrac{1}{2}\ln(1 + y^2), \qquad \int x\,dx = \tfrac{1}{2}x^2.

So 12ln(1+y2)=12x2+C1\tfrac{1}{2}\ln(1 + y^2) = \tfrac{1}{2}x^2 + C_1, that is ln(1+y2)=x2+C\ln(1 + y^2) = x^2 + C.

Apply y=1y = 1 at x=0x = 0: ln2=0+C\ln 2 = 0 + C, so C=ln2C = \ln 2. Hence ln(1+y2)=x2+ln2\ln(1 + y^2) = x^2 + \ln 2, giving 1+y2=2ex21 + y^2 = 2\mathrm{e}^{x^2} and y=2ex21y = \sqrt{2\mathrm{e}^{x^2} - 1} (positive root, since y=1>0y = 1 > 0).

Markers reward separating correctly, both integrals (recognising the ln(1+y2)\ln(1 + y^2) form), applying the initial condition, and an explicit yy.

Original7 marksSolve dydx+2y=ex\dfrac{dy}{dx} + 2y = \mathrm{e}^{-x} given y=0y = 0 when x=0x = 0, using an integrating factor.
Show worked answer →

The equation is linear in the form dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x) with P=2P = 2. The integrating factor is μ=ePdx=e2x\mu = \mathrm{e}^{\int P\,dx} = \mathrm{e}^{2x}.

Multiply through: e2xdydx+2e2xy=e2xex=ex\mathrm{e}^{2x}\dfrac{dy}{dx} + 2\mathrm{e}^{2x}y = \mathrm{e}^{2x}\mathrm{e}^{-x} = \mathrm{e}^{x}. The left side is ddx(e2xy)\dfrac{d}{dx}\left(\mathrm{e}^{2x}y\right), so

ddx(e2xy)=ex.\frac{d}{dx}\left(\mathrm{e}^{2x}y\right) = \mathrm{e}^{x}.

Integrate: e2xy=ex+C\mathrm{e}^{2x}y = \mathrm{e}^{x} + C, so y=ex+Ce2xy = \mathrm{e}^{-x} + C\mathrm{e}^{-2x}.

Apply y=0y = 0 at x=0x = 0: 0=1+C0 = 1 + C, so C=1C = -1. Hence y=exe2xy = \mathrm{e}^{-x} - \mathrm{e}^{-2x}.

Markers reward identifying the linear form, the integrating factor e2x\mathrm{e}^{2x}, recognising the left side as a derivative of a product, integrating, and applying the condition to get y=exe2xy = \mathrm{e}^{-x} - \mathrm{e}^{-2x}.

Related dot points