# Second order nonhomogeneous ODE

1. Oct 16, 2013

### yaro99

1. The problem statement, all variables and given/known data

y''+3y'+3.25=3cost-1.5sint

2. Relevant equations
yh = e(a/2)t(Acost+Bsint)
yp = Kcos(ωt)+Msin(ωt) [when r(x)=kcos(ωt) or ksin(ωt)]

3. The attempt at a solution

I got the homogeneous solution, which is e-1.5t(Acost+Bsint)
but I am having trouble with the particular solution.

I tried the above equation, making yp=K1cos(ωt)+M1sin(ωt)+K2cos(ωt)+M2sin(ωt)
since there are 2 trig functions as r(t).
I couldn't solve for the variables by plugging into the original equation because I was left with 4 variables and only 2 equations.

EDIT: realized I wasn't consistent with my independent variable, made them all t's instead of t's and x's

Last edited: Oct 17, 2013
2. Oct 16, 2013

### djh101

K1cos(ωx) + K2cos(ωx) = (K1 + K2)cos(ωx). Having two sin/cos functions is redundant, since they are linear combinations (in this case, they are the same function, entirely).

3. Oct 17, 2013

### yaro99

Ah I get it now. I solved for the values (M1+M2) and (K1+K2) instead of the variables individually and got the right answer. Thanks!