- #1
muppet
- 608
- 1
Hi all,
I'm a programming newbie teaching myself C++ mainly for interest/ because I might want a real job after my physics PhD, but I have a problem in my research some code might be useful for.
I have some functions defined by integrals of the form
$$A(q)=\int db~ b* J_{0}(b*q) (exp(i*f(b))-1)$$
where I have to consider many different functions f(b), which are typically sums of products of special functions, so an analytic approach is right out. (J is a Bessel function.) My supervisor doesn't completely trust the numerics of Mathematica so he wants an independent check on the results it gives me, one where we understand the methods used. The integration runs from 0 to infinity, and the functions f(b) sometimes encounters logarithmic singularities for small arguments, and it's of course highly oscillatory, so I'd expect that any kind of standard off-the-shelf integration routine would run into problems.
Looking around I came across
http://scicomp.stackexchange.com/qu...rt-in-highly-oscillatory-integral-computation
which suggests a couple of methods tailored to oscillatory integrals over infinite regions. It seems though that if this is a standard problem that people often have, there should be some existing code in a library somewhere for it, but I can't find any. Additionally, I can't find a library of special functions that contains all the ones I need. The best I've found so far is http://www.gnu.org/software/gsl/manual/html_node/, but this doesn't have all the hypergeometric functions I need- in particular, it doesn't have 2F3 or 1F2. Can anyone recommend a good place to look for either a library for these functions or for an implementation of Longman's method for dealing with oscillatory integrals over infinite regions? As a total novice I'd rather not go trying to reinvent the wheel, badly, when the result actually matters...
Thanks in advance.
Mod note: I fixed the integral in the text above.
I'm a programming newbie teaching myself C++ mainly for interest/ because I might want a real job after my physics PhD, but I have a problem in my research some code might be useful for.
I have some functions defined by integrals of the form
$$A(q)=\int db~ b* J_{0}(b*q) (exp(i*f(b))-1)$$
where I have to consider many different functions f(b), which are typically sums of products of special functions, so an analytic approach is right out. (J is a Bessel function.) My supervisor doesn't completely trust the numerics of Mathematica so he wants an independent check on the results it gives me, one where we understand the methods used. The integration runs from 0 to infinity, and the functions f(b) sometimes encounters logarithmic singularities for small arguments, and it's of course highly oscillatory, so I'd expect that any kind of standard off-the-shelf integration routine would run into problems.
Looking around I came across
http://scicomp.stackexchange.com/qu...rt-in-highly-oscillatory-integral-computation
which suggests a couple of methods tailored to oscillatory integrals over infinite regions. It seems though that if this is a standard problem that people often have, there should be some existing code in a library somewhere for it, but I can't find any. Additionally, I can't find a library of special functions that contains all the ones I need. The best I've found so far is http://www.gnu.org/software/gsl/manual/html_node/, but this doesn't have all the hypergeometric functions I need- in particular, it doesn't have 2F3 or 1F2. Can anyone recommend a good place to look for either a library for these functions or for an implementation of Longman's method for dealing with oscillatory integrals over infinite regions? As a total novice I'd rather not go trying to reinvent the wheel, badly, when the result actually matters...
Thanks in advance.
Mod note: I fixed the integral in the text above.
Last edited by a moderator: