where is the number of terms in that have , where is a n-degree polynomial
If any term in the guess for is a solution to , multiply by . In other words, multiply by If there are multiple terms, superposition applies. What that means is you substitute one trial solution terms back into the original equation, at a time, in order to find the undetermined coefficients.
Note that trig functions are actually exponentials: