Solving Linear ODEs Which Are Fully Exact - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : Classifying ODEs : First Order : odeadvisor/fully_exact_linear

Solving Linear ODEs Which Are Fully Exact

Description

 • A fully exact nth-order linear ODE is one which can be obtained by directly differentiating a first order linear ODE n-1 times; for example, a fourth order ODE of this type is of the form:
 > fully_exact_linear_4th_order_ODE := Diff( A(x)*diff(y(x),x) + B(x)*y(x) + C(x) = 0, x$3);  ${\mathrm{fully_exact_linear_4th_order_ODE}}{≔}\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left({A}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{B}{}\left({x}\right){}{y}{}\left({x}\right){+}{C}{}\left({x}\right){=}{0}\right)$ (1)  • Linear ODEs (LODEs) of this form can be recognized by the fact that the adjoint of their homogeneous part is always a first order ODE in disguised form (see "How it works" below). This type of LODE is systematically solved by dsolve. Examples  > with(DEtools, adjoint, firint, odeadvisor);  $\left[{\mathrm{adjoint}}{,}{\mathrm{firint}}{,}{\mathrm{odeadvisor}}\right]$ (2)  > PDEtools[declare](y(x), prime=x);  ${y}{}\left({x}\right){}{\mathrm{will now be displayed as}}{}{y}$  ${\mathrm{derivatives with respect to}}{}{x}{}{\mathrm{of functions of one variable will now be displayed with \text{'}}}$ (3) Consider the following 4th order ODE:  > ODE4 := (x^2+exp(x)*x)*diff(y(x),x,x,x,x) + (4*exp(x)+6*x+3*exp(x)*x)*diff(y(x),x,x,x) + (6+3*exp(x)*x+9*exp(x))*diff(y(x),x,x) + (exp(x)*x+6*exp(x))*diff(y(x),x) + exp(x)*y(x) = 0;  ${\mathrm{ODE4}}{≔}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}\text{'}\text{'}\text{'}}}{+}\left({4}{}{{ⅇ}}^{{x}}{+}{6}{}{x}{+}{3}{}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}\text{'}\text{'}}}{+}\left({6}{+}{3}{}{{ⅇ}}^{{x}}{}{x}{+}{9}{}{{ⅇ}}^{{x}}\right){}{\mathrm{y\text{'}\text{'}}}{+}\left({{ⅇ}}^{{x}}{}{x}{+}{6}{}{{ⅇ}}^{{x}}\right){}{\mathrm{y\text{'}}}{+}{{ⅇ}}^{{x}}{}{y}{=}{0}$ (4)  > odeadvisor(ODE4,y(x));  $\left[\left[{\mathrm{_high_order}}{,}{\mathrm{_fully}}{,}{\mathrm{_exact}}{,}{\mathrm{_linear}}\right]\right]$ (5) Once we know ODE4 is fully exact we can reduce it to a first order linear ODE straightforwardly; this reduction can be performed interactively, for instance, using the firint command as follows:  > ODE3 := firint( ODE4, y(x) );  ${\mathrm{ODE3}}{≔}{{ⅇ}}^{{x}}{}{y}{+}\left({{ⅇ}}^{{x}}{}{x}{+}{4}{}{{ⅇ}}^{{x}}{+}{2}\right){}{\mathrm{y\text{'}}}{+}\left({2}{}{{ⅇ}}^{{x}}{}{x}{+}{3}{}{{ⅇ}}^{{x}}{+}{4}{}{x}\right){}{\mathrm{y\text{'}\text{'}}}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}\text{'}\text{'}}}{+}{\mathrm{_C1}}{=}{0}$ (6)  > ODE2 := firint( ODE3, y(x) );  ${\mathrm{ODE2}}{≔}{{ⅇ}}^{{x}}{}{y}{+}\left({{ⅇ}}^{{x}}{}{x}{+}{2}{}{{ⅇ}}^{{x}}{+}{2}{}{x}\right){}{\mathrm{y\text{'}}}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}\text{'}}}{+}{\mathrm{_C1}}{}{x}{+}{\mathrm{_C2}}{=}{0}$ (7)  > ODE1 := firint( ODE2, y(x) );  ${\mathrm{ODE1}}{≔}{{ⅇ}}^{{x}}{}{y}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}}}{+}\frac{{\mathrm{_C1}}{}{{x}}^{{2}}}{{2}}{+}{\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{=}{0}$ (8) and the first order LODE above - ODE1 - can be solved using dsolve leading to the solution to ODE4  > sol1 := dsolve( ODE1, y(x) );  ${\mathrm{sol1}}{≔}{y}{=}\left({\int }{-}\frac{{{ⅇ}}^{{\int }\frac{{{ⅇ}}^{{x}}}{{x}{}\left({{ⅇ}}^{{x}}{+}{x}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{}\left({\mathrm{_C1}}{}{{x}}^{{2}}{+}{2}{}{\mathrm{_C2}}{}{x}{+}{2}{}{\mathrm{_C3}}\right)}{{2}{}{x}{}\left({{ⅇ}}^{{x}}{+}{x}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C4}}\right){}{{ⅇ}}^{{\int }{-}\frac{{{ⅇ}}^{{x}}}{{x}{}\left({{ⅇ}}^{{x}}{+}{x}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}$ (9)  > odetest(sol1,ODE4);  ${0}$ (10) The solution above is essentially the same one obtains by calling dsolve directly:  > dsolve( ODE4, y(x) );  ${y}{=}\left({\mathrm{_C4}}{+}{\int }\frac{\left({3}{}{\mathrm{_C1}}{}{{x}}^{{2}}{+}{2}{}{\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}\right){}{{ⅇ}}^{{\int }\frac{{{ⅇ}}^{{x}}}{{{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}}{{{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{{ⅇ}}^{{-}\left({\int }\frac{{{ⅇ}}^{{x}}}{{{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)}$ (11) How it works To detect that ODE4 is fully exact, we first look at the equation's adjoint:  > ADJ := adjoint(ODE4, y(x));  ${\mathrm{ADJ}}{≔}\left({{ⅇ}}^{{x}}{}{x}{+}{2}{}{x}\right){}{\mathrm{y\text{'}\text{'}\text{'}}}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}\text{'}\text{'}\text{'}}}$ (12) This adjoint contains only third and fourth order derivatives, and hence can be seen as a first order ODE in y'''. This means that the original fourth order ODE4 can be obtained by differentiating 3 times a certain first order linear ODE1 (not the one obtained with firint lines above). In turn, this ODE1 can be obtained directly from the adjoint equation ADJ above by replacing y''' -> y and calculating the adjoint again:  > subs( diff(y(x),x$3) = y(x), ADJ );
 $\left({{ⅇ}}^{{x}}{}{x}{+}{2}{}{x}\right){}{y}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}}}$ (13)
 ${{ⅇ}}^{{x}}{}{y}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}}}$ (14)

Actually, differentiating 3 times the equation above one reobtains the original fourth order ODE:

 > diff( (14), x\$3) = 0;
 ${{ⅇ}}^{{x}}{}{y}{+}{3}{}{\mathrm{y\text{'}}}{}{{ⅇ}}^{{x}}{+}{3}{}{\mathrm{y\text{'}\text{'}}}{}{{ⅇ}}^{{x}}{+}{\mathrm{y\text{'}\text{'}\text{'}}}{}{{ⅇ}}^{{x}}{+}\left({{ⅇ}}^{{x}}{}{x}{+}{3}{}{{ⅇ}}^{{x}}\right){}{\mathrm{y\text{'}}}{+}{3}{}\left({2}{+}{{ⅇ}}^{{x}}{}{x}{+}{2}{}{{ⅇ}}^{{x}}\right){}{\mathrm{y\text{'}\text{'}}}{+}{3}{}\left({2}{}{x}{+}{{ⅇ}}^{{x}}{}{x}{+}{{ⅇ}}^{{x}}\right){}{\mathrm{y\text{'}\text{'}\text{'}}}{+}\left({{x}}^{{2}}{+}{{ⅇ}}^{{x}}{}{x}\right){}{\mathrm{y\text{'}\text{'}\text{'}\text{'}}}{=}{0}$ (15)
 > normal( (15) - ODE4 );
 ${0}{=}{0}$ (16)

The method just explained works with ODEs of arbitrary order, and - as in the homogeneous case - if the given fully exact LODE is non-homogeneous, then it can be obtained by differentiating a non-homogeneous linear first order ODE, and this fact can be detected in the same way by analyzing the adjoint of the homogeneous part of the given LODE.

One of the interesting properties of this method is that a closed form "solution-formula" can be written directly, for all differential orders and for the "non-homogeneous case" (the homogeneous one is just a particular case) - thus shortcutting all the steps and the need for first solving the homogeneous part to afterwards finding a particular solution, for instance, through variation of parameters.

What is at the base of this method is the fact that integrating factors for a LODE are solutions of its adjoint (see for instance Murphy's book and others in dsolve, references).