Worked example
Match sine and cosine as two separate coefficients
Find A and B in as a particular integral of .
A sine derivative produces a cosine and a cosine derivative produces a negative sine. Use both trial terms even if one input coefficient is zero.
Substitute the full trial into the left side. Then equate its sine and cosine coefficients to the corresponding right-hand coefficients.
The simultaneous equations give and .