General Solution of Linear 2nd Order ODE from Homogeneous 2nd Order ODE and Particular Solution

Theorem
Consider the nonhomogeneous linear second order ODE:
 * $(1): \quad \dfrac {\mathrm d^2 y} {\mathrm d x^2} + P \left({x}\right) \dfrac {\mathrm d y} {\mathrm d x} + Q \left({x}\right) y = R \left({x}\right)$

Let $y_g \left({x}\right)$ be the general solution of the homogeneous linear second order ODE:
 * $(2): \quad \dfrac {\mathrm d^2 y} {\mathrm d x^2} + P \left({x}\right) \dfrac {\mathrm d y} {\mathrm d x} + Q \left({x}\right) y = 0$

Let $y_p \left({x}\right)$ be a particular solution of $(1)$.

Then $y_g \left({x}\right) + y_p \left({x}\right)$ is the general solution of $(1)$.

Proof
Let $y_g \left({x, C_1, C_2}\right)$ be a general solution of $(2)$.

Note that $C_1$ and $C_2$ are the two arbitrary constants that are to be expected of a second order ODE.

Let $y_p \left({x}\right)$ be a certain fixed particular solution of $(1)$.

Let $y \left({x}\right)$ be an arbitrary particular solution of $(1)$.

Then:

We have that $y_g \left({x, C_1, C_2}\right)$ is a general solution of $(2)$.

Thus:
 * $y \left({x}\right) - y_p \left({x}\right) = y_g \left({x, C_1, C_2}\right)$

or:
 * $y \left({x}\right) = y_g \left({x, C_1, C_2}\right) + y_p \left({x}\right)$