 DEtools - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : Classifying ODEs : DEtools/buildsol

DEtools

 buildsol
 build a solution to an ODE using a reduction of order returned by dsolve and a solution to the reduced ODE

 Calling Sequence buildsol(ODESolStructure, sol_reduced_ODE)

Parameters

 ODESolStructure - answer returned by dsolve expressed in terms of ODESolStruc sol_reduced_ODE - solution to the reduced ODE found inside ODESolStruc

Description

 • For high order ODEs it may happen that dsolve succeeds in reducing the order of the ODE but not in solving the problem to the end. In those cases, the solution is expressed using ODESolStruc. You can obtain a solution for the reduced ODE by using the tools available in DEtools, as a series expansion, or by other means. If a solution to the reduced ODE is obtained, you can build a solution to the original problem using the buildsol command.
 • The buildsol command is a function of two arguments. The first argument is the structure returned by dsolve as the solution to an ODE (see ODESolStruc). The second argument is a solution found by the user to the reduced ODE present inside the first argument. That solution may be a particular one; buildsol will not check whether the given solution actually solves the reduced ODE.
 • This function is part of the DEtools package, and so it can be used in the form buildsol(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[buildsol](..).

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$

A third order nonlinear ODE

 > $\mathrm{ODE}≔\mathrm{diff}\left(y\left(x\right),x,x,x\right)=\mathrm{diff}\left(y\left(x\right),x,x\right)\left(-1+\mathrm{diff}\left(y\left(x\right),x\right)\right)\mathrm{exp}\left(y\left(x\right)-x\right)$
 ${\mathrm{ODE}}{≔}\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}\left({-}{1}{+}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}{{ⅇ}}^{{y}{}\left({x}\right){-}{x}}$ (1)

This ODE is reducible:

 > $\mathrm{odeadvisor}\left(\mathrm{ODE}\right)$
 $\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]$ (2)

