Oscillatory integrals Re: Maxima asks about sign of integration(!) variable
Subject: Oscillatory integrals Re: Maxima asks about sign of integration(!) variable
From: John Lapeyre
Date: Thu, 26 Sep 2013 01:21:09 +0200
On 09/26/2013 12:08 AM, Richard Fateman wrote:
> Regarding oscillatory integrals ... are you trying to use quadpack on
them?
> There may be a better way if you approach them symbolically.
>
> http://www.cs.berkeley.edu/~fateman/papers/levin.pdf
>
Thanks, I'll take a look. For some integrands and some ranges
the quadpack oscillatory routines can do integrals that its more
generic routines cannot (not surprising). Sometimes this requires symbolic
manipulation. e.g. integrate(cos(x^2),x,0,inf) converges, and can be
done with two calls to quadpack one that includes x=0 and another,
after a change of variables, that uses the cosine routine. But,
changevar sometimes makes sign errors. Another problem is identifying
singularities. I can get some of them. It should not be difficult to
find many cases where the argument of log is zero. Also, a little
logic on the results of Barton's to_poly_solve code would be able to
find zeros in trig functions within an interval. AFIAK, Mathematica
still requires that these be supplied by hand. It's strange that
taking the low-hanging fruit with quadpack sometimes outperforms
Mathematica. On the other hand, it can integrate Bessel functions over
large ranges... maybe this is a modified version of the cosine integration
routines.
Then there is multi-dimensional integration. nintegrate now does this
by nesting 1-d routines, which is slow at best. There are some more
clever fortran routines out there, maybe they could be translated or
used via cffi. There is already a CL interface to gsl Monte Carlo
integration, but I have not tried it.
--John
> > with Mathematica's exact answer than it's numerical answer. I've
> > seen that more than once.
> >
> > (%i5) nintegrate(sqrt(1+(4*x^(1/3)-1/16*x^((-1)/3))^2),[x,-8,512]);
> >
> > (%o5) [41.24445772554166*%i+12318.18747666083,1.5204793641032666e-5,2268,
> > "no problems"]
> >
> > I have been trying a bit to extend it to do oscillatory integrals
> > as well, eg. cos(x^2) --> cos(u)/sqrt(u). But changevar is broken,
> > ... so it will take a while.
> >
> > -- John
> >
>