Linear Second Order ODE/y'' - 2 y' - 5 y = 2 cos 3 x - sin 3 x/Particular Solution/Trigonometric Form

Proof
From Second Order ODE: $y'' - 2 y' - 5 y = 0$, we have established that the general solution to $(1)$ is:
 * $y_g = C_1 \, \map \exp {\paren {1 + \sqrt 6} x} + C_2 \, \map \exp {\paren {1 - \sqrt 6} x}$

We note that $2 \cos 3 x - \sin 3 x$ is not itself a particular solution of $(2)$.

From the Method of Undetermined Coefficients for Sine and Cosine:
 * $y_p = A \cos 3 x + B \sin 3 x$

where $A$ and $B$ are to be determined.

Hence:

Substituting into $(1)$:

Hence the result:
 * $y_p = \dfrac 1 {116} \paren {\sin 3 x - 17 \cos 3 x}$