How to Integrate a Function with Steep Rise for Small x?
- Context: Graduate
- Thread starter DrDu
- Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
Discussion
Physics news on Phys.org
Science Advisor
Education Advisor
- 1,222
- 820
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.
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.
Science Advisor
- 6,423
- 1,004
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.
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.
Similar threads
High School Integrating a function over the boundary of the first quadrant
- docnet
- · Replies 1 ·
- Calculus
- Replies
- 1
Undergrad How to integrate with functions of differentials?
- jk22
- · Replies 8 ·
- Calculus
- Replies
- 8
Undergrad Integrating velocity for a particle in translating circular orbit
- pabilbado
- · Replies 8 ·
- Calculus
- Replies
- 8
Python Use Python to integrate a function constructed in Mathematica
- member 428835
- · Replies 5 ·
- Programming and Computer Science
- Replies
- 5
Integrate the function f at the path that consists of the curves C1 and C2
- mathmari
- · Replies 2 ·
- Calculus
- Replies
- 2
How to integrate this function?
- Mutatis
- · Replies 3 ·
- Calculus and Beyond Homework Help
- Replies
- 3
How would you integrate this function?
- Vitani11
- · Replies 6 ·
- Calculus and Beyond Homework Help
- Replies
- 6
Graduate How to integrate the delta function of complex variable?
- blenx
- · Replies 5 ·
- Calculus
- Replies
- 5
Undergrad How to integrate function 1/(x^2+a) ?
- Holali
- · Replies 1 ·
- Calculus
- Replies
- 1
Integrating y' = √(Dx²)/√(1-Dx²) from a differential equation
- vanceEE
- · Replies 8 ·
- Calculus and Beyond Homework Help
- Replies
- 8