integrating factors (linear) - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Differential Equations : dsolve : integrating factors (linear)

Solving Linear Ordinary Differential Equations (LODEs) by computing integrating factors for them

Description

 Integrating factors for second and higher order linear ODEs
 • For linear ODEs (LODEs) of order 2 or greater, it is possible to calculate integrating factors by solving the adjoint of the LODE. This could be as difficult as the original problem, or much easier, depending on the example. This method is implemented in dsolve.

Examples

 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{adjoint},\mathrm{firint},\mathrm{intfactor}\right):$
 > $\mathrm{ode}≔\mathrm{diff}\left(y\left(x\right),x,x\right)=\frac{y\left(x\right)x+y\left(x\right)\mathrm{ln}\left(x\right){x}^{2}+\mathrm{diff}\left(y\left(x\right),x\right)\mathrm{ln}\left(x\right){x}^{2}}{\mathrm{ln}\left(x\right){x}^{2}}\mathrm{exp}\left(x\right)-\frac{y\left(x\right)}{\mathrm{ln}\left(x\right){x}^{2}}$
 ${\mathrm{ode}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{\left({y}{}\left({x}\right){}{x}{+}{y}{}\left({x}\right){}{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}{+}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}\right){}{{ⅇ}}^{{x}}}{{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}}{-}\frac{{y}{}\left({x}\right)}{{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}}$ (1)

This ODE has the following adjoint

 > $\mathrm{adjoint}\left(\mathrm{ode},y\left(x\right)\right)$
 ${-}\frac{\left({{ⅇ}}^{{x}}{}{x}{-}{1}\right){}{y}{}\left({x}\right)}{{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}}{+}{{ⅇ}}^{{x}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)$ (2)

This adjoint equation is in turn solvable by dsolve

 > $\mathrm{dsolve}\left(\right)$
 ${y}{}\left({x}\right){=}\left(\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{_C1}}{+}{\mathrm{_C2}}\right){}{\mathrm{ln}}{}\left({x}\right)$ (3)

Now the solutions to the adjoint equation are integrating factors of the original LODE, so the two independent solutions implied in the general solution above

 > $\mathrm{eval}\left(\mathrm{rhs}\left(\right),\left\{\mathrm{_C1}=0,\mathrm{_C2}=1\right\}\right)$
 ${\mathrm{ln}}{}\left({x}\right)$ (4)
 > $\mathrm{eval}\left(\mathrm{rhs}\left(\right),\left\{\mathrm{_C1}=1,\mathrm{_C2}=2\right\}\right)$
 $\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{2}\right){}{\mathrm{ln}}{}\left({x}\right)$ (5)

are integrating factors of ode. These integrating factors could also be found using the intfactor directly

 > $\mathrm{Μ}≔\mathrm{intfactor}\left(\mathrm{ode}\right)$
 ${\mathrm{Μ}}{≔}{\mathrm{ln}}{}\left({x}\right){,}\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{ln}}{}\left({x}\right)$ (6)

Constructing solutions using integrating factors

How are these integrating factors transformed into a solution to the original problem? By using them to construct two first integrals; that is: two ODEs of lower order (in this case two first order ODEs). For that purpose it is provided the firint command which receives an exact ODE and returns a first integral. The idea is simple: an exact ODE is a total derivative - say dR/dx; firint returns the R + _C1:

 > $\mathrm{firint}\left(\mathrm{Μ}\left[1\right]\mathrm{ode}\right)$
 ${-}\frac{\left({\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}{}{{ⅇ}}^{{x}}{+}{x}\right){}{y}{}\left({x}\right)}{{{x}}^{{2}}}{+}{\mathrm{ln}}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{\mathrm{_C1}}{=}{0}$ (7)
 > $\mathrm{firint}\left(\mathrm{Μ}\left[2\right]\mathrm{ode}\right)$
 ${-}\frac{\left(\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{{\mathrm{ln}}{}\left({x}\right)}^{{2}}{}{{ⅇ}}^{{x}}{}{{x}}^{{2}}{+}\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{ln}}{}\left({x}\right){}{x}{+}{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}{}{{x}}^{{2}}\right){}{y}{}\left({x}\right)}{{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}}{+}\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{ln}}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{\mathrm{_C1}}{=}{0}$ (8)

Eliminating y' from these two first integrals (and replacing _C1 by _C2 in one of them) leads to the solution f(x,y(x),_C1,_C2) = 0 to this ode. So this process could be run interactively, as shown, or in one step

 > $\mathrm{dsolve}\left(\mathrm{ode}\right)$
 ${y}{}\left({x}\right){=}{\mathrm{_C1}}{}{{ⅇ}}^{{{ⅇ}}^{{x}}}{}{\mathrm{ln}}{}\left({x}\right){+}{\mathrm{_C2}}{}{{ⅇ}}^{{{ⅇ}}^{{x}}}{}\left({\int }\frac{{{ⅇ}}^{{-}{{ⅇ}}^{{x}}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{ln}}{}\left({x}\right)$ (9)

 See Also