Skip to content
GATEiit

GATE EC · Engineering Mathematics

Complementary function and particular integral

Solving linear constant-coefficient ODEs as y = CF + PI: the auxiliary equation and its root cases, the inverse-operator shortcuts and undetermined coefficients for the particular integral, the resonance cases, and fitting initial conditions.

Before you start

  • Linear differential equations →

    The CF + PI split works because the equation is linear: solutions of the homogeneous part add.

  • Non-homogeneous equations →

    The right-hand side r(x) is what the particular integral has to produce.

  • Complex numbers and Euler's formula

    Complex roots α±jβ turn into eαx(c1cos⁡βx+c2sin⁡βx).

This topic comes before: Euler-Cauchy equation, Nonhomogeneous equations

Concept notes

1. Structure of the solution: y = CF + PI

A linear ODE with constant coefficients is written with the operator D=ddx:

f(D) y=(a0Dn+a1Dn−1+⋯+an) y=r(x)

Its general solution is

y=yc+yp

  • The complementary function (CF) yc is the general solution of the homogeneous equation f(D)y=0. It has n arbitrary constants for an nth-order equation.
  • The particular integral (PI) yp is any one solution of f(D)y=r(x). It has no arbitrary constants.

Why it works: if f(D)yp=r and f(D)yc=0, then f(D)(yc+yp)=r by linearity. Two different PIs differ by a solution of the homogeneous equation, so the final answer is the same.

Order of work in every problem.

  1. Write the auxiliary equation f(m)=0 and find the CF.
  2. Find the PI from the form of r(x).
  3. Add them; only then apply initial conditions to fix the constants.

In a circuit or control problem, the CF is the natural (transient) response and the PI is the forced (steady-state) response. When all roots have negative real parts, the CF dies out and y→yp.

xy21-1-21234560solid: y = yc + yp = 2 − 4e^(−x) + 2e^(−2x)dashed: yp = 2 (steady state)dotted: yc = −4e^(−x) + 2e^(−2x) (dies out)
Solution of y'' + 3y' + 2y = 4 with y(0) = 0, y'(0) = 0: the CF decays and the total settles to the PI.

2. Finding the CF from the auxiliary equation

Put y=emx in f(D)y=0 to get the auxiliary (characteristic) equation f(m)=0. Each root gives part of the CF:

Roots of f(m)=0 Part of CF
Real, distinct m1,m2 c1em1x+c2em2x
Real, repeated m (k times) (c1+c2x+⋯+ckxk−1)emx
Complex α±jβ eαx(c1cos⁡βx+c2sin⁡βx)
Complex pair repeated twice eαx[(c1+c2x)cos⁡βx+(c3+c4x)sin⁡βx]

For y′′+2ζωny′+ωn2y=0 the roots are −ζωn±ωnζ2−1:

  • ζ>1: two real roots, overdamped.
  • ζ=1: repeated root, critically damped.
  • ζ<1: complex roots, underdamped, oscillating at ωd=ωn1−ζ2.

The CF of an nth-order equation always has exactly n independent terms. Count them as a check.

3. PI by the inverse operator: the standard shortcuts

Formally yp=1f(D) r(x). For the common right-hand sides:

r(x) Rule If the rule fails
eax eaxf(a), f(a)≠0 f(a)=0: x eaxf′(a); if also f′(a)=0: x2eaxf′′(a)
sin⁡ax, cos⁡ax put D2=−a2 in f(D) 1D2+a2sin⁡ax=−xcos⁡ax2a, 1D2+a2cos⁡ax=xsin⁡ax2a
xk (polynomial) expand [f(D)]−1 as a power series in D up to Dk take out the lowest power of D first
eaxV(x) shift: eax1f(D+a)V(x)

Useful expansions: (1−D)−1=1+D+D2+… and (1+D)−1=1−D+D2−…

When putting D2=−a2 leaves an odd power of D, multiply above and below to move D to the numerator, then differentiate. For example 1D+1sin⁡x=D−1D2−1sin⁡x=D−1−2sin⁡x=sin⁡x−cos⁡x2.

The rule "fails" exactly when the forcing term already appears in the CF. That is resonance, and it always brings in an extra factor of x.

4. PI by undetermined coefficients and the modification rule

Instead of operators, guess a trial yp of the same form as r(x) with unknown constants, substitute, and match coefficients.

