# Particular Solution

Consider the nonhomogeneous differential equation ${{y}}^{{{\left({n}\right)}}}+{a}_{{{n}-{1}}}{\left({x}\right)}{{y}}^{{{\left({n}-{1}\right)}}}+\ldots+{a}_{{1}}{\left({x}\right)}{y}'+{a}_{{0}}{\left({x}\right)}{y}={g{{\left({x}\right)}}}$.

Recall from the section about linear independence that the solution of the corresponding homogeneous equation ${{y}}^{{{\left({n}\right)}}}+{a}_{{{n}-{1}}}{\left({x}\right)}{{y}}^{{{\left({n}-{1}\right)}}}+\ldots+{a}_{{1}}{\left({x}\right)}{y}'+{a}_{{0}}{\left({x}\right)}{y}={0}$ is given as ${y}_{{h}}={c}_{{1}}{y}_{{1}}{\left({x}\right)}+{c}_{{2}}{y}_{{2}}{\left({x}\right)}+\ldots+{c}_{{n}}{y}_{{n}}{\left({x}\right)}$.

If ${y}_{{p}}$ is the solution of the nonhomogeneous equation, the general solution of the nonhomogeneous equation is ${y}={y}_{{h}}+{y}_{{p}}$.

Proof.

Plug ${y}={y}_{{h}}+{y}_{{p}}$ into the differential equation:

${{\left({y}_{{h}}+{y}_{{p}}\right)}}^{{{\left({n}\right)}}}+{a}_{{{n}-{1}}}{\left({x}\right)}{{\left({y}_{{h}}+{y}_{{p}}\right)}}^{{{\left({n}-{1}\right)}}}+\ldots+{a}_{{1}}{\left({x}\right)}{\left({y}_{{h}}+{y}_{{p}}\right)}'+{a}_{{0}}{\left({x}\right)}{y}=$

$={\left({{y}_{{h}}^{{{\left({n}\right)}}}}+{a}_{{{n}-{1}}}{\left({x}\right)}{{y}_{{h}}^{{{\left({n}-{1}\right)}}}}+\ldots+{a}_{{1}}{\left({x}\right)}{y}_{{h}}'+{a}_{{0}}{\left({x}\right)}{y}_{{h}}\right)}+{\left({{y}_{{p}}^{{{\left({n}\right)}}}}+{a}_{{{n}-{1}}}{\left({x}\right)}{{y}_{{p}}^{{{\left({n}-{1}\right)}}}}+\ldots+{a}_{{1}}{\left({x}\right)}{y}_{{p}}'+{a}_{{0}}{\left({x}\right)}{y}_{{p}}\right)}=$

$={0}+{g{{\left({x}\right)}}}={g{{\left({x}\right)}}}$

So, indeed, ${y}={y}_{{p}}+{y}_{{h}}$ is the solution of the nonhomogeneous differential equation.

Now, let's consider an example.

Example. The solution of the homogeneous equation ${y}''+{y}'-{2}{y}={0}$ is ${y}_{{h}}={c}_{{1}}{{e}}^{{-{2}{x}}}+{c}_{{2}}{{e}}^{{{x}}}$. For the nonhomogeneous equation ${y}''+{y}'-{2}{y}={2}{\left({1}+{x}-{{x}}^{{2}}\right)}$, the particular solution is ${y}_{{p}}={{x}}^{{2}}$. So, the general solution of the nonhomogeneous differential equation is ${y}''+{y}'-{2}{y}={2}{\left({1}+{x}-{{x}}^{{2}}\right)}$ is ${y}={y}_{{h}}+{y}_{{p}}={c}_{{1}}{{e}}^{{-{2}{x}}}+{c}_{{2}}{{e}}^{{x}}+{{x}}^{{2}}$.