Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

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.

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# C++ implementation of Longman's method, and special functions

Loading...

Similar Threads for implementation Longman's method | Date |
---|---|

How to understand dimensionless data of MacCormack's method | Monday at 5:44 AM |

C/++/# Velocity Verlet C++ implementation | Jul 29, 2017 |

Implementing symmetry boundary condition for the diffusion equation | Jul 23, 2017 |

Java Problem with Merge Sort Alg Implementation | Feb 19, 2017 |

C/++/# How to Implement Damping in Particle Simulation | Mar 21, 2016 |

**Physics Forums - The Fusion of Science and Community**