DEtools
firtest
test a given first integral
Calling Sequence
Parameters
Description
Examples
firtest(first_int, ODE, y(x))
first_int
-
first integral
ODE
ordinary differential equation
y(x)
(optional) indeterminate function of the ODE
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](..).
A first order ODE
with⁡DEtools:
ODE≔diff⁡y⁡x,x=y⁡x⁢a⁡x
ODE≔ⅆⅆxy⁡x=y⁡x⁢a⁡x
An integrating factor for ODE above
Μ≔intfactor⁡ODE
Μ≔ⅇ∫−a⁡xⅆx
A related (to Mu) first integral for ODE above
ans≔firint⁡Μ⁢ODE
ans≔ⅇ∫−a⁡xⅆx⁢y⁡x+_C1=0
Testing the first integral
firtest⁡ans,ODE
0
A second order ODE example
ODE≔diff⁡y⁡x,x,x=−2⁢2⁢diff⁡y⁡x,x+5⁢x⁢y⁡x2+2⁢x2⁢y⁡x⁢diff⁡y⁡x,xx
ODE≔ⅆ2ⅆx2y⁡x=−2⁢2⁢ⅆⅆxy⁡x+5⁢x⁢y⁡x2+2⁢x2⁢y⁡x⁢ⅆⅆxy⁡xx
first_int≔2⁢x5⁢y⁡x2+x4⁢diff⁡y⁡x,x+_C1=0
first_int≔2⁢x5⁢y⁡x2+x4⁢ⅆⅆxy⁡x+_C1=0
firtest⁡first_int,ODE
See Also
dsolve
firint
intfactor
PDEtools
redode
Download Help Document