DEtools - Maple Programming Help

DEtools

 firtest
 test a given first integral

 Calling Sequence firtest(first_int, ODE, y(x))

Parameters

 first_int - first integral ODE - ordinary differential equation y(x) - (optional) indeterminate function of the ODE

Description

 • The firtest command checks whether a given expression is a first integral of a given ODE. Similar to odetest, firtest returns $0$ when the result is valid, or an algebraic expression obtained after simplifying the PDE for the first integral associated with the given ODE (see odepde). Among other things, firtest can be used to test the results obtained using the command firint.
 • If the result returned by firtest is not zero, the expression might nevertheless be a first integral. Sometimes, with further simplification, you can obtain the desired $0$ using commands such as expand, combine, and so on.
 • This function is part of the DEtools package, and so it can be used in the form firtest(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[firtest](..).

Examples

A first order ODE

 > with(DEtools):
 > ODE := diff(y(x),x)=y(x)*a(x);
 ${\mathrm{ODE}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{y}{}\left({x}\right){}{a}{}\left({x}\right)$ (1)

An integrating factor for ODE above

 > Mu := intfactor(ODE);
 ${\mathrm{Μ}}{≔}{{ⅇ}}^{{\int }{-}{a}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}$ (2)

A related (to Mu) first integral for ODE above

 > ans := firint(Mu*ODE);
 ${\mathrm{ans}}{≔}{{ⅇ}}^{{\int }{-}{a}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{}{y}{}\left({x}\right){+}{\mathrm{_C1}}{=}{0}$ (3)

Testing the first integral

 > firtest(ans,ODE);
 ${0}$ (4)

A second order ODE example

 > ODE := diff(y(x),x,x) = - 2*(2*diff(y(x),x)+5*x*y(x)^2+2*x^2*y(x)*diff(y(x),x))/x;
 ${\mathrm{ODE}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}\frac{{2}{}\left({2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{5}{}{x}{}{{y}{}\left({x}\right)}^{{2}}{+}{2}{}{{x}}^{{2}}{}{y}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)\right)}{{x}}$ (5)
 > first_int := 2*x^5*y(x)^2+x^4*diff(y(x),x)+_C1 = 0;
 ${\mathrm{first_int}}{≔}{2}{}{{x}}^{{5}}{}{{y}{}\left({x}\right)}^{{2}}{+}{{x}}^{{4}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{\mathrm{_C1}}{=}{0}$ (6)
 > firtest(first_int,ODE);
 ${0}$ (7)