Method of Undetermined Coefficients/Polynomial

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

Let $R \left({x}\right)$ be a polynomial in $x$:
 * $\displaystyle R \left({x}\right) = \sum_{j \mathop = 0}^n a_j x^j$

The Method of Undetermined Coefficients can be used to solve $(1)$ in the following manner.

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

From Solution of Constant Coefficient Homogeneous LSOODE, $y_g \left({x}\right)$ can be found systematically.

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

Then from General Solution of Linear 2nd Order ODE from Homogeneous 2nd Order ODE and Particular Solution:
 * $y_g \left({x}\right) + y_p \left({x}\right)$

is the general solution to $(1)$.

It remains to find $y_p \left({x}\right)$.

Let $\displaystyle R \left({x}\right) = \sum_{j \mathop = 0}^n a_j x^j$.

Assume that there is a particular solution to $(1)$ of the form:
 * $\displaystyle y_p = \sum_{j \mathop = 0}^n A_j x^j$

We have:

Inserting into $(1)$:

The coefficients $A_0$ to $A_n$ can hence be solved in terms of $a_0$ to $a_n$ using the techniques of simultaneous equations.

The general form is tedious and unenlightening to evaluate.