Linear Differential Equations

A first-order linear differential equation has the form y+p(t)y=q(t){y}'+{p}{\left({t}\right)}{y}={q}{\left({t}\right)}.

To solve it, rewrite it in the differential form: dydt+p(t)y=q(t)\frac{{{d}{y}}}{{{d}{t}}}+{p}{\left({t}\right)}{y}={q}{\left({t}\right)}, or (p(t)yq(t))dt+dy=0{\left({p}{\left({t}\right)}{y}-{q}{\left({t}\right)}\right)}{d}{t}+{d}{y}={0}.

Now, using the facts about exact equations, we see that this equation is not exact. However, since M(t,y)=p(t)yq(t){M}{\left({t},{y}\right)}={p}{\left({t}\right)}{y}-{q}{\left({t}\right)} and N(t,y)=1{N}{\left({t},{y}\right)}={1}, we have that My=p(t)\frac{{\partial{M}}}{{\partial{y}}}={p}{\left({t}\right)} and Nx=0\frac{{\partial{N}}}{{\partial{x}}}={0}. So, 1N(MyNx)=11(p(t)0)=p(t)\frac{{1}}{{N}}{\left(\frac{{\partial{M}}}{{\partial{y}}}-\frac{{\partial{N}}}{{\partial{x}}}\right)}=\frac{{1}}{{1}}{\left({p}{\left({t}\right)}-{0}\right)}={p}{\left({t}\right)}. Thus, the integrating factor is I(t,y)=ep(t)dt{I}{\left({t},{y}\right)}={{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}.

Now, return to the initial equation and multiply it by the integrating factor:

yep(t)dt+p(t)ep(t)dty=q(t)ep(t)dt{y}'{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}+{p}{\left({t}\right)}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}{y}={q}{\left({t}\right)}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}.

Closely looking at the left side, we note that it equals d(yep(t)dt){d}{\left({y}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}\right)}.

So, the equation can be rewritten as d(yep(t)dt)=q(t)ep(t)dt{d}{\left({y}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}\right)}={q}{\left({t}\right)}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}.

Integrating both sides gives yep(t)dt=(q(t)ep(t)dt)dt+C{y}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}=\int{\left({q}{\left({t}\right)}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}\right)}{d}{t}+{C}.

Finally, y=ep(t)dt(q(t)ep(t)dt)dt+Cep(t)dt{y}={{e}}^{{-\int{p}{\left({t}\right)}{d}{t}}}\int{\left({q}{\left({t}\right)}{{e}}^{{\int{p}{\left({t}\right)}{d}{t}}}\right)}{d}{t}+{C}{{e}}^{{-\int{p}{\left({t}\right)}{d}{t}}}.

This formula allows to find the solution directly.

Example 1. Solve y7y=et{y}'-{7}{y}={{e}}^{{{t}}}.

Here, p(t)=7{p}{\left({t}\right)}=-{7}, and q(t)=et{q}{\left({t}\right)}={{e}}^{{t}}.

So, the solution is

y=e7dt(ete7dt)dt+Ce7dt=e7t(e6t)dt+Ce7t=e7t(16)e6t+Ce7t=Ce7t16et{y}={{e}}^{{-\int-{7}{d}{t}}}\int{\left({{e}}^{{t}}\cdot{{e}}^{{\int-{7}{d}{t}}}\right)}{d}{t}+{C}{{e}}^{{-\int-{7}{d}{t}}}={{e}}^{{{7}{t}}}\int{\left({{e}}^{{-{6}{t}}}\right)}{d}{t}+{C}{{e}}^{{{7}{t}}}={{e}}^{{{7}{t}}}\cdot{\left(-\frac{{1}}{{6}}\right)}{{e}}^{{-{6}{t}}}+{C}{{e}}^{{{7}{t}}}={C}{{e}}^{{{7}{t}}}-\frac{{1}}{{6}}{{e}}^{{t}}

Thus, y=Ce7t16et{y}={C}{{e}}^{{{7}{t}}}-\frac{{1}}{{6}}{{e}}^{{t}}.

Let's work another quick example.

Example 2. Solve t2y3y1=0{{t}}^{{2}}{y}'-{3}{y}-{1}={0}, y(3)=0{y}{\left({3}\right)}={0}.

First, rewrite the equation: y3t2y=1t2{y}'-\frac{{3}}{{{t}}^{{2}}}{y}=\frac{{1}}{{{t}}^{{2}}}.

Here, p(t)=3t2{p}{\left({t}\right)}=-\frac{{3}}{{{t}}^{{2}}}, and q(t)=1t2{q}{\left({t}\right)}=\frac{{1}}{{{t}}^{{2}}}.

So,

y=e3t2dt(1t2e3t2dt)dt+Ce3t2dt=e3t(1t2e3t)dt+Ce3t=e3t(13)e3t+Ce3t=Ce3t13{y}={{e}}^{{-\int-\frac{{3}}{{{t}}^{{2}}}{d}{t}}}\int{\left(\frac{{1}}{{{t}}^{{2}}}{{e}}^{{\int-\frac{{3}}{{{t}}^{{2}}}{d}{t}}}\right)}{d}{t}+{C}{{e}}^{{-\int-\frac{{3}}{{{t}}^{{2}}}{d}{t}}}={{e}}^{{-\frac{{3}}{{t}}}}\int{\left(\frac{{1}}{{{t}}^{{2}}}{{e}}^{{\frac{{3}}{{t}}}}\right)}{d}{t}+{C}{{e}}^{{-\frac{{3}}{{t}}}}={{e}}^{{-\frac{{3}}{{t}}}}\cdot{\left(-\frac{{1}}{{3}}\right)}{{e}}^{{\frac{{3}}{{t}}}}+{C}{{e}}^{{-\frac{{3}}{{t}}}}={C}{{e}}^{{-\frac{{3}}{{t}}}}-\frac{{1}}{{3}}

y=Ce3t13{y}={C}{{e}}^{{-\frac{{3}}{{t}}}}-\frac{{1}}{{3}}.

To find the particular solution, plug in the initial condition:

0=Ce3313{0}={C}{{e}}^{{-\frac{{3}}{{3}}}}-\frac{{1}}{{3}} or C=e3{C}=\frac{{e}}{{3}}

Finally, y=e3e3t13=13(e13t1){y}=\frac{{e}}{{3}}{{e}}^{{-\frac{{3}}{{t}}}}-\frac{{1}}{{3}}=\frac{{1}}{{3}}{\left({{e}}^{{{1}-\frac{{3}}{{t}}}}-{1}\right)}.