It can be solved by dsolve directly by determining an appropriate integrating factor (see odeadvisor,reducible), but let's consider a possible answer for it as a reduction of order from 3 to 1:

 > $\mathrm{sol}≔y\left(x\right)=\mathrm{ODESolStruc}\left(\mathrm{_c}+\mathrm{Int}\left(\mathrm{exp}\left(\mathrm{Int}\left(\mathrm{_f1}\left(\mathrm{_c}\right),\mathrm{_c}\right)+\mathrm{_C1}\right),\mathrm{_c}\right)+\mathrm{_C2},\left[\left\{\mathrm{diff}\left(\mathrm{_f1}\left(\mathrm{_c}\right),\mathrm{_c}\right)=2{\mathrm{_f1}\left(\mathrm{_c}\right)}^{2}+\mathrm{_f1}\left(\mathrm{_c}\right)\mathrm{exp}\left(\mathrm{_c}\right)\right\},\left\{\mathrm{_c}=y\left(x\right)-x,\mathrm{_f1}\left(\mathrm{_c}\right)=-\frac{\mathrm{diff}\left(\mathrm{diff}\left(y\left(x\right),x\right),x\right)}{{\left(-1+\mathrm{diff}\left(y\left(x\right),x\right)\right)}^{2}}\right\},\left\{x=\mathrm{Int}\left(\mathrm{exp}\left(\mathrm{Int}\left(\mathrm{_f1}\left(\mathrm{_c}\right),\mathrm{_c}\right)+\mathrm{_C1}\right),\mathrm{_c}\right)+\mathrm{_C2},y\left(x\right)=\mathrm{_c}+\mathrm{Int}\left(\mathrm{exp}\left(\mathrm{Int}\left(\mathrm{_f1}\left(\mathrm{_c}\right),\mathrm{_c}\right)+\mathrm{_C1}\right),\mathrm{_c}\right)+\mathrm{_C2}\right\}\right]\right)$
 ${\mathrm{sol}}{≔}{y}{}\left({x}\right){=}\left({\mathrm{_c}}{+}{\int }{{ⅇ}}^{{\int }{\mathrm{_f1}}{}\left({\mathrm{_c}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_c}}{+}{\mathrm{_C1}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_c}}{+}{\mathrm{_C2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left[\left\{\frac{{ⅆ}}{{ⅆ}{\mathrm{_c}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){=}{2}{}{{\mathrm{_f1}}{}\left({\mathrm{_c}}\right)}^{{2}}{+}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){}{{ⅇ}}^{{\mathrm{_c}}}\right\}{,}\left\{{\mathrm{_c}}{=}{y}{}\left({x}\right){-}{x}{,}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){=}{-}\frac{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{\left({-}{1}{+}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{2}}}\right\}{,}\left\{{x}{=}{\int }{{ⅇ}}^{{\int }{\mathrm{_f1}}{}\left({\mathrm{_c}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_c}}{+}{\mathrm{_C1}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_c}}{+}{\mathrm{_C2}}{,}{y}{}\left({x}\right){=}{\mathrm{_c}}{+}{\int }{{ⅇ}}^{{\int }{\mathrm{_f1}}{}\left({\mathrm{_c}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_c}}{+}{\mathrm{_C1}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_c}}{+}{\mathrm{_C2}}\right\}\right]$ (3)

Test that the above solves the ODE by using odetest:

 > $\mathrm{odetest}\left(\mathrm{sol},\mathrm{ODE}\right)$
 ${0}$ (4)

Now, the reduced ODE is of Bernoulli type, and can be selected using the mouse or through the following commands:

 > $\mathrm{reduced_ODE}≔\mathrm{op}\left(\left[2,2,1,1\right],\mathrm{sol}\right)$
 ${\mathrm{reduced_ODE}}{≔}\frac{{ⅆ}}{{ⅆ}{\mathrm{_c}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){=}{2}{}{{\mathrm{_f1}}{}\left({\mathrm{_c}}\right)}^{{2}}{+}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){}{{ⅇ}}^{{\mathrm{_c}}}$ (5)
 > $\mathrm{odeadvisor}\left(\mathrm{reduced_ODE}\right)$
 $\left[{\mathrm{_Bernoulli}}\right]$ (6)

From the above, it is clear that a particular solution to the reduced_ODE is given by

 > $\mathrm{sol_red_1}≔\mathrm{_f1}\left(\mathrm{_c}\right)=0$
 ${\mathrm{sol_red_1}}{≔}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){=}{0}$ (7)

from which a particular solution to the original ODE above can be built using

 > $\mathrm{particular_sol}≔\mathrm{buildsol}\left(\mathrm{sol},\mathrm{sol_red_1}\right)$
 ${\mathrm{particular_sol}}{≔}{y}{}\left({x}\right){=}{-}\frac{{-}{{ⅇ}}^{{\mathrm{_C1}}}{}{x}{+}{\mathrm{_C2}}{-}{x}}{{{ⅇ}}^{{\mathrm{_C1}}}}$ (8)
 > $\mathrm{odetest}\left(\mathrm{particular_sol},\mathrm{ODE}\right)$
 ${0}$ (9)

In this "blackboard" example, dsolve succeeds in solving the reduced_ODE too, as follows:

 > $\mathrm{sol_red_2}≔\mathrm{dsolve}\left(\mathrm{reduced_ODE}\right)$
 ${\mathrm{sol_red_2}}{≔}{\mathrm{_f1}}{}\left({\mathrm{_c}}\right){=}\frac{{{ⅇ}}^{{{ⅇ}}^{{\mathrm{_c}}}}}{{2}{}{{\mathrm{Ei}}}_{{1}}{}\left({-}{{ⅇ}}^{{\mathrm{_c}}}\right){+}{\mathrm{_C1}}}$ (10)

Passing this solution to buildsol, the general solution to ODE follows:

 > $\mathrm{general_sol}≔\mathrm{buildsol}\left(\mathrm{sol},\mathrm{sol_red_2}\right)$
 ${\mathrm{general_sol}}{≔}{y}{}\left({x}\right){=}{x}{+}{\mathrm{RootOf}}{}\left({-}{x}{+}\sqrt{{2}}{}\left({{\int }}_{{}}^{{\mathrm{_Z}}}\frac{{{ⅇ}}^{{\mathrm{_C1}}}}{\sqrt{{2}{}{{\mathrm{Ei}}}_{{1}}{}\left({-}{{ⅇ}}^{{\mathrm{_b}}}\right){+}{\mathrm{_C3}}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_b}}\right){+}{\mathrm{_C2}}\right)$ (11)
 > $\mathrm{odetest}\left(\mathrm{general_sol},\mathrm{ODE}\right)$
 ${0}$ (12)