DEtools
redode
return the nth order ODE having a given integrating factor
Calling Sequence
Parameters
Description
Examples
redode(mu, n, y(x), R)
mu
-
integrating factor - one or a list of them - depending on x,y,...,_ym, m=n−1
n
order of the requested ODE
y(x)
dependent variable
R
(optional) expected reduced ODE depending on x,y,...,_yk
Given an integrating factor (x,y,..._yn), where _yn represents the nth order derivative, or a list of them, redode returns the ODE of order n having all the values of mu as integrating factors.
This command is useful to identify the general ODE problem related to a given mu, and to understand the possible links between the integrating factor scheme for reducing the order and other reduction schemes (for example, symmetries).
When the expected reduced ODE, here called R, is also given as argument, its differential order, say m, must satisfy m<n. The routine then proceeds as follows. First, it redefines R by differentiating it such that its differential order becomes n−1. Then it performs a test to see if the problem is solvable. The test for solvability is
mu(x,y,`...`,_ym) = nu(x,y,`...`,_y||(m-1))*diff(R(x,y,`...`,_ym),_ym);
μ⁡x,y,...,_ym=ν⁡x,y,...,_y‖m−1⁢∂∂_ymR⁡x,y,...,_ym
for some function nu⁡x,y,...,_ym. If the problem is solvable, redode then returns an nth order ODE satisfying
mu(x,y,`...`,diff(y(x),x$m)) * ODE=Diff(R(x,y(x),`...`,diff(y(x),x$m)),x);
μ⁡x,y,...,ⅆmⅆxmy⁡x⁢ODE=∂∂xR⁡x,y⁡x,...,ⅆmⅆxmy⁡x
Note that the reduced ODE being differentiated on the right-hand side is defined up to a constant. For example, R+_C1 also satisfies the above equation.
When the given mu does not depend on _ym and R is nonlinear in _ym, the requested nth order ODE exists if R can be solved for _ym; then nu can be determined as the ratio μ⁢d_ymdR.
This function is part of the DEtools package, and so it can be used in the form redode(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[redode](..).
The redode command is interesting mainly as a tool for generating solving schemes for given ODE families; we illustrate this with two examples.
with⁡DEtools:
1. Consider the second order ODE family having an integrating factor μ=F⁡x -- an arbitrary function -- such that the reduced ODE has the same integrating factor. We want to set up an algorithm such that, given a second order linear ODE,
ode_psi≔diff⁡y⁡x,x,x=ψ1⁡x⁢diff⁡y⁡x,x+ψ2⁡x⁢y⁡x+ψ3⁡x
ode_psi≔ⅆ2ⅆx2y⁡x=ψ1⁡x⁢ⅆⅆxy⁡x+ψ2⁡x⁢y⁡x+ψ3⁡x
where there are no restrictions on ψ1⁡x,ψ2⁡x, or ψ3⁡x, the scheme determines if the ODE belongs to the family just described, and if so it also determines F⁡x. The knowledge of F⁡x is enough to completely solve the given ODE.
To start with, we obtain the general first order ODE having F⁡x as integrating factor using:
ode_1≔redode⁡F⁡x,y⁡x
ode_1≔ⅆⅆxy⁡x=−ⅆⅆxF⁡x⁢y⁡x+_F1⁡xF⁡x
where _F1⁡x is an arbitrary function. To obtain the second order ODE mentioned above, we pass ode_1 as an argument (playing the role of the reduced ODE) with the integrating factor F⁡x to obtain:
ode_2≔redode⁡F⁡x,y⁡x,ode_1
ode_2≔ⅆ2ⅆx2y⁡x=−2⁢ⅆⅆxF⁡x⁢ⅆⅆxy⁡x+ⅆ2ⅆx2F⁡x⁢y⁡x+ⅆⅆx_F1⁡xF⁡x
Taking this general ODE pattern as our starting point, we set up the required solving scheme by comparing coefficients in ode_2 and ode_psi obtaining the following expressions.
e1≔−2F⁡x⁢diff⁡F⁡x,x=ψ1⁡x
e1≔−2⁢ⅆⅆxF⁡xF⁡x=ψ1⁡x
e2≔−1F⁡x⁢diff⁡F⁡x,x,x=ψ2⁡x
e2≔−ⅆ2ⅆx2F⁡xF⁡x=ψ2⁡x
By solving e1, we get F⁡x as:
ans_F≔dsolve⁡e1
ans_F≔F⁡x=c__1⁢ⅇ∫−ψ1⁡x2ⅆx
and by substituting this result into the second one we get the pattern identifying the ODE family.
ode_pattern≔expand⁡eval⁡e2,ans_F
ode_pattern≔ⅆⅆxψ1⁡x2−ψ1⁡x24=ψ2⁡x
2. Consider the second order ODE family having an integrating factor μ=F⁡x -- an arbitrary function -- and the symmetry ξ=0,η=F⁡x (see infgen), and such that the reduced ODE is the most general first order linear ODE:
ode_1≔diff⁡y⁡x,x=A⁡x⁢y⁡x+B⁡x
ode_1≔ⅆⅆxy⁡x=A⁡x⁢y⁡x+B⁡x
where A(x) and B(x) are arbitrary functions. To start with, we obtain the second order ODE mentioned above which has the integrating factor F⁡x as in example 1.
ode_2≔ⅆ2ⅆx2y⁡x=A⁡x⁢ⅆⅆxF⁡x⁢y⁡x+A⁡x⁢ⅆⅆxy⁡x⁢F⁡x+ⅆⅆxA⁡x⁢y⁡x⁢F⁡x+B⁡x⁢ⅆⅆxF⁡x+ⅆⅆxB⁡x⁢F⁡x−ⅆⅆxF⁡x⁢ⅆⅆxy⁡xF⁡x
In the previous step, ode_2 is in fact the most general second order linear ODE we can imagine. If we now impose the symmetry condition X⁡ode_2=0 (see odepde), where X=0,F⁡x, we arrive at the following restriction on A⁡x.
constraint≔expand⁡odepde⁡ode_2,y⁡x,0,F⁡x
constraint≔−2⁢A⁡x⁢ⅆⅆxF⁡x−ⅆⅆxA⁡x⁢F⁡x+ⅆⅆxF⁡x2F⁡x+ⅆ2ⅆx2F⁡x
We can solve this ODE for A⁡x.
ans_A≔dsolve⁡constraint,A⁡x
ans_A≔A⁡x=F⁡x⁢ⅆⅆxF⁡x+c__1F⁡x2
Introducing the result into ode_2 and disregarding the nonhomogeneous term (irrelevant in the solving scheme), we obtain the homogeneous ODE family pattern:
ode_2_H≔diff⁡y⁡x,x,x=collect⁡select⁡has,expand⁡rhs⁡ode_2,y,diff⁡y⁡x,x,y⁡x
ode_2_H≔ⅆ2ⅆx2y⁡x=A⁡x−ⅆⅆxF⁡xF⁡x⁢ⅆⅆxy⁡x+A⁡x⁢ⅆⅆxF⁡xF⁡x+ⅆⅆxA⁡x⁢y⁡x
ode_pattern≔subs⁡_C1=1,collect⁡expand⁡subs⁡ans_A,ode_2_H,y
ode_pattern≔ⅆ2ⅆx2y⁡x=−ⅆⅆxF⁡xF⁡x3+ⅆ2ⅆx2F⁡xF⁡x⁢y⁡x+ⅆⅆxy⁡xF⁡x2
where we have set the constant c__1 equal to 1 without loss of generality (μ=F⁡x is defined up to a constant factor). To set up a solving scheme here, check if the coefficient of dydx in a given ODE is related to the coefficient of y as in the equation above, in which case the integrating factor is just F⁡x.
3. Consider the following three integrating factors of some (unknown) third order ODE:
μ≔y⁡x⁢x,x−14+14⁢2912⁢y⁡x,x−14−14⁢2912⁢y⁡x
μ≔y⁡x⁢x,x−14+294⁢y⁡x,x−14−294⁢y⁡x
The most general third order ODE simultaneously admitting all these integrating factors depends on an arbitrary function of _F1⁡x and can be computed as follows.
redode⁡μ,3,y⁡x
ⅆ3ⅆx3y⁡x=13⁢y⁡x8⁢x3+5⁢ⅆ2ⅆx2y⁡x2⁢x−13⁢ⅆⅆxy⁡x4⁢x2+−3⁢ⅆⅆxy⁡x⁢ⅆ2ⅆx2y⁡x+5⁢ⅆⅆxy⁡x22⁢x+f__1⁡xy⁡x
map⁡DEtoolsmutest,μ,
0,0,0
The test performed above verifies - returning zero - that the given integrating factors (the list mu) indeed turn the returned ODE exact - see mutest.
The number of given integrating factors can be different than the differential order. For example, taking just the first two integrating factors of the previous example, the most general third order ODE turned exact by them actually depends - in addition - on an arbitrary function of two variables, _F3⁡x,y.
μ1..2
y⁡x⁢x,x−14+294⁢y⁡x
redode⁡,3,y⁡x
ⅆ3ⅆx3y⁡x=D2⁡f__3⁡x,y⁡x⁢ⅆⅆxy⁡x2+16⁢D1⁡f__3⁡x,y⁡x⁢x2+2⁢x⁢f__3⁡x,y⁡x⁢29−2⁢x⁢f__3⁡x,y⁡x−5⁢29+19⁢ⅆⅆxy⁡x8⁢x2+f__3⁡x,y⁡x⁢ⅆ2ⅆx2y⁡x+f__3⁡x,y⁡x⁢ⅆⅆxy⁡x2−3⁢ⅆⅆxy⁡x⁢ⅆ2ⅆx2y⁡x+∫` `y⁡x2⁢29⁢∂∂xf__3⁡x,_a⁢x2+8⁢∂2∂x2f__3⁡x,_a⁢x3−2⁢∂∂xf__3⁡x,_a⁢x2+5⁢29−19⁢_a8⁢x3ⅆ_a+f__4⁡xy⁡x
map⁡DEtoolsmutest,μ1..2,
0,0
See Also
DEtools[equinv]
DEtools[intfactor]
DEtools[odeadvisor]
DEtools[symgen]
DEtools[symtest]
dsolve
odetest
PDEtools
PDEtools[dchange]
Download Help Document