Requirements: coefficients $p$ and $q$ constant and $R(x)$ simple.
Propose a $y_p$ (trial solution) with the same form as $R(x)$, with coefficients to determine:
Exp$y_p = A\,e^{a x}$
Sin/Cos$y_p = A\sin(bx) + B\cos(bx)$
Pol$y_p = A x^{n} + \dots + E x + F$
If any term of the trial solution coincides with a term of $y_h$:
Multiply the entire trial solution by x
If it still coincides → multiply by x²
Ex: if $y_h$ contains $e^{2x}$ and the trial is $y_p = A e^{2x}$, use $y_p = A x\,e^{2x}$.
Differentiate $y_p$ and substitute into the original equation to determine the coefficients.
Variation of Parameters
1
Identify $y_1, y_2$ such that $y_h = C_1 y_1 + C_2 y_2$