Trying to solve a non-homogeneous differential equation, whether it is linear, Bernoulli, Euler, you solve the related homogeneous equation and then you look for a particular solution depending on the "class" of the non-homogeneous term.
Just to make an example, let's say we have this equation
$$y'' - y' - 2y = 2x e^x$$
we solve $$y'' -2y' +y =0$$ and we get solutions of the form $y_{\text{hom}}(x) = C_1 e^{2x} + C_2 e^{-x}$.
Then, since the known term is of the form $p(x)(x) e^{\mu x}$, and $\mu$ is not a solution to the characteristic polynomial, we should find the solutions through those of the form $q(x)e^{\mu x}$. If, on the other hand, $\mu$ were a solution of the characteristic polynomial, we should have looked for solutions through those of the form $q(x) x^q e^{\mu x}$ where $q$ is the multiplicity of the root $\mu$. (where $q(x)$ is the general polynomial of the same degree as $p(x)$.
I have a whole list of these "classes" of known terms, like $p(x)$, $p(x)e^{\mu x}$, $e^{\alpha x}(a \sin(\beta x) + a' \cos(\beta x))$, and the corresponding general solutions (like I said before, also with the multiplicity involved).
My question is, where do these come from? I have no idea how such classes were found or anything; my book and my professors just said these were given and we should just learn them.
Edit: from the comment I see that something's going on, unfortunately I don't have enough background to know how to work with Laurent series. I would appreciate any explanation. Thanks.