Particular Solution

Consider the nonhomogeneous differential equation y(n)+an1(x)y(n1)++a1(x)y+a0(x)y=g(x){{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(n)+an1(x)y(n1)++a1(x)y+a0(x)y=0{{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 yh=c1y1(x)+c2y2(x)++cnyn(x){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 yp{y}_{{p}} is the solution of the nonhomogeneous equation, the general solution of the nonhomogeneous equation is y=yh+yp{y}={y}_{{h}}+{y}_{{p}}.

Proof.

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

(yh+yp)(n)+an1(x)(yh+yp)(n1)++a1(x)(yh+yp)+a0(x)y={{\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}=

=(yh(n)+an1(x)yh(n1)++a1(x)yh+a0(x)yh)+(yp(n)+an1(x)yp(n1)++a1(x)yp+a0(x)yp)=={\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(x)=g(x)={0}+{g{{\left({x}\right)}}}={g{{\left({x}\right)}}}

So, indeed, y=yp+yh{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+y2y=0{y}''+{y}'-{2}{y}={0} is yh=c1e2x+c2ex{y}_{{h}}={c}_{{1}}{{e}}^{{-{2}{x}}}+{c}_{{2}}{{e}}^{{{x}}}. For the nonhomogeneous equation y+y2y=2(1+xx2){y}''+{y}'-{2}{y}={2}{\left({1}+{x}-{{x}}^{{2}}\right)}, the particular solution is yp=x2{y}_{{p}}={{x}}^{{2}}. So, the general solution of the nonhomogeneous differential equation is y+y2y=2(1+xx2){y}''+{y}'-{2}{y}={2}{\left({1}+{x}-{{x}}^{{2}}\right)} is y=yh+yp=c1e2x+c2ex+x2{y}={y}_{{h}}+{y}_{{p}}={c}_{{1}}{{e}}^{{-{2}{x}}}+{c}_{{2}}{{e}}^{{x}}+{{x}}^{{2}}.