The special solution form of differential equation y '' - 2Y '+ 2Y = xsinx is y*= I figured it out to be (AX + b) (ccosx + dsinx), but the answer is (AX + b) cosx + (Cx + D) SiNx

The special solution form of differential equation y '' - 2Y '+ 2Y = xsinx is y*= I figured it out to be (AX + b) (ccosx + dsinx), but the answer is (AX + b) cosx + (Cx + D) SiNx

In fact, your answer and the equivalent, are right, but the answer is more simple
Just drive your car
(ACx+BC)cosx+(ADx+BD)sinx
A'=AC
B'=BC
C'=AD
D'=BD
that will do