Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Double integration over infinite intervals in Fortran

  1. Nov 10, 2016 #1
    Hi.. I am stuck up with a double integration where one of the integration limit is infinity. I know quadpack (qagi) can handle integration over infinite intervals. But how to make it work for the double integration. Or if there is any other routine that can handle both double integration and integration over infinite intervals. Thanks.....
  2. jcsd
  3. Nov 14, 2016 #2


    User Avatar
    Science Advisor
    Education Advisor

    It would likely help if you could post the integral or give an indication of its nastiness. The possible answers may depend on that.
  4. Nov 14, 2016 #3
    I don't know about any Fortran library having this. However, I believe that unless your integral is very difficult, e.g. having singularities, the best option is to develop your own integration routine. This is not difficult if you have some experience in Fortran programming. In this way you can also adapt the routine to your needs.
    Essentially, for an integration over ##[0,\infty]## you have to cases:
    Let's call the variable with infinite limit ##x##.
    1) if the integrand decays exponentially to 0 as ##x\rightarrow \infty##, you should use a Gauss-Laguerre rule
    2) if the integrand decays more slowly than exponentially to 0 as ##x\rightarrow \infty##, the best option is usually to use a mapping to ##[0,1]## and then a Gauss-Legendre rule

    I cannot give you more specific information without knowing the problem in more detail.
  5. Nov 14, 2016 #4
    Thanks....... Let me try this.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Threads - Double integration infinite Date
Java Minesweeper JFrame Flicker Aug 12, 2017
C/++/# Precision double in C/C++? Oct 25, 2016
C/++/# Double integrals with variable upper limit Jul 5, 2016
Help with Double integration May 2, 2008
Double definite integral (Fourier transform) Jun 11, 2007