Suppose y''-4y=xe^{2x}.
Solution of the homogenous equation is $y_H(x) = C_{1} e^{2x} + C_{2} e^{-2}$, after solving the characteristic equation with the guess $y=e^{rx}$.
Now my instructor insists that the one solution is either
$y(x) = Ax^{2} e^{2x} + Bxe^{2x}$
or
$y(x) = Ax^{2}e^{2x} + Bxe^{2x}+Ce^{2x}$
...and then I get the solution $y(x) = y_{H}(x) +\frac{1}{8}x^{2}e^{2x}-\frac{1}{16}xe^{2x}$
but I cannot understand the choices. Why do just the forms work? I have tried many different forms there and get lost/wasted a lot time -- and my instructor just says that it is a "guess" and smiles. How can I find the one solution without guessing? For one solution, things such as $y(x)=e^{2x}$ or $y(x)=xe^{2x}$ work so I am a bit lost why the more complex form is "the solution" and why it provides all solutions.
For example, the case $y=e^{2x}$. We get y'=2e^{2x} and y''=4e^{2x} so
y''-4y = 4e^{2x} - 4 e^{2x} = 0
so $RHS = xe^{2x} = 0$ so $x=0$, a solution?! If not why? Ok it is naive, it does not contain all cases but how can I know that some form contains all?