Solution of Constant Coefficient LSOODE

Proof Technique
Consider the linear second order ODE with constant coefficients:
 * $(1): \quad \dfrac {\d^2 y} {\d x^2} + p \dfrac {\d y} {\d x} + q y = \map R x$

where $p$ and $q$ are constants and $\map R x$ is a function of $x$.

The general solution to $(1)$ can be found as follows.


 * Find the roots $m_1$ and $m_2$ of the auxiliary equation $m^2 + p m + q = 0$

Hence the general solution $\map {y_g} x$ is found of the homogeneous linear second order ODE:
 * $(2): \quad \dfrac {\d^2 y} {\d x^2} + p \dfrac {\d y} {\d x} + q y = 0$

using Solution of Constant Coefficient Homogeneous LSOODE.


 * Select a trial solution

Using the Method of Undetermined Coefficients, identify a trial solution to $(1)$ by selecting a real function $\map f x$ of the same form as $\map R x$.

This can be done when $\map R x$ is in the form:


 * a polynomial in $x$:
 * $\displaystyle \map R x = \sum_{j \mathop = 0}^n a_j x^j$


 * of the form $K e^{a x}$


 * of the form $A \cos a x + B \sin b x$

or a sum or product of these.


 * Solve the trial solution

Differentiate $f$ twice $x$.

Then substitute for $y$, $y'$ and $y''$ in $(1)$ to obtain a system of simultaneous equations from which the so far undetermined coefficients of $f$ can be evaluated.

Hence a particular solution $y_p$ to $(1)$ is obtained.


 * Other cases

In the cases when $\map R x$ is not of one of the above forms, $(1)$ can be split into its factors as follows.


 * Express $(1)$ in the form $\paren {D^2 + p D + q} y = \map R x$


 * Express it further in the form $\paren {D + m_1} \paren {D + m_2} y = \map R x$


 * Solve the resulting linear first Order ODE with constant coefficients.

The general solution to $(1)$ is then:
 * $\map y x = \map {y_g} x + \map {y_p} x$