Solving Linear ODEs Which Are Fully Exact
Description
Examples
A fully exact nth-order linear ODE is one which can be obtained by directly differentiating a first order linear ODE n-1 times; for example, a fourth order ODE of this type is of the form:
fully_exact_linear_4th_order_ODE := Diff( A(x)*diff(y(x),x) + B(x)*y(x) + C(x) = 0, x$3);
fully_exact_linear_4th_order_ODE≔ⅆ3ⅆx3A⁡x⁢ⅆⅆxy⁡x+B⁡x⁢y⁡x+C⁡x=0
Linear ODEs (LODEs) of this form can be recognized by the fact that the adjoint of their homogeneous part is always a first order ODE in disguised form (see "How it works" below). This type of LODE is systematically solved by dsolve.
with⁡DEtools,adjoint,firint,odeadvisor
adjoint,firint,odeadvisor
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 '
Consider the following 4th order ODE:
ODE4≔x2+exp⁡x⁢x⁢diff⁡y⁡x,x,x,x,x+4⁢exp⁡x+6⁢x+3⁢exp⁡x⁢x⁢diff⁡y⁡x,x,x,x+6+3⁢exp⁡x⁢x+9⁢exp⁡x⁢diff⁡y⁡x,x,x+exp⁡x⁢x+6⁢exp⁡x⁢diff⁡y⁡x,x+exp⁡x⁢y⁡x=0
ODE4≔x2+ⅇx⁢x⁢y''''+4⁢ⅇx+6⁢x+3⁢ⅇx⁢x⁢y'''+6+3⁢ⅇx⁢x+9⁢ⅇx⁢y''+ⅇx⁢x+6⁢ⅇx⁢y'+ⅇx⁢y=0
odeadvisor⁡ODE4,y⁡x
_high_order,_fully,_exact,_linear
Once we know ODE4 is fully exact we can reduce it to a first order linear ODE straightforwardly; this reduction can be performed interactively, for instance, using the firint command as follows:
ODE3≔firint⁡ODE4,y⁡x
ODE3≔ⅇx⁢y+ⅇx⁢x+4⁢ⅇx+2⁢y'+2⁢ⅇx⁢x+3⁢ⅇx+4⁢x⁢y''+x2+ⅇx⁢x⁢y'''+_C1=0
ODE2≔firint⁡ODE3,y⁡x
ODE2≔ⅇx⁢y+ⅇx⁢x+2⁢ⅇx+2⁢x⁢y'+x2+ⅇx⁢x⁢y''+_C1⁢x+_C2=0
ODE1≔firint⁡ODE2,y⁡x
ODE1≔ⅇx⁢y+x2+ⅇx⁢x⁢y'+_C1⁢x22+_C2⁢x+_C3=0
and the first order LODE above - ODE1 - can be solved using dsolve leading to the solution to ODE4
sol1≔dsolve⁡ODE1,y⁡x
sol1≔y=∫−ⅇ∫ⅇxx⁢ⅇx+xⅆx⁢_C1⁢x2+2⁢_C2⁢x+2⁢_C32⁢x⁢ⅇx+xⅆx+c__4⁢ⅇ∫−ⅇxx⁢ⅇx+xⅆx
odetest⁡sol1,ODE4
0
The solution above is essentially the same one obtains by calling dsolve directly:
dsolve⁡ODE4,y⁡x
y=c__4+∫3⁢c__5⁢x2+2⁢c__6⁢x+c__7⁢ⅇ∫ⅇxx2+ⅇx⁢xⅆxx2+ⅇx⁢xⅆx⁢ⅇ−∫ⅇxx2+ⅇx⁢xⅆx
How it works
To detect that ODE4 is fully exact, we first look at the equation's adjoint:
ADJ≔adjoint⁡ODE4,y⁡x
ADJ≔ⅇx⁢x+2⁢x⁢y'''+x2+ⅇx⁢x⁢y''''
This adjoint contains only third and fourth order derivatives, and hence can be seen as a first order ODE in y'''. This means that the original fourth order ODE4 can be obtained by differentiating 3 times a certain first order linear ODE1 (not the one obtained with firint lines above). In turn, this ODE1 can be obtained directly from the adjoint equation ADJ above by replacing y''' -> y and calculating the adjoint again:
subs⁡diff⁡y⁡x,`$`⁡x,3=y⁡x,ADJ
ⅇx⁢x+2⁢x⁢y+x2+ⅇx⁢x⁢y'
adjoint⁡,y⁡x
ⅇx⁢y+x2+ⅇx⁢x⁢y'
Actually, differentiating 3 times the equation above one reobtains the original fourth order ODE:
diff⁡,`$`⁡x,3=0
ⅇx⁢y+3⁢y'⁢ⅇx+3⁢y''⁢ⅇx+y'''⁢ⅇx+ⅇx⁢x+3⁢ⅇx⁢y'+3⁢2+ⅇx⁢x+2⁢ⅇx⁢y''+3⁢2⁢x+ⅇx⁢x+ⅇx⁢y'''+x2+ⅇx⁢x⁢y''''=0
normal⁡−ODE4
0=0
The method just explained works with ODEs of arbitrary order, and - as in the homogeneous case - if the given fully exact LODE is non-homogeneous, then it can be obtained by differentiating a non-homogeneous linear first order ODE, and this fact can be detected in the same way by analyzing the adjoint of the homogeneous part of the given LODE.
One of the interesting properties of this method is that a closed form "solution-formula" can be written directly, for all differential orders and for the "non-homogeneous case" (the homogeneous one is just a particular case) - thus shortcutting all the steps and the need for first solving the homogeneous part to afterwards finding a particular solution, for instance, through variation of parameters.
What is at the base of this method is the fact that integrating factors for a LODE are solutions of its adjoint (see for instance Murphy's book and others in dsolve, references).
See Also
adjoint
dsolve
odeadvisor
firint
firtest
intfactor
mutest
odetest
quadrature
missing
reducible
linear_ODEs
exact_linear
exact_nonlinear
odeadvisor,types
Download Help Document