Solving Second and Third Order ODEs using an Integrating Factor - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : Classifying ODEs : High Order : odeadvisor/reducible

Solving Second and Third Order ODEs using an Integrating Factor

Description

 • If, for an nth order ODE (n=2 or n=3) with the nth derivative isolated, there exists an integrating factor which depends only on the (n-1)st derivative, this integrating factor can be determined. The differential order of the ODE can then be reduced by one.
 • The general form of such an ODE of second order is:
 > reducible_ode_2 := diff(y(x),x,x)=diff(G(x,y(x)),x)/D(F)(diff(y(x),x));
 ${\mathrm{reducible_ode_2}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{{{\mathrm{D}}}_{{1}}{}\left({G}\right){}\left({x}{,}{y}{}\left({x}\right)\right){+}{{\mathrm{D}}}_{{2}}{}\left({G}\right){}\left({x}{,}{y}{}\left({x}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{\mathrm{D}}{}\left({F}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}$ (1)
 where F and G are arbitrary functions of their arguments. The integrating factor in this case is
 > mu := D(F)(diff(y(x),x));
 ${\mathrm{\mu }}{≔}{\mathrm{D}}{}\left({F}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)$ (2)
 The reduced ODE then becomes
 > F(diff(y(x),x)) = G(x,y(x)) + _C1;
 ${F}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{G}{}\left({x}{,}{y}{}\left({x}\right)\right){+}{\mathrm{_C1}}$ (3)
 • The general form of this ODE of third order is:
 > reducible_ode_3 := diff(y(x),x\$3)=diff(G(x,y(x),diff(y(x),x)),x)/D(F)(diff(y(x),x,x));
 ${\mathrm{reducible_ode_3}}{≔}\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{{{\mathrm{D}}}_{{1}}{}\left({G}\right){}\left({x}{,}{y}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{{\mathrm{D}}}_{{2}}{}\left({G}\right){}\left({x}{,}{y}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{{\mathrm{D}}}_{{3}}{}\left({G}\right){}\left({x}{,}{y}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{\mathrm{D}}{}\left({F}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}$ (4)
 where F and G are arbitrary functions of their arguments. The integrating factor in this case is
 > mu := D(F)(diff(y(x),x,x));
 ${\mathrm{\mu }}{≔}{\mathrm{D}}{}\left({F}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)$ (5)
 The reduced ODE is
 > F(diff(y(x),x,x)) = G(x,y(x),diff(y(x),x)) + _C1;
 ${F}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{G}{}\left({x}{,}{y}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{\mathrm{_C1}}$ (6)

Examples

 $\left[{\mathrm{odeadvisor}}\right]$ (7)
 > ode[1] := (x*diff(y(x),x,x)+2*diff(y(x),x))/x^2-(x*diff(y(x),x,x) +2*diff(y(x),x))/x^2/y(x)^2+2/x*diff(y(x),x)^2/y(x)^3 = 0;
 ${{\mathrm{ode}}}_{{1}}{≔}\frac{{x}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{{x}}^{{2}}}{-}\frac{{x}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{{x}}^{{2}}{}{{y}{}\left({x}\right)}^{{2}}}{+}\frac{{2}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{2}}}{{x}{}{{y}{}\left({x}\right)}^{{3}}}{=}{0}$ (8)
 $\left[{\mathrm{_Liouville}}{,}\left[{\mathrm{_2nd_order}}{,}{\mathrm{_with_linear_symmetries}}\right]{,}\left[{\mathrm{_2nd_order}}{,}{\mathrm{_reducible}}{,}{\mathrm{_mu_x_y1}}\right]{,}\left[{\mathrm{_2nd_order}}{,}{\mathrm{_reducible}}{,}{\mathrm{_mu_xy}}\right]\right]$ (9)
 > sol := dsolve(ode[1]);
 ${\mathrm{sol}}{≔}{y}{}\left({x}\right){=}\frac{{\mathrm{_C2}}{}{x}{-}{\mathrm{_C1}}{+}\sqrt{{{\mathrm{_C2}}}^{{2}}{}{{x}}^{{2}}{-}{2}{}{\mathrm{_C1}}{}{\mathrm{_C2}}{}{x}{+}{{\mathrm{_C1}}}^{{2}}{-}{4}{}{{x}}^{{2}}}}{{2}{}{x}}{,}{y}{}\left({x}\right){=}{-}\frac{{-}{\mathrm{_C2}}{}{x}{+}\sqrt{{{\mathrm{_C2}}}^{{2}}{}{{x}}^{{2}}{-}{2}{}{\mathrm{_C1}}{}{\mathrm{_C2}}{}{x}{+}{{\mathrm{_C1}}}^{{2}}{-}{4}{}{{x}}^{{2}}}{+}{\mathrm{_C1}}}{{2}{}{x}}$ (10)

Explicit or implicit results can be tested, in principle, using odetest. When testing multiple solutions, you can use map, as follows:

 > map(odetest,[sol],ode[1]);
 $\left[{0}{,}{0}\right]$ (11)

A third order ODE

 > ode[2] := 1/x*diff(y(x),x,x,x)/diff(y(x),x,x)=1/x^2*(diff(y(x),x)*x+y(x))/y(x);
 ${{\mathrm{ode}}}_{{2}}{≔}\frac{\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{x}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{=}\frac{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}{x}{+}{y}{}\left({x}\right)}{{{x}}^{{2}}{}{y}{}\left({x}\right)}$ (12)
 $\left[\left[{\mathrm{_3rd_order}}{,}{\mathrm{_with_linear_symmetries}}\right]{,}\left[{\mathrm{_3rd_order}}{,}{\mathrm{_reducible}}{,}{\mathrm{_mu_y2}}\right]{,}\left[{\mathrm{_3rd_order}}{,}{\mathrm{_reducible}}{,}{\mathrm{_mu_poly_yn}}\right]\right]$ (13)
 ${\mathrm{sol}}{≔}{y}{}\left({x}\right){=}{\mathrm{_C2}}{}{\mathrm{AiryAi}}{}\left({-}{\mathrm{_C1}}{}{x}\right){+}{\mathrm{_C3}}{}{\mathrm{AiryBi}}{}\left({-}{\mathrm{_C1}}{}{x}\right)$ (14)