you might also read the following article:

Method of undetermined coefficients - Wikipedia, the free encyclopedia

in particular the following paragraph:

f a term in the above particular solution for y appears in the homogeneous solution, it is necessary to multiply by a sufficiently large power ofxin order to make the two solutions linearly independent. If the function ofxis a sum of terms in the above table, the particular solution can be guessed using a sum of the corresponding terms fory.