# ODE - annihilator method?

## Homework Statement

y'' + 4y' +4y = 5e^(-2x)

y''+9y=2sin(3x)

combined with 3

## The Attempt at a Solution

For the first one, I started off by finding the general solution.
r^2+4r+4=0
r=-2, double roots

y=c1*e^(-2x)+c2*x*e^(-2x)

And then when solving for the particular solution I end up with left side becoming 0.

The second problem I'm not sure if requires an annihilator or not, but I assume it does.

I get r=+/- 3i
y=c1*cos(3x)+c2*sin(3x)

and no idea what annihilator to use

In my entire DiffyEq book, the word "annihilator" is mentioned twice, and in both cases they just say to use it, but there's no explanation or anything. I looked online as well and couldn't fine anything helpful enough. Is there like some sort of table I need to use? How do I choose the annihilator?

## Answers and Replies

I have not really had much experience with the annihilator method. Are you required to use it? Both of these problems are essentially the same (I believe). First you solve for the homogeneous solution (meaning set the right hand side equal to zero and then use the characteristic equation to find the r's). Then you must solve for the particular solutions by a method of your choosing. These problems look like you could use the method of undetermined coefficients to solve for the particulars.

Also, you should show the rest of your work for the 1st problem. What do you mean "the left side is zero?" Your solution to the 1st ODE is not complete as written.

Yeah the annihilator is the main focus of the chapter, and the method of undetermined coeeficients isnt mentioned at all

for the first problem:

r=-2, double roots

y=c1*e^(-2x)+c2*x*e^(-2x)
^this is the general part of the solution

now for the particular:

y_p=Ae^(-2x)
y_p''+4y_p'+4y_p=5e^(-2x)
4Ae^(-2x)+-8Ae^(-2x)+4Ae^(-2x)=5e^(-2x)
divide both sides by e^(-2x)

4A-8A+4A=5
0=5?

Yeah the annihilator is the main focus of the chapter, and the method of undetermined coeeficients isnt mentioned at all

for the first problem:

r=-2, double roots

y=c1*e^(-2x)+c2*x*e^(-2x)
^this is the general part of the solution

now for the particular:

y_p=Ae^(-2x)
y_p''+4y_p'+4y_p=5e^(-2x)
4Ae^(-2x)+-8Ae^(-2x)+4Ae^(-2x)=5e^(-2x)
divide both sides by e^(-2x)

4A-8A+4A=5
0=5?

You have assumed that the particular solution yp should be:yp= Ae^(-2x) which would usually be correct, however, looking at your homogeneous solution, you already have that form used in the c1*e^(-2x) term. So you would usually want to multiply your assumed yp by a factor of x and use instead:yp= x*Ae^(-2x) HOWEVER you already have that being used too! So we continue multiplying by factors of x until we find something that is not already included in the homogeneous solution. Letting yp=Ax^2*e^(-2x) should do it.

By the way, this IS the method of undetermined coefficients that you are using

EDIT: As for the annihilator method, this website explanation leaves quite a bit to be desired, but it is a starting point. Kind of a 'lead by example' approach.

Last edited:
I see, but do you multiply yp by x everytime until you find a suitable yp? Or does that only apply to exponential functions?

vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
In terms of linear operators, your first equation, y'' + 4y' +4y = 5e-2x, can be written as
$$(D^2+4D+4)y = 5e^{-2x}$$The idea now is to find a linear operator that'll annihilate the righthand side. The simplest one in this case is (D+2) so that you get
$$(D+2)(D^2+4D+4)y = 0$$What solution do you get for this homogeneous equation?

can you write the left hand side as just (D+2)^3(y)? so D would be -2? doesn't D just do the same thing as r then?

And for the second problem,
I get r=+/- 3i
y=c1*cos(3x)+c2*sin(3x)
as the first part
when I try to solve for the particular i get
yp=Acos3x+Bsin3x, but this is already included in the first part (like with my first question) so would I multiply each element by x next? or is it different for this form?

vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
can you write the left hand side as just (D+2)^3(y)? so D would be -2? doesn't D just do the same thing as r then?
D is an operator that takes a function to its derivative, so Dy = y' and D2y = y''. The characteristic equation turns out to be of the same form as the operator except with the operator D replaced by the variable r, so in this case, you get (r+2)3=0. Since you have a triple root, what form does the solution take? You should be able to identify the part that corresponds to the homogeneous solution for the original equation. The other piece is the particular solution. Using the annihilator method you automatically find the correct form of the particular solution.

Once you have the particular solution, the rest of the work turns out to be the same as using the method of undetermined coefficients, as Saladsamurai noted above.

I don't see the mention of triple roots at all in my book =(

But I know double root is along the lines of Ae^x+Bxe^2, so would I add on a Cx^2e^x?

The lack of information in my book comes from the fact that it's only a draft, since the course coordinator is writing his own ODE textbook and we're the guinea pigs for the first time =(

vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
I don't see the mention of triple roots at all in my book =(

But I know double root is along the lines of Ae^x+Bxe^2, so would I add on a Cx^2e^x?
Yup! Though I think you mean e-2x for the exponentials.

The lack of information in my book comes from the fact that it's only a draft, since the course coordinator is writing his own ODE textbook and we're the guinea pigs for the first time =(

yea, e^-2x. been awake too long.

also, could you point me in the right direction for the second problem? I get the char. eqn. of r^2+9=0, find that r=+/- 3i, so the first part is
y=c1*cos3x+c2*sin3x

I cant choose a particular y as Acos3x+Bsin3x because I already did that for the general solution, so what would I do? multiply it by x like in the first problem?

i also tried doing the method with D
I get (D^2+9)y=2sin3x
what's the annihilator for 2sin3x? is there a way to derive it or is there some kind of table? thanks for your help

vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
D0(sin 3x) = sin 3x
D1(sin 3x) = 3 cos 3x
D2(sin 3x) = -9 sin 3x
D3(sin 3x) = -27 cos 3x

and so on. What's the simplest combination that will give you 0?

it would have to be a sin, since cos would go to 1 right? and since sin3x is already used then -9sin3x?

vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
it would have to be a sin, since cos would go to 1 right? and since sin3x is already used then -9sin3x?
No. In the first problem, I told you D+2 annihilated e-2x. Why does this work? It's because
$$(D+2)e^{-2x} = D(e^{-2x}) + 2e^{-2x} = -2e^{-2x} + 2e^{-2x} = 0$$How do you achieve a similar cancellation for sin 3x?

LCKurtz
Science Advisor
Homework Helper
Gold Member
what's the annihilator for 2sin3x? is there a way to derive it or is there some kind of table? thanks for your help

Yes to both. See:

http://web.gccaz.edu/~wkehowsk/276-Diff-Eq-10-11-Su/c04-annihilator-table-261-Su11.pdf

Also with regard to earlier comments about undetermined coefficients vs. annihilator method, the annihilator method is the method of undetermined coefficients with the advantage that the guesswork is removed.

No. In the first problem, I told you D+2 annihilated e-2x. Why does this work? It's because
$$(D+2)e^{-2x} = D(e^{-2x}) + 2e^{-2x} = -2e^{-2x} + 2e^{-2x} = 0$$How do you achieve a similar cancellation for sin 3x?

(D^2+9)sin3x?
-9sin3x+9sin3x=0

EDIT:
wait, another question, what am I doing wrong?
so I know that the annihilator is (D^2+9)
then
(D^2+9)y=2sin3x
(D^2+9)^2(y)=0

this looks like a double root because of the ^2, right? so doesnt that mean yp would = Ae^x+Bxe^x? But I was under the impressions it would involve sin/cos or something.

am I allowed to multiply out the (D^2+9)^2 into D^4...etc ? how would I go about solving it from there?
It was straightforward in the first example where we ended with (D+2)^3=0, and triple root meant Ae^x+Bxe^x+Cx^2e^x, but what do I do here? Thank you for your help so far.

Last edited:
Alright, after working at it some more, I get double roots of +/- 3i.
So am I right in using Acos2x+Bsin3x as yp? However, this solution is already included in yc, so what do I do next? Take the derivative? Multiply by x?

vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
You do the same thing you did before with double roots. Your solution would be
$$y = Ae^{3ix} + Bxe^{3ix} + Ce^{-3ix}+Dxe^{3ix}$$ The B and D terms come from the double root. Using Euler's formula, ##e^{i\theta} = \cos \theta+i\sin\theta##, you can rewrite this in terms of sines and cosines:
$$y = A'\sin 3x + B'\cos 3x +C'x\cos 3x + D'x\sin 3x$$