4.6.14Ordinary Differential Equations

Non-homogeneous — method of undetermined coefficients (annihilator method)

1,910 words9 min readdifficulty · medium

What is an annihilator?

WHY do annihilators even exist? Because the functions appearing in "nice" g(x)g(x) — polynomials, exponentials, sines, cosines, and their products — are exactly the solutions of constant-coefficient homogeneous ODEs. Each such solution is born from a root of a characteristic polynomial, so reading the function backwards gives the operator.

HOW to read the table backwards (derivation of one row). Take g=eαxg=e^{\alpha x}. The ODE with characteristic root r=αr=\alpha is (rα)=0(Dα)y=0(r-\alpha)=0 \Rightarrow (D-\alpha)y=0, whose solution is CeαxCe^{\alpha x}. So (Dα)(D-\alpha) annihilates eαxe^{\alpha x}: (Dα)eαx=αeαxαeαx=0. (D-\alpha)e^{\alpha x} = \alpha e^{\alpha x} - \alpha e^{\alpha x} = 0.\ \checkmark For xneαxx^n e^{\alpha x} we need the root α\alpha repeated n+1n+1 times (repeated roots give xkeαxx^k e^{\alpha x} terms), hence (Dα)n+1(D-\alpha)^{n+1}.


The method, step by step

Figure — Non-homogeneous — method of undetermined coefficients (annihilator method)

Worked Example 1 — exponential, no overlap

Solve y3y+2y=4e3xy'' - 3y' + 2y = 4e^{3x}, i.e. (D23D+2)y=4e3x(D^2-3D+2)y = 4e^{3x}.

Step 1 (Why): factor D23D+2=(D1)(D2)D^2-3D+2=(D-1)(D-2), roots 1,21,2. So yh=c1ex+c2e2x.y_h = c_1 e^{x} + c_2 e^{2x}.

Step 2 (Why): g=4e3xg=4e^{3x} comes from root 33, so annihilator A=(D3)A=(D-3). Apply it: (D3)(D1)(D2)y=0.(D-3)(D-1)(D-2)\,y = 0.

Step 3–4 (Why this step?): roots now 1,2,31,2,3. General solution c1ex+c2e2x+c3e3xc_1e^x+c_2e^{2x}+c_3e^{3x}. The first two are yhy_h, so the new term gives the form: yp=Ae3x.y_p = A e^{3x}.

Step 5 (Why): substitute. yp3yp+2yp=(99+2)Ae3x=2Ae3x=4e3xA=2.y_p''-3y_p'+2y_p = (9-9+2)Ae^{3x}=2Ae^{3x}=4e^{3x}\Rightarrow A=2.

Step 6: y=c1ex+c2e2x+2e3x.\boxed{y = c_1e^x + c_2e^{2x} + 2e^{3x}.}


Worked Example 2 — overlap (resonance) forces an xx

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

Step 1: same yh=c1ex+c2e2xy_h = c_1e^x + c_2e^{2x}.

Step 2 (Why the overlap matters): g=5e2xg=5e^{2x} has root 22, but 22 is already a root of LL. Annihilator A=(D2)A=(D-2): (D2)(D1)(D2)y=(D1)(D2)2y=0.(D-2)\,(D-1)(D-2)\,y = (D-1)(D-2)^2 y = 0.

Step 3–4 (Why this step?): roots 1,2,21,\,2,\,2 (double). General solution c1ex+c2e2x+c3xe2xc_1e^x + c_2e^{2x} + c_3\,x e^{2x}. The first two are yhy_h; the genuinely new term is xe2xxe^{2x}. Hence yp=Axe2x.y_p = A\,x e^{2x}. (See — the xx appeared automatically because the root became double.)

Step 5 (Why): with yp=Axe2xy_p=Axe^{2x}, yp=Ae2x(1+2x)y_p' = A e^{2x}(1+2x), yp=Ae2x(4+4x)y_p'' = A e^{2x}(4+4x). Then yp3yp+2yp=Ae2x[(4+4x)3(1+2x)+2x]=Ae2x(1)=5e2xA=5.y_p''-3y_p'+2y_p = Ae^{2x}\big[(4+4x)-3(1+2x)+2x\big]=Ae^{2x}(1)=5e^{2x}\Rightarrow A=5.

Step 6: y=c1ex+c2e2x+5xe2x.\boxed{y=c_1e^x+c_2e^{2x}+5xe^{2x}.}


Worked Example 3 — trig with the D2+β2D^2+\beta^2 annihilator

Solve y+y=cos2xy'' + y = \cos 2x.

Step 1: D2+1=0r=±iD^2+1=0\Rightarrow r=\pm i, so yh=c1cosx+c2sinxy_h=c_1\cos x + c_2\sin x.

Step 2 (Why): cos2x\cos 2x comes from roots ±2i\pm 2i, annihilator A=D2+4A=D^2+4. No overlap (since i2ii\ne 2i). (D2+4)(D2+1)y=0.(D^2+4)(D^2+1)y=0.

Step 3–4: roots ±i,±2i\pm i,\pm 2i. New terms: cos2x,sin2x\cos2x,\sin2x. So yp=Acos2x+Bsin2x.y_p = A\cos 2x + B\sin 2x.

