If I remember correctly you've chosen the wrong particular solution.
Try
Solve y'' +2y' + 5y = cos(2t).
I found the Yc = e^-t(A cos(2t) + Bsin(2t)).
I am finding trouble in working out the particluar integral. This is what i have done so far:
Yp= t(Acos(2t) + Bsin(2t))
Y'p= t(-2Asin(2t) + 2Bcos(2t))+ Acos(2t) + Bsin(2t)
Y''p = t(-4Acos(2t) - 4Bsin(2t) + 2(-2Asin(2t) + 2Bcos(2t))
Sub this back into equation:
y'' +2y' + 5y=
t(-4Acos(2t) - 4Bsin(2t) + 2(-2Asin(2t) + 2Bcos(2t)) + 2(t(-2Asin(2t) + 2Bcos(2t))+ Acos(2t) + Bsin(2t)) + 5(t(Acos(2t) + Bsin(2t)).
Now, I dont know how this should be simplified because of the 't' function and how I can equate this to find out A and B.
Thanks
You do not need the t multiplier, because the particular solution does not show up additively in the complimentary solution. The complimentary solution has that exponential multiplying everything. That means the differential operator represented by the LHS is not going to annihilate the RHS. Just pick