Skip to content
LoveToCalc

Definition — what does that mean?

Non-homogeneous second-order linear differential equation

The general solution is the homogeneous equation's solution plus a single solution of the full equation: y = yₕ + yₚ.

In Swedish: Inhomogen linjär differentialekvation av andra ordningen

y″(x)+ay′(x)+by(x)=f(x)

General solution

y=C₁er₁x+C₂er₂x+yₚ(x),a²−4b>0eαx(C₁ cos(βx)+C₂ sin(βx))+yₚ(x),a²−4b<0(C₁+C₂x)erx+yₚ(x),otherwise

where

  • r₁=−a+a²−4b2
  • r₂=−a−a²−4b2
  • r=−a2
  • α=−a2
  • β=4b−a²2

C₁ and C₂ are arbitrary constants.

yₚ is a particular solution: any one solution of the full equation.

x
The variable
a
The constant coefficient of y′
b
The constant coefficient of y

The equation and the structure of its solution

Holds when a and b are constants and f is continuous on an interval.

The equation is non-homogeneous because the right side is not 0. The general solution above has two parts:

Why that is enough: if y and yₚ both solve the equation, their difference y − yₚ solves the homogeneous equation, because the left side is linear. So y − yₚ is one of the functions in yₕ.

Finding yₚ: the guess

The particular solution is guessed in the same form as the right side, with unknown coefficients found by substituting.

f(x) Guess for yₚ
a polynomial of degree n a polynomial of degree n
e^(kx) A·e^(kx)
sin kx or cos kx A cos kx + B sin kx

If the guess already solves the homogeneous equation, substituting gives 0 = f(x), and the guess is multiplied by x (by x² if k is a double root of the characteristic equation). The same goes for a polynomial when b = 0.

Examples

y″ + 2y′ + 5y = 5x.

  1. Homogeneous part: r² + 2r + 5 = 0 gives r = −1 ± 2i, so yₕ = e^(−x)(C₁ cos 2x + C₂ sin 2x).
  2. Guess yₚ = Ax + B: yₚ′ = A and yₚ″ = 0, so 2A + 5(Ax + B) = 5x. That gives A = 1 and B = −2/5.
  3. y = e^(−x)(C₁ cos 2x + C₂ sin 2x) + x − 2/5.

y″ − y′ − 6y = 4eˣ.

  1. Homogeneous part: r² − r − 6 = 0 gives r = 3 and r = −2, so yₕ = C₁e^(3x) + C₂e^(−2x).
  2. Guess yₚ = Aeˣ: A − A − 6A = 4 gives A = −2/3.
  3. y = C₁e^(3x) + C₂e^(−2x) − (2/3)eˣ.

Where next

Common mistakes

Common questions

Does it matter which particular solution I find? No. Two particular solutions differ by a solution of the homogeneous equation, and that difference is taken up by C₁ and C₂. The general solution is the same set of functions.

Last reviewed October 13, 2026 ·How pages are reviewed

CalculusAll formulas