Fortran Double integration over infinite intervals in Fortran

Click For Summary
The discussion centers on the challenge of performing double integration with one limit extending to infinity. The user is seeking guidance on utilizing the quadpack library, specifically the qagi function, for this purpose. It is suggested that while quadpack can handle infinite intervals, there may not be a direct Fortran library for double integration over such limits. A recommendation is made to develop a custom integration routine if the integral is manageable, especially if it lacks singularities. Two approaches for handling integrals with infinite limits are proposed: using the Gauss-Laguerre rule for integrands that decay exponentially and employing a mapping to [0,1] with the Gauss-Legendre rule for slower decaying integrands. More specific advice would require additional details about the integral in question.
Monika Randhawa
Messages
2
Reaction score
0
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...
 
Technology news on Phys.org
It would likely help if you could post the integral or give an indication of its nastiness. The possible answers may depend on that.
 
Monika Randhawa said:
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...

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.
 
Thanks... Let me try this.
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
2
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
8K
Replies
2
Views
2K