DEtools
intfactor
look for integrating factors for a given ODE
Calling Sequence
Parameters
Description
Examples
intfactor(ODE, y(x), _mu = int_factor_form, try_hard=true)
ODE
-
ordinary differential equation (any order)
y(x)
(optional) dependent variable; required when the ODE contains more than one function being differentiated
try_hard = true
(optional) to search for integrating factors depending on n-1 variables, where n is the ODE order
_mu = int_factor_form
(optional) to search for integrating factors having the indicated form
For a given nth order ODE
ODE≔N⁡x,y,y⁢' ,...,yn−1⁢yn+M⁡x,y,y⁢' ,...,yn−1=0
intfactor looks for integrating factors -- say mu -- such that mu*ODE is an exact ODE, that is, a total derivative with respect to x, of some function R of x, y, and its derivatives up to order n−1. As a rule, intfactor first isolates the highest derivative, and then looks for the mus. When successful, intfactor returns mu or a sequence of them; otherwise it returns NULL. To see the PDE satisfied by mu in the general case, use odepde and gensys.
The knowledge of an integrating factor -- say mu -- is sufficient to reduce the order of a given ODE by one; in the case of first order ODEs this reduction of order leads directly to their solution. The reduced ODEs obtained from the knowledge of mu are also called first integrals and can be computed by using the firint command (see examples below).
By default intfactor looks for "as many" integrating factors as the differential order of the given ODE, and it returns an answer as soon as these integrating factors are found, or when all its schemes have already been tried.
In the case of first order ODEs, an integrating factor depending on only the dependent or the independent variable -- say x and y -- is calculated as explained in standard textbooks. Integrating factors depending on both x and y are built by first determining pairs of infinitesimals of underlying Lie groups (see symgen) and using this information to build the mus.
In the case of second order ODEs, after isolating y'', intfactor is able to find integrating factors of the form μ⁡x,y'⁢, μ⁡y,y'⁢, and μ⁡x,y, when they exist. In the μ⁡x,y case, it is sometimes necessary to solve an auxiliary second order linear ODE and the success of the command relies on the ability of dsolve in solving that ODE.
In the case of third and higher nth order ODEs, intfactor searches for integrating factors depending on any two of {x,y,y',y'',...y⁡n−1}, by formulating and tackling a linear PDE system for mu (see gensys). When integrating factors with such a dependence exist, the success of intfactor in computing them depends on the success of the dsolve and pdsolve commands in solving the differential equations of that PDE system.
Given an nth order ODE and calling intfactor with the optional argument try_hard = true, the routines search for mu depending on any n-1 of {x,y,y',y'',...y⁡n−1} by tackling the related linear PDE system for mu as explained in the previous paragraph. Although this "hard" approach widens the chances of success significantly, the number of different mu problems being tackled is equal to the differential order and each of them involves more than two variables, so this approach could be much slower than the default one, especially for ODEs of order 4 or higher.
Apart from the computable integrating factor types described, in the case of second and higher order ODEs, for some particular ODE families, intfactor is able to compute mus depending on all the variables, that is, of the form mu⁡x,y,y',...y⁡n−1, provided that mu is polynomial in the y⁡n−1 derivative. In the particular case of third order ODEs intfactor can in addition compute - when they exist - integrating factors of the form muy''⁢ without restrictions to the functional form of mu.
It is also possible to request to intfactor the search of integrating factors of some predefined form by using the option '_mu = int_factor_form'. In this approach, int_factor_form, could be either an algebraic expression or a list of them, containing unknowns in the form of functions of x,y,y',... and / or any symbols whose values are to be determined. When int_factor_form contains no unknowns, only a direct test of it using mutest is performed to validate or discard the suggestion. When the indicated form contains unknowns, intfactor sets up a related algebraic/ODE/PDE system of equations for these unknowns and attempt to solve it using Maple's solve, dsolve and pdsolve commands. This option is particularly useful when the intfactor algorithms fail in finding any integrating factor, but you have some idea of the functional form of such factors (see example at the end of this page).
When, for a given high order ODE, many integrating factors are returned, the sequence of mus can be used to reduce the given ODE by many orders at once. Note however that sometimes not all of the integrating factors lead to "different" reductions of order. The reason is that if mu leads to a reduced ODE -- say R1 -- then f⁡R1⁢μ, where f is an arbitrary function, is also an integrating factor and leads to the same reduced ODE. Hence, different subroutines may find different integrating factors which are actually leading to just one reduction of order. To determine if two integrating factors lead to different reductions of order, you can first calculate the related first integrals using firint - see examples.
From a given ODE and an integrating factor for it, you can compute the integrating factor of another ODE, obtained from the first one by performing any arbitrary change of variables. To compute this integrating factor for the changed ODE, use muchange. To test whether an expression is an integrating factor for a given ODE, use the mutest command.
The intfactor command is in some sense complementary to the redode command in that the output of one of them is the input for the other one and vice versa.
This function is part of the DEtools package, and so it can be used in the form intfactor(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[intfactor](..).
with⁡DEtools:
PDEtoolsdeclare⁡y⁡x,prime=x
y⁡x⁢will now be displayed as⁢y
derivatives with respect to⁢x⁢of functions of one variable will now be displayed with '
Here is an ODE depending on an arbitrary function F.
ODE≔diff⁡y⁡x,x=2⁢ax2⁢−y⁡x+2⁢F⁡x⁢y⁡x2−4⁢ax⁢a
ODE≔y'=2⁢ax2⁢−y+2⁢F⁡x⁢y2−4⁢ax⁢a
A pair of symmetry infinitesimals for this ODE is given by (see symgen):
infinitesimals≔symgen⁡ODE
infinitesimals≔_ξ=x2⁢y,_η=−2⁢a
From these infinitesimals, a related integrating factor for ODE is given by:
μ≔intfactor⁡ODE
μ≔−2⁢F⁡x⁢y2−4⁢ax⁢a+yF⁡x⁢y2−4⁢ax
Note that when the ODE is given as an equation A=B, it is converted to the form A−B=0 before calculating mu.
Let's see the change on the ODE type produced by mu.
odeadvisor⁡ODE
_1st_order,_with_symmetry_[F(x),G(y)]
odeadvisor⁡μ⁢ODE
_exact,_1st_order,_with_symmetry_[F(x),G(y)]
Here is a second order example with two integrating factors. Its solution is obtained using them to reduce the ODE order by two at once.
ODE2≔diff⁡y⁡x,x,x−12⁢y⁡x⁢4+y⁡x⁢xx2−y⁡x⁢diff⁡y⁡x,x−12⁢x⁢diff⁡y⁡x,x2
ODE2≔y''−y⁢4+y⁢x2⁢x2−y⁢y'−y'2⁢x2
μ≔intfactor⁡ODE2
μ≔x2⁢ⅇ−y⁢x2,ⅇ−y⁢x2x
odeadvisor⁡μ1⁢ODE2
_2nd_order,_exact,_nonlinear,_2nd_order,_with_linear_symmetries,_2nd_order,_reducible,_mu_xy
firint⁡μ1⁢ODE2
ⅇ−y⁢x2⁢6+y⁢x+x2⁢ⅇ−y⁢x2⁢y'+_C1=0
firint⁡μ2⁢ODE2
ⅇ−y⁢x2⁢yx2+ⅇ−y⁢x2⁢y'x+_C1=0
Eliminating y' from these two first integrals and renaming _C1→_C2 in one of them we obtain the ODE solution; this process is performed internally by dsolve to arrive at:
dsolve⁡ODE2
y=−2⁢ln⁡c__2⁢x36−c__16x
A third order ODE example and two integrating factors for it:
ODE3≔diff⁡y⁡x,x,x,x=diff⁡y⁡x,x⁢x+y⁡x⁢diff⁡y⁡x,x,xy⁡x⁢x
ODE3≔y'''=y'⁢x+y⁢y''y⁢x
μ≔intfactor⁡ODE3
μ≔1y⁢x,1y''
odeadvisor⁡1y⁡x⁢x⁢ODE3
_3rd_order,_exact,_nonlinear,_3rd_order,_with_linear_symmetries,_3rd_order,_reducible,_mu_y2,_3rd_order,_reducible,_mu_poly_yn
For ODE3 above, using its defaults intfactor found two integrating factors. If however we use the try_hard=true option, an integrating factor depending on an arbitrary function _F1y''x y is obtained.
intfactor⁡ODE3,try_hard
1y'',f__1⁡y''y⁢xy⁢x
Integrating factors can be tested using mutest, which returns zero when the integrating factor is correct, meaning that it cancels the appropriate integrating factor PDE system (see odepde).
map⁡DEtoolsmutest,,ODE3
0,0
A fourth order ODE example and an integrating factor polynomial in the highest possible derivative y''' (for an ODE of order n, mu can depend at most on the nth-1 derivative).
ODE4≔diff⁡y⁡x,x,x,x,x=12⁢−x2⁢diff⁡y⁡x,x,x⁢diff⁡y⁡x,x,x,x2⁢ln⁡x2−diff⁡y⁡x,x⁢diff⁡y⁡x,x,x,x2⁢ln⁡x2⁢x⁢y⁡x3−x2⁢diff⁡y⁡x,x2⁢diff⁡y⁡x,x,x,x2⁢ln⁡x2⁢y⁡x2+2⁢y⁡x+2⁢diff⁡y⁡x,x⁢ln⁡x⁢xln⁡x2⁢y⁡x3⁢x2⁢diff⁡y⁡x,x⁢diff⁡y⁡x,x,x,x
ODE4≔y''''=−x2⁢y''⁢y'''2⁢ln⁡x2−y'⁢y'''2⁢ln⁡x2⁢x⁢y3−x2⁢y'2⁢y'''2⁢ln⁡x2⁢y2+2⁢y+2⁢y'⁢ln⁡x⁢x2⁢ln⁡x2⁢y3⁢x2⁢y'⁢y'''
μ≔intfactor⁡ODE4
μ≔y'⁢y'''⁢x⁢y
A second order ODE with three integrating factors:
ode≔diff⁡diff⁡y⁡x,x,x=−1x⁢diff⁡y⁡x,x⁢2⁢y⁡x+x⁢diff⁡y⁡x,xy⁡x
ode≔y''=−y'⁢2⁢y+y'⁢xx⁢y
μ≔intfactor⁡ode
μ≔y⁢x,x2⁢y,1y'
Of the three integrating factors found, only two of them lead to different reductions of order. The reduction obtained using μ1 is as follows.
R1≔firint⁡μ1⁢ode,y⁡x
R1≔y22+y'⁢x⁢y+c__1=0
explicit_R1≔diff⁡y⁡x,x=solve⁡R1,diff⁡y⁡x,x
explicit_R1≔y'=−y2+2⁢c__12⁢y⁢x
The reduction obtained using μ2:
R2≔firint⁡μ2⁢ode,y⁡x
R2≔y⁢y'⁢x2+c__1=0
explicit_R2≔diff⁡y⁡x,x=solve⁡R2,diff⁡y⁡x,x
explicit_R2≔y'=−c__1x2⁢y
The reduction obtained using μ3:
R3≔firint⁡μ3⁢ode,y⁡x
R3≔ln⁡y'+ln⁡y+2⁢ln⁡x+c__1=0
explicit_R3≔diff⁡y⁡x,x=solve⁡R3,diff⁡y⁡x,x
explicit_R3≔y'=1ⅇc__1⁢y⁢x2
When the algorithms implemented in intfactor fail in computing integrating factors - or to investigate the existence of more or different type of integrating factors - we can give a hint to intfactor by using the option _mu = some_mu_form, where some_mu_form contains some unknowns - functions of the ODE variables or just symbols - whose values are to be determined. For example, for the following ODE we use intfactor to compute - if possible - integrating factors of the form x⁢f⁡y,y' for some function f⁡y,y'⁢ to be determined.
ode≔diff⁡y⁡x,x,x=y⁡x+x⁢diff⁡y⁡x,x+2⁢x⁢y⁡x⁢diff⁡y⁡x,x+x2⁢diff⁡y⁡x,x2⁢diff⁡y⁡x,xy⁡x⁢x
ode≔y''=y+y'⁢x+2⁢y'⁢x⁢y+x2⁢y'2⁢y'x⁢y
intfactor⁡ode,_μ=x⁢f⁡y,_y1
x⁢yy'2,x⁢y⁢Ei1⁡−2⁢yy'2
map⁡DEtoolsmutest,,ode
In this example, we indicate a form for the integrating factor which depends on 4 symbolic constants k1 to k4 to be determined.
ode≔diff⁡y⁡x,`$`⁡x,4=−2⁢diff⁡y⁡x,x2⁢diff⁡y⁡x,`$`⁡x,3+diff⁡y⁡x,x3⁢diff⁡y⁡x,`$`⁡x,3+diff⁡y⁡x,`$`⁡x,3⁢diff⁡y⁡x,x,x⁢diff⁡y⁡x,x2+y⁡x⁢diff⁡y⁡x,x+diff⁡y⁡x,x2⁢x−diff⁡y⁡x,x,x⁢y⁡x⁢xdiff⁡y⁡x,x2⁢x+y⁡x+diff⁡y⁡x,x
ode≔y''''=−2⁢y'2⁢y'''+y'3⁢y'''+y'''⁢y''⁢y'2+y⁢y'+y'2⁢x−y⁢x⁢y''y'2⁢x+y+y'
hint≔_μ=k1⁢x+k2⁢y+k3⁢_y1+k4⁢_y2+k5⁢_y3
hint≔_μ=k3⁢_y1+k4⁢_y2+k5⁢_y3+k1⁢x+k2⁢y
intfactor⁡ode,hint
x+y+y'
See Also
DEtools[equinv]
DEtools[firint]
DEtools[gensys]
DEtools[mutest]
DEtools[odeadvisor]
DEtools[odepde]
DEtools[redode]
DEtools[symgen]
DEtools[symtest]
dsolve
odetest
PDEtools
PDEtools[dchange]
Download Help Document