Step 5 (Why): yp=4Acos2x4Bsin2xy_p'' = -4A\cos2x - 4B\sin2x, so yp+yp=3Acos2x3Bsin2x=cos2xA=13, B=0.y_p''+y_p = -3A\cos2x -3B\sin2x = \cos2x \Rightarrow A=-\tfrac13,\ B=0.

Step 6: y=c1cosx+c2sinx13cos2x.\boxed{y=c_1\cos x + c_2\sin x -\tfrac13\cos 2x.}


Common mistakes (Steel-man + fix)


Active recall

Recall What's the one-sentence reason

ypy_p keeps only the "AA-roots"? Because the LL-roots regenerate yhy_h, which satisfies L[y]=0L[y]=0 and so contributes nothing to gg; only roots introduced by the annihilator can produce gg.

Recall Why does overlap force a factor of

xx? An overlapping root gains multiplicity in ALAL, and a multiplicity-kk root yields terms eαx,xeαx,e^{\alpha x},xe^{\alpha x},\dots, so the new term carries the extra xx.

Recall Feynman: explain to a 12-year-old

You have a machine LL that eats a function and spits out gg. To guess the function, look at gg and ask "what simple machine AA turns gg into nothing?" Run gg through AA — it vanishes. Now both sides are zero, and the "zero-makers" are easy to list. The answer-function is one of the new zero-makers that AA added. Try it in the real machine LL and tune the dial (the coefficient) until the output matches gg.



Flashcards

Annihilator of eαxe^{\alpha x}
DαD-\alpha
Annihilator of xneαxx^n e^{\alpha x}
(Dα)n+1(D-\alpha)^{n+1}
Annihilator of cosβx\cos\beta x or sinβx\sin\beta x
D2+β2D^2+\beta^2
Annihilator of xnx^n (and lower powers)
Dn+1D^{n+1}
Annihilator of eαxcosβxe^{\alpha x}\cos\beta x
(Dα)2+β2(D-\alpha)^2+\beta^2
After applying AL[y]=0AL[y]=0, which terms become ypy_p?
The terms from the new roots contributed by AA (drop the yhy_h terms)
Why multiply trial by xx when gg overlaps yhy_h?
Overlap raises the root's multiplicity in ALAL, so the new solution term carries an extra xx
General structure of solution to L[y]=gL[y]=g
y=yh+ypy=y_h+y_p
Trial for g=5e2xg=5e^{2x} when 22 is a simple root of LL
yp=Axe2xy_p=Axe^{2x}
Step after getting the form of ypy_p
Substitute into original L[y]=gL[y]=g and solve for the undetermined coefficients

Connections

Concept Map

split solution

from char equation

need one

constant coeff operator

born from

read backwards

A of g equals 0

apply A

solve, drop yh terms

plug into L y equals g

gives

add

L y equals g x

y equals yh plus yp

homogeneous yh

particular yp

operator L in D

g x nice function

characteristic roots

annihilator A

kills right side

A L y equals 0 homogeneous

form of yp with unknowns

solve coefficients

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, non-homogeneous ODE ka matlab hai L[y]=g(x)L[y]=g(x), jahan right side g(x)g(x) zero nahi hai. Solution hamesha do hisson mein todta hai: y=yh+ypy=y_h+y_p. yhy_h (homogeneous part) toh tumhe pehle se aata hai — characteristic equation ke roots se. Asli kaam sirf ek particular solution ypy_p dhoondhna hai. Annihilator method ka idea simple hai: g(x)g(x) ko "maar do" yaani uspar ek aisa operator AA lagao jo use zero bana de. Jaise eαxe^{\alpha x} ko (Dα)(D-\alpha) kill karta hai, cosβx\cos\beta x ko (D2+β2)(D^2+\beta^2).

Trick ye hai: original equation par AA lagao, toh right side gg bhi zero ho jaata hai — ab tumhare paas ek bada homogeneous equation AL[y]=0AL[y]=0 hai jiska solution likhna easy hai. Iss bade solution mein purane LL ke roots yhy_h wapas de dete hain (woh kaam ke nahi, kyunki woh LL se zero ban jaate hain). Sirf AA ke naye roots se aaye terms hi ypy_p ka shape dete hain. Bas un terms mein unknown coefficient daalo, original equation mein substitute karo, aur coefficient solve kar lo.

Sabse important baat — overlap (resonance). Agar gg ka root pehle se yhy_h mein hai, jaise 5e2x5e^{2x} aur 22 already root hai, toh AA lagane se woh root double ho jaata hai, aur double root automatically ek extra xx le aata hai. Isiliye trial banta hai Axe2xAxe^{2x}, na ki sirf Ae2xAe^{2x}. Yahi physics mein resonance hai (forced oscillation jab natural frequency se match kare).

Yaad rakho: ABCD — Annihilate, Bigger homogeneous, Cut the yhy_h part, Determine coefficients. Aur "same root? slap an xx." Bas itna samajh gaye toh ye topic 80/20 mein aata hai — thoda concept, bohot saare marks.

Go deeper — visual, from zero

Test yourself — Ordinary Differential Equations

Connections