Solving Second Order ODEs by Computing Integrating Factors for Them - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : dsolve : dsolve/integrating_factors

Solving Second Order ODEs by Computing Integrating Factors for Them

Description

 Integrating factors - depending on two variables - for second order ODEs
 • For second order ODEs integrating factors depending on three variables, (x,y,y') always exist - their determination however may be as difficult as solving the ODEs themselves. However, integrating factors of the form mu(x,y), mu(x,y'), mu(y,y'), that is, depending on just two variables, when they exist, can be determined systematically (see E.S. Cheb-Terrab and A.D. Roche, "Integrating factors for second order ODEs", Journal of Symbolic Computation V. 27, No. 5 (1999) 501). This method is implemented in dsolve.
 • The main idea of this method consists of algorithmically determining whether or not a given second order ODE is member of one of the three reducible ODE families respectively admitting integrating factors of the forms mu(x,y), mu(x,y'), mu(y,y') (see redode):
 > with(DEtools,redode):
 > 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{'}}}$ (1)
 > subs(_F1 = G, redode(mu(x,y(x)),y(x),2) );            # ODE family admitting mu(x,y)
 ${\mathrm{y\text{'}\text{'}}}{=}{-}\frac{{\mathrm{D}}{[}{2}{]}{}\left({\mathrm{μ}}\right){}\left({x}{,}{y}\right){}{{\mathrm{y\text{'}}}}^{{2}}{+}{\mathrm{D}}{[}{1}{]}{}\left({\mathrm{μ}}\right){}\left({x}{,}{y}\right){}{\mathrm{y\text{'}}}{+}{\mathrm{D}}{[}{2}{]}{}\left({G}\right){}\left({x}{,}{y}\right){}{\mathrm{y\text{'}}}{+}{\mathrm{D}}{[}{1}{]}{}\left({G}\right){}\left({x}{,}{y}\right)}{{\mathrm{μ}}{}\left({x}{,}{y}\right)}$ (2)
 > convert( subs(diff(y(x),x,x) = y'', diff(y(x),x) = y',y(x)=y,(2)), diff);
 ${\mathrm{y\text{'}\text{'}}}{=}{-}\frac{{{\mathrm{y\text{'}}}}^{{2}}{}{{\mathrm{μ}}}_{{y}}{+}{\mathrm{y\text{'}}}{}{{G}}_{{y}}{+}{\mathrm{y\text{'}}}{}{{\mathrm{μ}}}_{{x}}{+}{{G}}_{{x}}}{{\mathrm{μ}}{}\left({x}{,}{y}\right)}$ (3)
 > subs(_F1 = G, redode(mu(x,diff(y(x),x)),y(x),2) );    # ODE family admitting mu(x,y')
 ${\mathrm{y\text{'}\text{'}}}{=}{-}\frac{{{∫}}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{μ}}}_{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}{+}{\mathrm{D}}{[}{1}{]}{}\left({G}\right){}\left({x}{,}{y}\right){+}{\mathrm{D}}{[}{2}{]}{}\left({G}\right){}\left({x}{,}{y}\right){}{\mathrm{y\text{'}}}}{{\mathrm{μ}}{}\left({x}{,}{\mathrm{y\text{'}}}\right)}$ (4)
 > convert( subs(diff(y(x),x,x) = y'', diff(y(x),x) = y',y(x)=y,(4)), diff);
 ${\mathrm{y\text{'}\text{'}}}{=}{-}\frac{{{∫}}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{μ}}}_{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}{+}{{G}}_{{x}}{+}{{G}}_{{y}}{}{\mathrm{y\text{'}}}}{{\mathrm{μ}}{}\left({x}{,}{\mathrm{y\text{'}}}\right)}$ (5)
 > subs(_F1 = G, redode(mu(y(x),diff(y(x),x)),y(x),2) ); # ODE family admitting mu(y,y')
 ${\mathrm{y\text{'}\text{'}}}{=}{-}\frac{{{∫}}_{{}}^{{\mathrm{y\text{'}}}}{\mathrm{D}}{[}{1}{]}{}\left({\mathrm{μ}}\right){}\left({y}{,}{\mathrm{_a}}\right){}{\mathrm{y\text{'}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}{+}{\mathrm{D}}{[}{1}{]}{}\left({G}\right){}\left({x}{,}{y}\right){+}{\mathrm{D}}{[}{2}{]}{}\left({G}\right){}\left({x}{,}{y}\right){}{\mathrm{y\text{'}}}}{{\mathrm{μ}}{}\left({y}{,}{\mathrm{y\text{'}}}\right)}$ (6)
 > convert( subs(diff(y(x),x,x) = y'', diff(y(x),x) = y',y(x)=y,(6)), diff);
 ${\mathrm{y\text{'}\text{'}}}{=}{-}\frac{{{∫}}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{μ}}}_{{y}}{}{\mathrm{y\text{'}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}{+}{{G}}_{{x}}{+}{{G}}_{{y}}{}{\mathrm{y\text{'}}}}{{\mathrm{μ}}{}\left({y}{,}{\mathrm{y\text{'}}}\right)}$ (7)
 and in doing that, determining mu. Concretely, this means that members of these three ODE families can now be systematically reduced to first order ODEs - for arbitrary mu and G - as if they were simple exact equations (total derivatives). This has enlarged in a noticeable way the decision procedures available for tackling second order ODEs in the nonlinear case.

Examples

Although the relevant thing here is that the new algorithms don't require solving any auxiliary differential equation, it is also worth mentioning that the ODE families above include members not having point symmetries and nonetheless reducible to quadratures; this fact was the main result of an interesting article in 1988 (see A. Gonzalez-Lopez, Phys. Lett. A, (1988) 190). As an ODE example, consider

 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{firint},\mathrm{intfactor},\mathrm{mutest},\mathrm{odeadvisor}\right):$
 > $\mathrm{ode}≔\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)-\frac{{\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)}^{2}}{y\left(x\right)}+\mathrm{sin}\left(x\right)y\left(x\right)\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+\mathrm{cos}\left(x\right){y\left(x\right)}^{2}=0$
 ${\mathrm{ode}}{≔}{\mathrm{y\text{'}\text{'}}}{-}\frac{{{\mathrm{y\text{'}}}}^{{2}}}{{y}}{+}{\mathrm{sin}}{}\left({x}\right){}{y}{}{\mathrm{y\text{'}}}{+}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{2}}{=}{0}$ (8)

This ODE has the following integrating factor (see intfactor)

 > $\mathrm{Μ}≔\mathrm{intfactor}\left(\mathrm{ode},y\left(x\right)\right)$
 ${\mathrm{Μ}}{≔}\frac{{1}}{{y}}$ (9)

This integrating factor can be tested using mutest

 > $\mathrm{mutest}\left(\mathrm{Μ},\mathrm{ode}\right)$
 ${0}$ (10)

The product Mu*ode is an exact ODE (a total derivative) and hence one can take advantage of this fact to reduce the second order ODE to a first order one, in this case of Bernoulli type (in turn fully solvable in the general case):

 > $\mathrm{first_integral}≔\mathrm{firint}\left(\mathrm{Μ}\mathrm{ode},y\left(x\right)\right)$
 ${\mathrm{first_integral}}{≔}{\mathrm{sin}}{}\left({x}\right){}{y}{+}\frac{{\mathrm{y\text{'}}}}{{y}}{+}{\mathrm{_C1}}{=}{0}$ (11)
 > $\mathrm{odeadvisor}\left(\mathrm{first_integral},y\left(x\right)\right)$
 $\left[{\mathrm{_Bernoulli}}\right]$ (12)

From where the solution to the original ode follows straightforwardly:

 > $\mathrm{dsolve}\left(\mathrm{first_integral}\right)$
 ${y}{=}\frac{{{\mathrm{_C1}}}^{{2}}{+}{1}}{{{ⅇ}}^{{\mathrm{_C1}}{}{x}}{}{{\mathrm{_C1}}}^{{2}}{}{\mathrm{_C2}}{+}{{ⅇ}}^{{\mathrm{_C1}}{}{x}}{}{\mathrm{_C2}}{-}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{_C1}}{-}{\mathrm{cos}}{}\left({x}\right)}$ (13)
 > $\mathrm{odetest}\left(,\mathrm{ode}\right)$
 ${0}$ (14)

(for more details on how to build solutions from the knowledge of integrating factors see dsolve,education, subsection Constructing solutions using integrating factors.) All these steps are performed automatically by dsolve by calling

 > $\mathrm{dsolve}\left(\mathrm{ode},y\left(x\right)\right)$

It is also possible to invoke the use of "just" this method for reducible ODEs or for each of the three forms of integrating factors via

 > $\mathrm{dsolve}\left(\mathrm{ode},y\left(x\right),\left[\mathrm{reducible}\right]\right)$
 > $\mathrm{dsolve}\left(\mathrm{ode},y\left(x\right),\left[\mathrm{mu_xy}\right]\right)$
 > $\mathrm{dsolve}\left(\mathrm{ode},y\left(x\right),\left[\mathrm{mu_y_y1}\right]\right)$
 > $\mathrm{dsolve}\left(\mathrm{ode},y\left(x\right),\left[\mathrm{mu_x_y1}\right]\right)$

For the specific example under discussion, the first three callings above will solve the problem.

As a concluding remark, an ODE not having point symmetries and having such an integrating factor of the form 1/y is still a simple problem if compared with the three ODE families shown on top, related to arbitrary integrating factors depending on two variables.

That the ode under discussion has no point symmetries can be checked with ease as follows. First we generate the determining system for the infinitesimals of the symmetry generator (see gensys):

 > $\mathrm{sys}≔\mathrm{DEtools}[\mathrm{gensys}]\left(\mathrm{ode},\left[\mathrm{ξ}\left(x,y\right),\mathrm{η}\left(x,y\right)\right]\right)$
 ${\mathrm{sys}}{≔}{-}{{y}}^{{2}}{}{{\mathrm{ξ}}}_{{y}{,}{y}}{-}{y}{}{{\mathrm{ξ}}}_{{y}}{,}{2}{}{{\mathrm{ξ}}}_{{y}}{}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{3}}{+}{{\mathrm{η}}}_{{y}{,}{y}}{}{{y}}^{{2}}{-}{2}{}{{\mathrm{ξ}}}_{{x}{,}{y}}{}{{y}}^{{2}}{-}{{\mathrm{η}}}_{{y}}{}{y}{+}{\mathrm{η}}{}\left({x}{,}{y}\right){,}{3}{}{{\mathrm{ξ}}}_{{y}}{}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{4}}{+}{\mathrm{ξ}}{}\left({x}{,}{y}\right){}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{3}}{+}{{\mathrm{ξ}}}_{{x}}{}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{3}}{+}{\mathrm{η}}{}\left({x}{,}{y}\right){}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{2}}{+}{2}{}{{\mathrm{η}}}_{{x}{,}{y}}{}{{y}}^{{2}}{-}{{\mathrm{ξ}}}_{{x}{,}{x}}{}{{y}}^{{2}}{-}{2}{}{{\mathrm{η}}}_{{x}}{}{y}{,}{-}{\mathrm{ξ}}{}\left({x}{,}{y}\right){}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{4}}{+}{2}{}{{\mathrm{ξ}}}_{{x}}{}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{4}}{-}{{\mathrm{η}}}_{{y}}{}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{4}}{+}{{\mathrm{η}}}_{{x}}{}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{3}}{+}{2}{}{\mathrm{η}}{}\left({x}{,}{y}\right){}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{3}}{+}{{\mathrm{η}}}_{{x}{,}{x}}{}{{y}}^{{2}}$ (15)
 > $\mathrm{nops}\left(\left[\mathrm{sys}\right]\right)$
 ${4}$ (16)

Then we simplify this system with respect to its integrability conditions using casesplit (in turn using DifferentialAlgebra or DEtools,Rif):

 > $\mathrm{PDEtools}[\mathrm{casesplit}]\left(\left[\mathrm{sys}\right]\right)$
 $\left[{\mathrm{η}}{}\left({x}{,}{y}\right){=}{0}{,}{\mathrm{ξ}}{}\left({x}{,}{y}\right){=}{0}\right]{&where}\left[{}\right]$ (17)

verifying that the only solution to this system is the trivial (useless) one. There are in fact infinitely many cases like the one just mentioned, so that the integrating factor and the symmetry approaches end up complementing each other in a quite useful manner.