firtest - Maple 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

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$
 > $\mathrm{ODE}≔\mathrm{diff}\left(y\left(x\right),x\right)=y\left(x\right)a\left(x\right)$
 ${\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

 > $\mathrm{Μ}≔\mathrm{intfactor}\left(\mathrm{ODE}\right)$
 ${\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

 > $\mathrm{ans}≔\mathrm{firint}\left(\mathrm{Μ}\mathrm{ODE}\right)$
 ${\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

 > $\mathrm{firtest}\left(\mathrm{ans},\mathrm{ODE}\right)$
 ${0}$ (4)

A second order ODE example

 > $\mathrm{ODE}≔\mathrm{diff}\left(y\left(x\right),x,x\right)=-\frac{2\left(2\mathrm{diff}\left(y\left(x\right),x\right)+5x{y\left(x\right)}^{2}+2{x}^{2}y\left(x\right)\mathrm{diff}\left(y\left(x\right),x\right)\right)}{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)
 > $\mathrm{first_int}≔2{x}^{5}{y\left(x\right)}^{2}+{x}^{4}\mathrm{diff}\left(y\left(x\right),x\right)+\mathrm{_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)
 > $\mathrm{firtest}\left(\mathrm{first_int},\mathrm{ODE}\right)$
 ${0}$ (7)