r(x) Trial yp
keax Aeax
polynomial of degree k A0+A1x+⋯+Akxk (full polynomial)
kcos⁡ωx or ksin⁡ωx Acos⁡ωx+Bsin⁡ωx (both terms)
eax× polynomial eax× full polynomial of the same degree
eaxcos⁡ωx eax(Acos⁡ωx+Bsin⁡ωx)

Modification rule. If any term of the trial is already in the CF, multiply the whole trial by xs, where s is the smallest power that removes the overlap. This equals the multiplicity of a (or a±jω) as a root of the auxiliary equation.

Example: y′′−2y′+y=xex. The root m=1 is double, so the trial is x2(A+Bx)ex, not (A+Bx)ex.

Sum rule. For r=r1+r2, find a PI for each part and add them.

Undetermined coefficients works only for these forms. For tan⁡x, sec⁡x, ln⁡x or 1/x, use variation of parameters.

5. Initial conditions and reading the answer

The arbitrary constants are fixed after adding the PI. Fitting them to the CF alone is the most common error.

Procedure for an initial value problem.

  1. Write y=yc+yp with constants c1,c2.
  2. Differentiate to get y′.
  3. Put x=0 (or the given point) in y and y′ and solve the linear equations for c1,c2.

Quick facts GATE uses.

  • Steady state. If every root has a negative real part, lim⁡x→∞y=lim⁡yp. For a constant input r=K, the PI is K/an (the constant term of f(D)), provided an≠0.
  • Bounded or not. With purely imaginary roots ±jω and forcing at the same ω, the PI has the factor x and grows without bound (undamped resonance).
  • Forming the equation. If the CF is given, say (c1+c2x)e−2x, the roots are −2,−2, so the left side is (D+2)2y=y′′+4y′+4y.
  • Order from constants. A general solution with n independent constants comes from an nth-order equation.

Formulas to remember

General solutionCF solves f(D)y=0; PI is any one solution of f(D)y=r(x)
y=yc+yp
Complex roots
m=α±jβ  ⇒  yc=eαx(c1cos⁡βx+c2sin⁡βx)
Repeated root
m repeated k times  ⇒  (c1+c2x+⋯+ckxk−1)emx
Exponential input
1f(D)eax=eaxf(a),f(a)=0:  x eaxf′(a)
Sine or cosine inputSame for cos⁡ax; valid when ϕ(−a2)≠0
1ϕ(D2)sin⁡ax=sin⁡axϕ(−a2)
Resonant sine and cosine
1D2+a2sin⁡ax=−xcos⁡ax2a,1D2+a2cos⁡ax=xsin⁡ax2a
Shift theorem
1f(D)[eaxV(x)]=eax1f(D+a)V(x)

Common mistakes

  • Fitting the initial conditions to the CF alone and adding the PI afterwards; the constants must be found from y = CF + PI.
  • Using e^(ax)/f(a) when f(a) = 0; when the forcing term is already in the CF, an extra factor of x (or x squared for a double root) is needed.
  • Writing only A sin(wx) as the trial for a sine input; the trial needs both A cos(wx) and B sin(wx).
  • For a repeated root, writing c1 e^(mx) + c2 e^(mx), which is really one constant; the second term must be c2 x e^(mx).
  • Putting D squared = -a squared and then forgetting to clear the leftover odd power of D before differentiating.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Exponential input, no resonance

numerical

Find the general solution of y′′−5y′+6y=e4x.

  1. Step 1: Solve the auxiliary equation.

    Try it on paper first.

Example 2: Resonance with a repeated root

numerical

Find a particular integral of y′′−4y′+4y=e2x.

  1. Step 1: Find the CF and compare with the forcing term.

    Try it on paper first.

Example 3: Sinusoidal input with and without resonance

numerical

For y′′+4y=10sin⁡3x+cos⁡2x, find the particular integral.

  1. Step 1: Find the CF.

    Try it on paper first.

Example 4: Initial value problem

numerical

Solve y′′+3y′+2y=4 with y(0)=0, y′(0)=0, and find y(1).

  1. Step 1: Find the CF and the PI.

    Try it on paper first.

Previous year questions

1 official GATE EC question on this topic, newest first.

Topic test

9 questions: up to 1 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-28. Spotted a mistake? Use Report an issue on any question, or contact us.