Solving Linear ODEs Which Are Fully Exact
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);
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);
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 := (x^2+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;
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) );
ODE2 := firint( ODE3, y(x) );
ODE1 := firint( ODE2, y(x) );
and the first order LODE above - ODE1 - can be solved using dsolve leading to the solution to ODE4
sol1 := dsolve( ODE1, y(x) );
The solution above is essentially the same one obtains by calling dsolve directly:
dsolve( ODE4, y(x) );
How it works
To detect that ODE4 is fully exact, we first look at the equation's adjoint:
ADJ := adjoint(ODE4, y(x));
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 );
Actually, differentiating 3 times the equation above one reobtains the original fourth order ODE:
diff( (14), x$3) = 0;
normal( (15) - ODE4 );
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).
Download Help Document
What kind of issue would you like to report? (Optional)