Method of undetermined coefficients

y''+9y=sin(3t)

I need to solve the above using the method of undetermined coefficients.
I have already found the solution to y''+9y=0 is c1(Cos3t)+c2(sin3t).

The problem is finding the particular solution. From class I am aware that the general form of the solution is ASin(3t)+BCos(3t).

Taking the second derivative, I get -9ASin(3t) - 9BCos(3t). And substituting it in I get

-9ASin(3t) - 9BCos(3t) + 9(ASin(3t)+BCos(3t))=Sin(3t)

But entire left side reduces to zero! How, then, can I solve for the correct A and B? I understand I must have made a mistake somewhere, but I'm having difficulty spotting it. Could someone shed some light?

Taking the second derivative, I get -9ASin(3t) - 9BCos(3t). And substituting it in I get
-9ASin(3t) - 9BCos(3t) + 9(ASin(3t)+BCos(3t))=Sin(3t)
But entire left side reduces to zero! How, then, can I solve for the correct A and B? I understand I must have made a mistake somewhere, but I'm having difficulty spotting it.
No wonder "entire left side reduces to zero" since y=-9ASin(3t)-9BCos(3t) is solution of y''+9y=0 . It isn't solution of y''+9y=Sin(3t)
To be solution of y''+9y=Sin(3t), the unknown A and B should be not constant, but function of t :
y=-9A(t)Sin(3t)-9B(t)Cos(3t)
In the dérivatives of y, don't forget the derivatives of A(t) and B(t).

HallsofIvy