DEtools
muchange
change variables in the integrating factor of an ODE
Calling Sequence
Parameters
Description
Examples
muchange(tr, Mu, y(x), [t, u(t)])
tr
-
set of transformation equations of the form {x=.., y(x)=..} from the old variables on the left hand side to the new variables on the right hand side
Mu
integrating factor of an ordinary differential equation (ODE)
y(x)
'dependent variable' of the problem (it can be any unknown function of one variable)
[t, u(t)]
(optional) new independent and dependent variables; required when they cannot be inferred from the transformation
The muchange command receives a change of variables, an integrating factor of an ODE, and the dependent variable y(x), and it returns the integrating factor of the problem in the new variables. The change of variables is performed by making calls to dchange, and hence the same extra arguments accepted by dchange are accepted by muchange as well.
The change of variables performed by muchange is complementary to the (same) change of variables performed in the ODE in that, if μ⁡x,y⁡x is an integrating factor of an ODE in y(x), then their product is a total derivative,
mu*ODE = Diff(R1(x,y(x)),x);
μ⁢ODE=ⅆⅆxR1⁡x,y⁡x
and then, under a change of variables
tr := {x=X(t,u(t)), y(x)=Y(t,u(t))};
tr≔x=X⁡t,u⁡t,y⁡x=Y⁡t,u⁡t
where the new variables are {t, u(t)}, the following ODE is also exact:
'muchange(tr, mu, y(x)) * dchange(tr, ODE)' = Diff(R2(t,u(t)),t);
muchange⁡tr,μ,y⁡x⁢dchange⁡tr,ODE=ⅆⅆtR2⁡t,u⁡t
(note however that R1≠dchange⁡tr,R2).
This function is part of the DEtools package, and so it can be used in the form muchange(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[muchange](..).
with⁡DEtools:
with⁡PDEtools,dchange:
1. The following nonlinear second order ODE
ODE1≔diff⁡y⁡x,x,x+x⁢diff⁡y⁡x,x2+y⁡x⁢diff⁡y⁡x,x+1+diff⁡y⁡x,xy⁡x⁢x=0
ODE1≔ⅆ2ⅆx2y⁡x+x⁢ⅆⅆxy⁡x2+y⁡x⁢ⅆⅆxy⁡x+1+ⅆⅆxy⁡xy⁡x⁢x=0
has the following integrating factor.
Μ1≔intfactor⁡ODE1
Μ1≔x⁢y⁡x
This integrating factor can be tested using mutest:
mutest⁡Μ1,ODE1
0
We now change variables
tr≔x=1u⁡t,y⁡x=1t
so that the ODE becomes the following.
ODE2≔dchange⁡tr,ODE1,normal
ODE2≔u⁡t⁢t4⁢ⅆⅆtu⁡t3+u⁡t2⁢ⅆⅆtu⁡t2⁢t2+ⅆ2ⅆt2u⁡t⁢u⁡t3⁢t−u⁡t2⁢ⅆⅆtu⁡t2⁢t+3⁢u⁡t3⁢ⅆⅆtu⁡tt3⁢ⅆⅆtu⁡t3=0
The integrating factor for this transformed ODE can be obtained from the integrating factor of ODE1 as follows:
Μ2≔muchange⁡tr,Μ1,y⁡x
Μ2≔−ⅆⅆtu⁡tu⁡t3⁢t
mutest⁡Μ2,ODE2
2. muchange works as follows. Consider for instance a first order ODE turned exact by means of an integrating factor
exact_ODE≔μ⁡x,y⁡x⁢ODE⁡x,y⁡x,diff⁡y⁡x,x=diff⁡R⁡x,x
exact_ODE≔μ⁡x,y⁡x⁢ODE⁡x,y⁡x,ⅆⅆxy⁡x=ⅆⅆxR⁡x
and now consider the most general point transformation of variables:
Perform a change of variables in the exact_ODE as a whole:
dchange⁡tr,exact_ODE,t,u⁡t,known=ODE,μ
μ⁡X⁡t,u⁡t,Y⁡t,u⁡t⁢ODE⁡X⁡t,u⁡t,Y⁡t,u⁡t,D1⁡Y⁡t,u⁡t+D2⁡Y⁡t,u⁡t⁢ⅆⅆtu⁡tD1⁡X⁡t,u⁡t+D2⁡X⁡t,u⁡t⁢ⅆⅆtu⁡t=D1⁡R⁡t,u⁡t+D2⁡R⁡t,u⁡t⁢ⅆⅆtu⁡tD1⁡X⁡t,u⁡t+D2⁡X⁡t,u⁡t⁢ⅆⅆtu⁡t
The left hand side in the above equation will also be an exact ODE if we multiply it by the denominator of the right hand side:
Diff⁡X⁡t,u⁡t,t
ⅆⅆtX⁡t,u⁡t
The new integrating factor for the transformed ODE is, generally speaking, given by
μ2⁡t,u⁡t=Diff⁡X⁡t,u⁡t,t⁢dchange⁡tr,μ⁡x,y
μ2⁡t,u⁡t=ⅆⅆtX⁡t,u⁡t⁢dchange⁡tr,μ⁡x,y
It is easy to see that this result is valid irrespective of the differential order of the ODE under consideration.
3. Consider the most general second order ODE having an integrating factor depending on (x, y'); this ODE is given by (see redode)
Μ1≔μ⁡x,diff⁡y⁡x,x
Μ1≔μ⁡x,ⅆⅆxy⁡x
ODE1≔redode⁡Μ1,y⁡x,2
ODE1≔ⅆ2ⅆx2y⁡x=−∫` `ⅆⅆxy⁡x∂∂xμ⁡x,_aⅆ_a+D1⁡_F1⁡x,y⁡x+D2⁡_F1⁡x,y⁡x⁢ⅆⅆxy⁡xμ⁡x,ⅆⅆxy⁡x
What will be the integrating factor if we interchange the roles of the dependent and independent variables? The related transformation is given by
tr≔x=u⁡t,y⁡x=t
The new integrating factor is
Μ2≔muchange⁡tr,Μ1,y⁡x,t,u⁡t
Μ2≔ⅆⅆtu⁡t⁢μ⁡u⁡t,1ⅆⅆtu⁡t
Transform the ODE and test the new integrating factor:
ODE2≔dchange⁡tr,ODE1,t,u⁡t,known=all,normal
ODE2≔−ⅆ2ⅆt2u⁡tⅆⅆtu⁡t3=−∫` `1ⅆⅆtu⁡tD1⁡μ⁡u⁡t,_aⅆ_a⁢ⅆⅆtu⁡t+D1⁡_F1⁡u⁡t,t⁢ⅆⅆtu⁡t+D2⁡_F1⁡u⁡t,tⅆⅆtu⁡t⁢μ⁡u⁡t,1ⅆⅆtu⁡t
(Note that, when testing an integrating factor, mutest tests it against lhs⁡ODE2−rhs⁡ODE2=0.)
See Also
DEtools[Lie]
DEtools[mutest]
dsolve/Lie
PDEtools[dchange]
Download Help Document