Integrating exp(-x^2)/x using Simpson's Rule: A Numerical Approach

  • Thread starter Thread starter reach28
  • Start date Start date
  • Tags Tags
    Integration
Click For Summary
SUMMARY

The discussion focuses on numerically integrating the function exp(-x^2)/x from the limits of √π to ∞ using Simpson's Rule. The user initially struggled with various methods, including substitutions and integration by parts, but found success by transforming the integral through the substitution u = 1/x^2. This change allowed the integral to be redefined with finite limits, specifically from 0 to 1/π, and enabled the application of Simpson's Rule without encountering issues at the lower limit. The final function was confirmed to approach zero as u approaches zero, allowing for a valid numerical evaluation.

PREREQUISITES
  • Understanding of numerical integration techniques, specifically Simpson's Rule.
  • Familiarity with substitution methods in calculus.
  • Knowledge of limits and behavior of functions at infinity.
  • Basic understanding of exponential functions and their properties.
NEXT STEPS
  • Research the application of Simpson's Rule for improper integrals.
  • Learn about the Gaussian integral and its properties.
  • Explore numerical methods for handling singularities in integrals.
  • Investigate advanced substitution techniques in calculus.
USEFUL FOR

Mathematicians, students studying numerical analysis, and anyone interested in advanced integration techniques and numerical methods for evaluating improper integrals.

reach28
Messages
3
Reaction score
0
I'm supposed to integrate the following numerically:
\int e^{-x^{2}}/x
,with limits from \sqrt{\pi} to \inftyI'm supposed to use Simpson's Rule, so I'm trying to redefine the integral to have a finite range. I've tried all kinds of substitutions, and integration by parts. I've also tried squaring the integral and converting to polar coordinates, because it looks so similar to the Gaussian integral. No dice.
Any suggestions?
 
Physics news on Phys.org
deleted my first post as i missed the point & was way off...

do you need an analytic result as well?

if you want to just want to transform to get finite limits to use simpsons rule, probably means turning the infinite limit into a limit towards zero, eg. how about sometrhing u ~1/x^2
 
Using something like u=1/x^2 would give a finite range of integration, but it would leave the function undefined at 0:

u=1/x^2 --> x=u^-.5 --> dx=-0.5*u^1.5 du

that would give us the integral of 0.5*e^(-1/u) / u ,from 0 to 1/pi.
I thought that i couldn't use this because the function is undefined at 0. a quick check shows that as u-->0, 0.5*e^(-1/u) / u also goes to zero. This leaves no problems for it to be evaluated by Simpson's Rule, as long as f(u=0) is defined to be zero in my script. Now that I have a fresh look at it, I don't know why I didn't see it before. Thank You.
 

Similar threads

Replies
3
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
11K
Replies
2
Views
1K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K