Method of Undetermined Coefficients/Sine and Cosine/Particular Solution/i b is not Root of Auxiliary Equation/Trigonometric Form

Proof Technique
Consider the nonhomogeneous linear second order ODE with constant coefficients:
 * $(1): \quad y'' + p y' + q y = \map R x$

Let $\map R x$ be a linear combination of sine and cosine:
 * $\map R x = \alpha \sin b x + \beta \cos b x$

such that $i b$ is not a root of the auxiliary equation to $(1)$.

The Method of Undetermined Coefficients can be used to find a particular solution to $(1)$ in the following manner.

Method and Proof
Let $\map {y_g} x$ be the general solution to:
 * $y'' + p y' + q y = 0$

From General Solution of Linear 2nd Order ODE from Homogeneous 2nd Order ODE and Particular Solution:
 * $\map {y_g} x + \map {y_p} x$

is the general solution to $(1)$.

It remains to find $\map {y_p} x$.

Let $\map R x = \alpha \sin b x + \beta \cos b x$.

Consider the auxiliary equation to $(1)$:
 * $(2): \quad m^2 + p m + q = 0$

We are given that $i b$ is not a root of $(2)$.

Assume that there is a particular solution to $(1)$ of the form:
 * $y_p = A \sin b x + B \cos b x$

We have:

Inserting into $(1)$:

Hence $A$ and $B$ can be expressed in terms of $\alpha$ and $\beta$:

Hence:
 * $y_p = \dfrac {\alpha \paren {q - b^2} + \beta b p} {\paren {q - b^2}^2 + b^2 p^2} \sin b x + \dfrac {\beta \paren {q - b^2} - \alpha b p} {\paren {q - b^2}^2 + b^2 b^2} \cos b x$