Higher-Order Non-Homogeneous DEs

A linear differential equation is non-homogeneous if the right-hand side is a non-zero function of xx.

General Solution

The general solution is the sum of the complementary solution (ycy_c, solution to the associated homogeneous equation L[y]=0L[y]=0) and a particular solution (ypy_p, any specific solution to the full non-homogeneous equation L[y]=f(x)L[y]=f(x)).
y=yc+ypy = y_c + y_p

Superposition Principle

If the non-homogeneous term f(x)f(x) consists of a sum of multiple functions, say f(x)=f1(x)+f2(x)++fk(x)f(x) = f_1(x) + f_2(x) + \dots + f_k(x), then we can find individual particular solutions yp1,yp2,,ypky_{p1}, y_{p2}, \dots, y_{pk} corresponding to each individual forcing term fi(x)f_i(x). The overall particular solution is simply their linear combination:
yp=yp1+yp2++ypky_p = y_{p1} + y_{p2} + \dots + y_{pk}
This drastically simplifies solving for complex f(x)f(x) terms.

Method 1: Undetermined Coefficients

This method is used when f(x)f(x) is a polynomial, an exponential, a sine, or a cosine function, or finite sums and products of these forms. We make an "educated guess" for the form of ypy_p based on the form of f(x)f(x) and its derivatives.

Guessing yp

Form of f(x)f(x)Assumed Form of ypy_p
kk (Constant)AA
axn++cx+dax^n + \dots + cx + d (Polynomial)Anxn++A1x+A0A_n x^n + \dots + A_1 x + A_0
cekxce^{kx} (Exponential)AekxA e^{kx}
csin(kx)c \sin(kx) or ccos(kx)c \cos(kx)Asin(kx)+Bcos(kx)A \sin(kx) + B \cos(kx)
(xn+)ekx(x^n + \dots)e^{kx} (Product)(Anxn++A0)ekx(A_n x^n + \dots + A_0)e^{kx}
ekxsin(ωx)e^{kx} \sin(\omega x) or ekxcos(ωx)e^{kx} \cos(\omega x)ekx(Asin(ωx)+Bcos(ωx))e^{kx} (A \sin(\omega x) + B \cos(\omega x))
The Multiplication Rule: Compare your assumed form for ypy_p with the complementary solution ycy_c. If any term in your initial guess for ypy_p is a duplicate of a term in ycy_c (i.e., it is a solution to the homogeneous equation), multiply the entire assumed ypy_p guess by xsx^s, where ss is the smallest positive integer that eliminates the duplication.

Annihilator Approach

An alternative way to formally find ypy_p is using the Annihilator Approach with differential operators. An operator LL annihilates a function f(x)f(x) if L[f(x)]=0L[f(x)] = 0.
Common Annihilators (where D=d/dxD = d/dx):
  • f(x)=xkf(x) = x^k is annihilated by Dk+1D^{k+1}.
  • f(x)=eaxf(x) = e^{ax} is annihilated by (Da)(D - a).
  • f(x)=sin(βx)f(x) = \sin(\beta x) or cos(βx)\cos(\beta x) is annihilated by (D2+β2)(D^2 + \beta^2).
  • f(x)=eαxsin(βx)f(x) = e^{\alpha x}\sin(\beta x) or eαxcos(βx)e^{\alpha x}\cos(\beta x) is annihilated by (D22αD+(α2+β2))(D^2 - 2\alpha D + (\alpha^2 + \beta^2)).
Method: Apply the annihilator to both sides of the non-homogeneous equation Lorig[y]=f(x)L_{orig}[y] = f(x) to get Lann[Lorig[y]]=0L_{ann}[L_{orig}[y]] = 0, a higher-order homogeneous equation. Solve this new homogeneous equation for its general solution. Discard the terms that belong to the original ycy_c; the remaining terms form the structure of ypy_p. Then, substitute this ypy_p back into the original non-homogeneous DE to solve for the undetermined coefficients.

Method 2: Variation of Parameters

This is a general method that works for any f(x)f(x), even if it is not a finite sum of polynomials, exponentials, or sinusoids (e.g., f(x)=sec(x),tan(x),ln(x)f(x) = \sec(x), \tan(x), \ln(x)).

Formula for Variation of Parameters

For a second-order linear DE y+P(x)y+Q(x)y=f(x)y'' + P(x)y' + Q(x)y = f(x) with independent complementary solutions y1y_1 and y2y_2:
yp=u1(x)y1(x)+u2(x)y2(x)y_p = u_1(x)y_1(x) + u_2(x)y_2(x)
The functions u1u_1 and u2u_2 are calculated by:
u1=y2f(x)Wdxandu2=y1f(x)Wdxu_1 = \int \frac{-y_2 f(x)}{W} \, dx \quad \text{and} \quad u_2 = \int \frac{y_1 f(x)}{W} \, dx
where W=W(y1,y2)=y1y2y2y1W = W(y_1, y_2) = y_1 y_2' - y_2 y_1' is the Wronskian of the fundamental solution set.

Wronskian Properties

The Wronskian, denoted as W(y1,y2,,yn)W(y_1, y_2, \dots, y_n), determines whether a set of solutions to a homogeneous differential equation is linearly independent:
  • If W0W \neq 0 at any point in the interval, the functions are linearly independent.
  • If W=0W = 0 everywhere in the interval, and the functions are solutions to a regular linear ODE, they are linearly dependent.
  • Abel's Identity states that W(x)=W(x0)ex0xP(t)dtW(x) = W(x_0)e^{-\int_{x_0}^x P(t)dt}. This means the Wronskian is either never zero or always zero on an interval where P(x)P(x) is continuous.
Key Takeaways
  • General Solution Form: Always write the solution as y=yc+ypy = y_c + y_p. Find ycy_c first.
  • Superposition Principle: If f(x)=f1(x)+f2(x)f(x) = f_1(x) + f_2(x), solve for yp1y_{p1} and yp2y_{p2} separately and sum them.
  • Undetermined Coefficients: Fast and effective for polynomial, exponential, and sinusoidal forcing functions, including their sums and products. The assumed form of ypy_p mirrors f(x)f(x).
  • The Multiplication Rule: Crucial step. If your guessed ypy_p contains terms from ycy_c, multiply the guess by xx (or x2x^2) until no duplication exists.
  • Variation of Parameters: A universally applicable method using the Wronskian WW. It works for any continuous f(x)f(x), but relies on integrating potentially complex rational functions.