We are going to show a roundabout but rather effective method of solving some rather complicated (definite) integrals in closed-form via a rather unusual method: a special factorization of linear ODEs. The example we will use is a 2 week old question that has yet to get an answer.
First, the problem: compute the integral
f := exp(a*m)* (sqrt(T)*sqrt(Pi)*erf((1/2)*sqrt(2)*(m+a*T)/sqrt(T))*exp(a*m)*a -sqrt(T)*sqrt(Pi)*exp(a*m)*a +sqrt(2)*exp(-(1/2)*(m^2+a^2*T^2)/T)): gg := Int(f,m=0..K);

The first step is to translate this into a problem on ODEs:
dd := PDEtools[dpolyform](y(K)=gg,no_Fn); dd2 := numer((lhs-rhs)(op([1,1],dd)));
which gives a 4th order linear ODE with polynomial coefficients. Then we need to draw on the power of the 'diffop' (for differential operators) sub-package of DEtools, in particular the LCLM factorization.
oper := DEtools[de2diffop](dd2, y(K), [Dx,x]); fact := DEtools[DFactorLCLM](oper,[Dx,x]); de3 := map(DEtools[diffop2de], fact, [Dx,x], y(x));
![[-(-x+a*T)/T*diff(y(x),x)+diff(diff(y(x),x),x), 2*(-x+a*T)/T*a*y(x)-1/T*(-x+3*a*T)*diff(y(x),x)+diff(diff(y(x),x),x)]](http://mapleoracles.maplesoft.com:8080/maplenet/primes/3a4c42bbc649ca82ff6fcdecd4021e20.gif)
So now we have something quite fantastic: the solution to the integral will be made up of the solutions to those 2 second-order ODEs. What will those look like?
basis4 := map(op,map(dsolve,de3,output=basis)); eq := add(C[i]*basis4[i],i=1..4);
![C[1]+C[2]*erf((-1/2*x+1/2*a*T)/T^(1/2)*2^(1/2))+ C[3]*exp(2*a*x)+C[4]*exp(2*a*x)*erf((1/2*a*T+1/2*x)*2^(1/2)/T^(1/2))](http://mapleoracles.maplesoft.com:8080/maplenet/primes/5b015cfdb2425780744c9cab784b7d7d.gif)
Those are exactly as asked by the original poster! We need to find the exact solution, so we just form the linear system from the first 4 Taylor coefficients, solve it, and substitute
eqs := [seq(eval(diff(eq,[x$i]),x=0) - eval(value(diff(gg,[K$i])),K=0),i=0..3)]:
solve(eqs,{C[1],C[2],C[3],C[4]});
eval(eq,%);
Comments
it got an answer, elsewhere
The question was also asked on comp.soft-sys.math.maple , and Robert Israel gave a (more specialized) answer there on the following day.
acer
Thanks for the reference
Too bad Robert did not also post the answer here. But in any case, my method is general, although fairly specialized -- I don't think it would give answers that int cannot get itself for problems where the underlying LODE is of order < 4.
I wonder if there is a way to classify all such problems (ie definite integral problems for integrands with special functions where the underlying LODE is of order 4 but splits into 2 solvable order 2 LODEs). Might be a rather fun exercise.
The LODE for the integrand
is equivalent but a degree less. Perhaps such classification is a bit simpler in terms of the integrands.
a nice technique!
A nice technique!
BTW: the help in Maple 12 does not find 'DFactorLCLM' while it does in Maple 11
and it does not find 'Change' (for the quite natural way shown by Robert Israel)
This is more than sad, there seem to be lost help links in the new version :-(((
lost help links
is still a serious regression problem with Maple 12 Classic GUI.
?DFactorLCLM works in Maple 12 Standard GUI only. In Classic ?DEtools[DFactorLCLM] is needed (ie you have to know the package), or from the menu: Help > Full Text Search > Word(s): DFactorLCLM.
Personally, my main use of the Standard GUI is for the help browser...
side remark
seems one needs to have f to be continous for using it on Int( f(x), x = 0 .. K ), otherwise odd behaviour can occure,
I have a related question here www.mapleprimes.com/blog/axelvogt/problemhandlingpdetoolsdpolyformanddsolve