Originally Posted by
HallsofIvy "Variation of parameters" always works but is typically much harder than "undetermined coefficients" when that works- which it will as long as the right hand side consists of the kind of functions we get for homogeneous linear equations with constant coefficients, polynomials, exponentials, sine and cosine, or products of those.
Here, your right hand side is $\displaystyle 2- 2e^{-2x}$. Because of the constant "2", try some constant A. Because of the "$\displaystyle -2e^{-2x}$", your first thought should be "$\displaystyle Be^{-2x}$". However, $\displaystyle e^{-2x}$ is already a solution to the associated homogeneous equation so try "$\displaystyle Bxe^{-2x}$" instead.
In other words, try $\displaystyle Y_p(x)= A+ Bxe^{-2x}$.