# Linear, nonhomogenous, 2nd order ODE IVP

y''+4y=t^2+3e^t
y(0)=0
y'(0)=2

## Homework Equations

CE: r^2+4
r=+/-2i
gs: y=c1 cos(2t) + c2 sin(2t)

## The Attempt at a Solution

guess:
yp=(At^2+Bt+C)e^t
yp'=At^2e^t+2Ate^t+Bte^t+Be^t+Ce^t
yp''=At^2e^t+4Ate^t+Bte^t+2Ae^t+2Be^t+Ce^t

back into problem:
At^2e^t+4Ate^t+Bte^t+2Ae^t+2Be^t+Ce^t+4At^2e^t+4Ce^t=t^2+3e^t

which becomes:
5At^2e^t=t^2 then becomes: A=e^-t/5
then
4At^et+Bte^t+4Bte^t=0 which becomes: 4A+B+4B=0, B=-(4e^-t)/25

then:
2Ae^t+2Be^t+Ce^t+4Ce^t=3e^t, e^t's cancel which becomes:
2A+2B+5C=3 ---> C=[(75e^t)-2)e^-t]/125

ok, i'm sure i'm not doing this correctly. the book answer is:

7/10sin(2t)-19/40cos2t+1/4t^2-1/8+3/5e^t

what am i doing wrong? am i skipping a step?

do you know the annihilator method? Don't waste your time with this guesswork and learn the annihilator method, it will save you from unnecessary stress.

When you're working out the particular solution, deal with each term on the right hand side SEPERATELY.
First consider = t^2, then consider = 3e^t, otherwise you'll confuse yourself.
i.e. do what you've been doing, except consider them as two seperate cases, and then combine them in the final step.
Hope that helps.

Last edited:
HallsofIvy
Homework Helper
Your "guess" is wrong. You dont' have t2e-t on the right hand side, you have t2+ e-t. You should be trying At2+ Bt+ C+ Ee-t.

Or, as Pseudo Statistic said, handle them separately: try At2+ Bt+ C for t2 and Ee-t for e-t.

oh. ok let me try that. is separating them called superposition?

i don't know the annihilator method, but i'll do some research to find out...would appreciate it if you could explain it if it's right off the top of your head. thanks!

ok this is what i did:
CE: r^2+4
r=+/-2i
gs: y=c1 cos(2t) + c2 sin(2t)

separating: y''+4y=t^2
yp=At^2+Bt+C
yp'=2At+B
yp''=2A becomes 1/4t^2

y''+4y=3e^t
yp=yp'=yp''=Ae^t
solve and get 3/5e^t

so total is:
C2sin(2t)+C1cos2t+1/4t^2+3/5e^t
pluggin in the IC i get:

7/10sin(2t)+3/5cos2t+1/4t^2+3/5e^t

did i do this correctly? how come i'm not gettin the book answer? i looked through my algebra and it does cancel out to be c1=3/5. am i forgetting to add a constant somewhere?

HallsofIvy
Homework Helper
ok this is what i did:
CE: r^2+4
r=+/-2i
gs: y=c1 cos(2t) + c2 sin(2t)

separating: y''+4y=t^2
yp=At^2+Bt+C
yp'=2At+B
yp''=2A becomes 1/4t^2
WHAT becomes 1/4t^2? You want to solve y"+ 4y= t^2. So far you have yp"= 2A and 4yp= 4(At^2+ Bt+ C)= 4At^2+ 4Bt+ 4C so
yp"+ 4yp= 4At^2+ 4Bt+ (2A+4C)= t^2. For that to be true for all t, you must have 4A= 1, 4B= 0, 2A+ 4C= 0. C is not 0.

y''+4y=3e^t
yp=yp'=yp''=Ae^t
solve and get 3/5e^t
This is correct- you remembered the "4yp"!

so total is:
C2sin(2t)+C1cos2t+1/4t^2+3/5e^t
No. Your t^2 part is wrong.

pluggin in the IC i get:

7/10sin(2t)+3/5cos2t+1/4t^2+3/5e^t

did i do this correctly? how come i'm not gettin the book answer? i looked through my algebra and it does cancel out to be c1=3/5. am i forgetting to add a constant somewhere?

oh sorry. i meant after the algebra, A becomes 1/4t^2. i guess maybe my entire mistake is my assumption that C=0. thanks! let me try it again.