Skip to main content
SingaporeFurther MathsSyllabus dot point

How do we solve a non-homogeneous second-order linear differential equation using a complementary function and a particular integral?

Solve non-homogeneous second-order linear differential equations by finding the complementary function and a particular integral for standard forcing terms

A focused answer to the H2 Further Mathematics outcome on non-homogeneous second-order ODEs. The complementary function plus particular integral structure, trial forms for polynomial, exponential and trigonometric forcing, the breakdown case, and fitting initial conditions last.

Generated by Claude Opus 4.812 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 a non-homogeneous second-order linear equation

ad2ydx2+bdydx+cy=f(x),a\frac{\mathrm{d}^2 y}{\mathrm{d}x^2} + b\frac{\mathrm{d}y}{\mathrm{d}x} + cy = \mathrm{f}(x),

by combining the complementary function (the general solution of the homogeneous equation) with a particular integral (any one solution of the full equation). You choose the particular integral by a trial form matched to the forcing term f(x)\mathrm{f}(x), and apply initial conditions only at the very end.

The answer

The structure of the general solution

The general solution is

y=yc+yp,y = y_c + y_p,

where ycy_c is the complementary function (containing the two arbitrary constants) and ypy_p is any particular integral. This works because the equation is linear: adding a solution of the homogeneous equation to a particular solution still satisfies the full equation.

Step one: the complementary function

Solve ay+by+cy=0a y'' + b y' + c y = 0 via the auxiliary equation, using the three cases (distinct real, repeated, complex). This supplies ycy_c and the constants AA and BB.

Step two: the particular integral by trial

Choose a trial ypy_p matching the form of f(x)\mathrm{f}(x), then substitute and match coefficients:

  • polynomial of degree nn: try a general polynomial of degree nn;
  • ekx\mathrm{e}^{kx}: try aekxa\mathrm{e}^{kx};
  • cosωx\cos\omega x or sinωx\sin\omega x: try acosωx+bsinωxa\cos\omega x + b\sin\omega x (include both even if only one appears).

The breakdown (resonance) case

If the trial form already appears in the complementary function, substituting it gives 0=f(x)0 = \mathrm{f}(x), which is impossible. Fix this by multiplying the trial by xx (or x2x^2 if it still clashes with a repeated root). Physically this is resonance: the forcing matches a natural mode, and the response grows like xx.

Step three: apply initial conditions last

Combine y=yc+ypy = y_c + y_p first, then differentiate and substitute the initial conditions to fix AA and BB. Fitting the constants to ycy_c alone, before adding ypy_p, is wrong.

Examples in context

Example 1. Driven oscillator. A forced spring-mass system x¨+ω02x=Fcosωt\ddot{x} + \omega_0^2 x = F\cos\omega t has a sinusoidal particular integral giving the steady-state response, while resonance (when ω=ω0\omega = \omega_0) forces the xsinωtx\sin\omega t growth, the mathematical signature of a system driven at its natural frequency.

Example 2. Circuit with a source. An RLC circuit driven by a constant or sinusoidal voltage source is modelled by a non-homogeneous equation; the complementary function is the transient that decays away and the particular integral is the steady-state current that persists, the standard transient-plus-steady-state decomposition.

Try this

Q1. State the structure of the general solution of a non-homogeneous linear ODE. [1 mark]

  • Cue. y=yc+ypy = y_c + y_p: complementary function plus a particular integral.

Q2. What trial particular integral suits forcing f(x)=5e3x\mathrm{f}(x) = 5\mathrm{e}^{3x} (not in the complementary function)? [1 mark]

  • Cue. yp=ae3xy_p = a\mathrm{e}^{3x}.

Q3. Why must the trial be multiplied by xx when it matches the complementary function? [2 marks]

  • Cue. Otherwise it solves the homogeneous equation and substitution gives 0=f(x)0 = \mathrm{f}(x); the extra xx produces an independent form (resonance).

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.

Original7 marksFind the general solution of d2ydx23dydx+2y=4x\dfrac{d^2 y}{dx^2} - 3\dfrac{dy}{dx} + 2y = 4x.
Show worked answer →

Complementary function: solve the homogeneous equation. Auxiliary equation λ23λ+2=0\lambda^2 - 3\lambda + 2 = 0 gives (λ1)(λ2)=0(\lambda - 1)(\lambda - 2) = 0, so λ=1,2\lambda = 1, 2 and yc=Aex+Be2xy_c = A\mathrm{e}^{x} + B\mathrm{e}^{2x}.

Particular integral: the forcing 4x4x is a polynomial of degree 11, so try yp=ax+by_p = ax + b. Then yp=ay_p' = a, yp=0y_p'' = 0. Substitute:

03a+2(ax+b)=4x2ax+(2b3a)=4x.0 - 3a + 2(ax + b) = 4x \Rightarrow 2ax + (2b - 3a) = 4x.

Match coefficients: 2a=4a=22a = 4 \Rightarrow a = 2; 2b3a=02b=6b=32b - 3a = 0 \Rightarrow 2b = 6 \Rightarrow b = 3. So yp=2x+3y_p = 2x + 3.

General solution: y=Aex+Be2x+2x+3y = A\mathrm{e}^{x} + B\mathrm{e}^{2x} + 2x + 3.

Markers reward the complementary function, the polynomial trial form, matching coefficients to find a=2a = 2, b=3b = 3, and combining into the general solution.

Original7 marksFind the general solution of d2ydx2+y=2cosx\dfrac{d^2 y}{dx^2} + y = 2\cos x, noting the resonance between the forcing and the complementary function.
Show worked answer →

Complementary function: λ2+1=0\lambda^2 + 1 = 0 gives λ=±i\lambda = \pm i, so yc=Acosx+Bsinxy_c = A\cos x + B\sin x.

The forcing 2cosx2\cos x already appears in the complementary function (resonance), so the usual trial acosx+bsinxa\cos x + b\sin x would be absorbed and fail. Multiply the trial by xx: try yp=x(acosx+bsinx)y_p = x(a\cos x + b\sin x).

Differentiate twice. yp=acosx+bsinx+x(asinx+bcosx)y_p' = a\cos x + b\sin x + x(-a\sin x + b\cos x), and

yp=2(asinx+bcosx)+x(acosxbsinx).y_p'' = 2(-a\sin x + b\cos x) + x(-a\cos x - b\sin x).

Then yp+yp=2(asinx+bcosx)y_p'' + y_p = 2(-a\sin x + b\cos x) (the xx terms cancel). Set equal to 2cosx2\cos x: 2a=0a=0-2a = 0 \Rightarrow a = 0 and 2b=2b=12b = 2 \Rightarrow b = 1. So yp=xsinxy_p = x\sin x.

General solution: y=Acosx+Bsinx+xsinxy = A\cos x + B\sin x + x\sin x.

Markers reward identifying the resonance, multiplying the trial by xx, differentiating and substituting, and the solution y=Acosx+Bsinx+xsinxy = A\cos x + B\sin x + x\sin x.

Related dot points