Fortran Double integration over infinite intervals in Fortran

AI Thread 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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Back
Top