 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{\mu }}\right){}\left({x}{,}{y}\right){}{{\mathrm{y\text{'}}}}^{{2}}{+}{{\mathrm{D}}}_{{1}}{}\left({\mathrm{\mu }}\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{\mu }}{}\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{\mu }}}_{{y}}{}{{\mathrm{y\text{'}}}}^{{2}}{+}{{G}}_{{y}}{}{\mathrm{y\text{'}}}{+}{{\mathrm{\mu }}}_{{x}}{}{\mathrm{y\text{'}}}{+}{{G}}_{{x}}}{{\mathrm{\mu }}{}\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{{{\int }}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{\mu }}}_{{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{\mu }}{}\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{{{\int }}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{\mu }}}_{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}{+}{{G}}_{{x}}{+}{{G}}_{{y}}{}{\mathrm{y\text{'}}}}{{\mathrm{\mu }}{}\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{{{\int }}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{D}}}_{{1}}{}\left({\mathrm{\mu }}\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{\mu }}{}\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{{{\int }}_{{}}^{{\mathrm{y\text{'}}}}{{\mathrm{\mu }}}_{{y}}{}{\mathrm{y\text{'}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}{+}{{G}}_{{x}}{+}{{G}}_{{y}}{}{\mathrm{y\text{'}}}}{{\mathrm{\mu }}{}\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}≔\mathrm{diff}\left(y\left(x\right),x,x\right)-\frac{{\mathrm{diff}\left(y\left(x\right),x\right)}^{2}}{y\left(x\right)}+\mathrm{sin}\left(x\right)y\left(x\right)\mathrm{diff}\left(y\left(x\right),x\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}\left[\mathrm{gensys}\right]\left(\mathrm{ode},\left[\mathrm{\xi }\left(x,y\right),\mathrm{\eta }\left(x,y\right)\right]\right)$
 ${\mathrm{sys}}{≔}{-}{{\mathrm{\xi }}}_{{y}{,}{y}}{}{{y}}^{{2}}{-}{{\mathrm{\xi }}}_{{y}}{}{y}{,}{2}{}{{\mathrm{\xi }}}_{{y}}{}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{3}}{+}{{\mathrm{\eta }}}_{{y}{,}{y}}{}{{y}}^{{2}}{-}{2}{}{{\mathrm{\xi }}}_{{x}{,}{y}}{}{{y}}^{{2}}{-}{{\mathrm{\eta }}}_{{y}}{}{y}{+}{\mathrm{\eta }}{}\left({x}{,}{y}\right){,}{3}{}{{\mathrm{\xi }}}_{{y}}{}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{4}}{+}{{\mathrm{\xi }}}_{{x}}{}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{3}}{+}{\mathrm{\xi }}{}\left({x}{,}{y}\right){}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{3}}{+}{\mathrm{\eta }}{}\left({x}{,}{y}\right){}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{2}}{+}{2}{}{{\mathrm{\eta }}}_{{x}{,}{y}}{}{{y}}^{{2}}{-}{{\mathrm{\xi }}}_{{x}{,}{x}}{}{{y}}^{{2}}{-}{2}{}{{\mathrm{\eta }}}_{{x}}{}{y}{,}{2}{}{{\mathrm{\xi }}}_{{x}}{}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{4}}{-}{{\mathrm{\eta }}}_{{y}}{}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{4}}{-}{\mathrm{\xi }}{}\left({x}{,}{y}\right){}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{4}}{+}{2}{}{\mathrm{\eta }}{}\left({x}{,}{y}\right){}{\mathrm{cos}}{}\left({x}\right){}{{y}}^{{3}}{+}{{\mathrm{\eta }}}_{{x}}{}{\mathrm{sin}}{}\left({x}\right){}{{y}}^{{3}}{+}{{\mathrm{\eta }}}_{{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}\left[\mathrm{casesplit}\right]\left(\left[\mathrm{sys}\right]\right)$
 $\left[{\mathrm{\eta }}{}\left({x}{,}{y}\right){=}{0}{,}{\mathrm{\xi }}{}\left({x}{,}{y}\right){=}{0}\right]\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\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.