How to Integrate a Function with Steep Rise for Small x?

In summary, the best way to integrate the given function numerically is to use a standard routine for adaptive quadrature, which can be found in common software such as Maple, Mathematica, MATLAB, Octave, etc. Alternatively, one can implement one of the usual rules (e.g. trapezoidal or Simpson's) adaptively through recursion. To deal with the limit at infinity, it is suggested to restrict the integral to a large but finite interval. However, if speed is a concern, the integral can be split at a certain point and the Gauss-Laguerre method can be used on both regions. The steepness of the function can be managed by searching for relevant resources online.
  • #1
DrDu
Science Advisor
6,375
980
I want to integrate a function numerically from 0 to infinity where for small x ##f(x)\sim x^{-5/2} \exp(-a/x)## and for large x ##f(x) \sim \exp(-bx)##.
How do I best treat the steep rise for small x?
 
Physics news on Phys.org
  • #2
The integrand is not singular at ##x = 0## so you could use a standard routine for adaptive quadrature, as implemented in the standard software (Maple, Mathematica, MATLAB, Octave, etc.). This will select a smaller mesh width near ##x = 0## and allow for a larger mesh width for large ##x##.

If you insist on doing it yourself, it is not so hard to implement one of the usual rules (e.g. trapezoidal or Simpson's) adaptively through recursion. Most NA books discuss this. If you need references, let me know. To deal with the limit at infinity, just restrict to a large but finite interval. Because of your behavior for large ##x##, it will be easy to get a bound on the contribution to the error.
 
  • #3
Thank you for your answer Krylov!
Adaptive quadrature is too slow for my purposes as I will have to evaluate integrals of this kind many thousand times. I think now about splitting the integral e.g. at x=1, use y=-a/x as new integration variable for x<1 and use Gauss-Laguerre integration on both regions.
 
  • Like
Likes S.G. Janssens
  • #4
Steep is associated with googling "http://web.engr.illinois.edu/~rnandwa2/Reports/ECE521_Gear.pdfof integration" in my perception.
 

FAQ: How to Integrate a Function with Steep Rise for Small x?

1. What is numerical integration?

Numerical integration is a method used to approximate the value of a definite integral of a function. It involves dividing the area under the curve of the function into smaller, simpler shapes, such as rectangles or trapezoids, and then calculating the sum of their areas to approximate the exact value of the integral.

2. Why is numerical integration important?

Numerical integration is important because it allows us to approximate the value of integrals that cannot be solved analytically. It is also useful for solving complex mathematical problems in various fields such as physics, engineering, and economics.

3. What are the different methods of numerical integration?

The most commonly used methods of numerical integration are the Trapezoidal Rule, Simpson's Rule, and Gaussian Quadrature. These methods differ in their approach to dividing the area under the curve and calculating the sum of their areas. There are also more advanced methods such as Monte Carlo integration and adaptive quadrature.

4. How do you choose the appropriate numerical integration method?

The choice of numerical integration method depends on the type of function being integrated, the accuracy required, and the computational resources available. Some methods may be more suitable for certain types of functions, while others may be more accurate but require more computational power.

5. What are some common challenges or sources of error in numerical integration?

Some common challenges or sources of error in numerical integration include choosing an appropriate step size for dividing the area under the curve, dealing with singularities or oscillating functions, and round-off errors due to limited precision in computer calculations. It is important to carefully consider these factors in order to obtain accurate results.

Similar threads

Replies
3
Views
645
Replies
31
Views
2K
Replies
6
Views
2K
Replies
20
Views
3K
Replies
11
Views
1K
Replies
8
Views
1K
Replies
2
Views
2K
Back
Top