ConceptComplete

Method of Undetermined Coefficients

The method of undetermined coefficients provides a systematic technique for finding particular solutions to nonhomogeneous linear differential equations when the forcing function has a specific form.

DefinitionNonhomogeneous Second-Order Linear ODE

A nonhomogeneous second-order linear differential equation has the form:

ay+by+cy=f(x)ay'' + by' + cy = f(x)

where f(x)0f(x) \neq 0 is the forcing function or nonhomogeneous term. The general solution is:

y=yh+ypy = y_h + y_p

where yhy_h is the general solution of the homogeneous equation and ypy_p is any particular solution.

Applicable Forms

The method works when f(x)f(x) is a linear combination of:

  • Polynomials: xnx^n
  • Exponentials: eaxe^{ax}
  • Sines and cosines: sin(bx)\sin(bx), cos(bx)\cos(bx)
  • Products of the above

Basic Strategy

The particular solution ypy_p is guessed to have the same form as f(x)f(x) (and its derivatives), with undetermined coefficients. Substitute into the equation and solve for the coefficients.

ExamplePolynomial Forcing

Solve y3y+2y=4x2y'' - 3y' + 2y = 4x^2.

First find yhy_h: Characteristic equation r23r+2=0r^2 - 3r + 2 = 0 gives (r1)(r2)=0(r-1)(r-2) = 0, so:

yh=c1ex+c2e2xy_h = c_1e^x + c_2e^{2x}

For ypy_p, since f(x)=4x2f(x) = 4x^2 is a polynomial of degree 2, try:

yp=Ax2+Bx+Cy_p = Ax^2 + Bx + C

Then yp=2Ax+By_p' = 2Ax + B and yp=2Ay_p'' = 2A.

Substituting:

2A3(2Ax+B)+2(Ax2+Bx+C)=4x22A - 3(2Ax + B) + 2(Ax^2 + Bx + C) = 4x^2

2Ax2+(6A+2B)x+(2A3B+2C)=4x22Ax^2 + (-6A + 2B)x + (2A - 3B + 2C) = 4x^2

Comparing coefficients:

  • x2x^2: 2A=4A=22A = 4 \Rightarrow A = 2
  • x1x^1: 6A+2B=0B=6-6A + 2B = 0 \Rightarrow B = 6
  • x0x^0: 2A3B+2C=0C=72A - 3B + 2C = 0 \Rightarrow C = 7

So yp=2x2+6x+7y_p = 2x^2 + 6x + 7.

General solution: y=c1ex+c2e2x+2x2+6x+7y = c_1e^x + c_2e^{2x} + 2x^2 + 6x + 7

Remark

Modification Rule (Resonance): If any term in the guessed ypy_p is a solution of the homogeneous equation, multiply the guess by xx (or x2x^2 if needed) until there's no overlap. This situation is called resonance.

ExampleExponential Forcing with Resonance

Solve y3y+2y=5e2xy'' - 3y' + 2y = 5e^{2x}.

The homogeneous solution is yh=c1ex+c2e2xy_h = c_1e^x + c_2e^{2x}.

Normally we'd try yp=Ae2xy_p = Ae^{2x}, but e2xe^{2x} is already in yhy_h (resonance!).

Apply modification rule: try yp=Axe2xy_p = Axe^{2x}.

Then yp=Ae2x+2Axe2xy_p' = Ae^{2x} + 2Axe^{2x} and yp=4Ae2x+4Axe2xy_p'' = 4Ae^{2x} + 4Axe^{2x}.

Substituting:

(4Ae2x+4Axe2x)3(Ae2x+2Axe2x)+2(Axe2x)=5e2x(4Ae^{2x} + 4Axe^{2x}) - 3(Ae^{2x} + 2Axe^{2x}) + 2(Axe^{2x}) = 5e^{2x}

Ae2x=5e2xAe^{2x} = 5e^{2x}

Therefore A=5A = 5 and yp=5xe2xy_p = 5xe^{2x}.

General solution: y=c1ex+c2e2x+5xe2xy = c_1e^x + c_2e^{2x} + 5xe^{2x}

ExampleTrigonometric Forcing

Solve y+4y=3sin2xy'' + 4y = 3\sin 2x.

Homogeneous solution: r2+4=0r^2 + 4 = 0 gives r=±2ir = \pm 2i, so:

yh=c1cos2x+c2sin2xy_h = c_1\cos 2x + c_2\sin 2x

Resonance occurs! Both sin2x\sin 2x and cos2x\cos 2x are in yhy_h.

Try yp=x(Acos2x+Bsin2x)y_p = x(A\cos 2x + B\sin 2x).

After differentiation and substitution (details omitted):

yp=34xcos2xy_p = -\frac{3}{4}x\cos 2x

General solution: y=c1cos2x+c2sin2x34xcos2xy = c_1\cos 2x + c_2\sin 2x - \frac{3}{4}x\cos 2x

The method of undetermined coefficients is efficient for constant-coefficient equations with special forcing functions, but does not work for arbitrary f(x)f(x). For general cases, variation of parameters is needed.