- #1
Urkel
- 15
- 0
Hi everyone,
I am writing a simple code using Numerical Recipes (that bible of numerical method) to
integrate using trapezoid rule the following integral
int_pi/2_inf {sin(x)/x^2} dx
I first make variable change y = 1/x to change limit of integration so that now the integral
becomes int_0_2/pi sin(1/y) dy
I ever took analysis and this function has very special properties because of its extremely rapid
oscillation near x=0. Also, it has a special name, I forgot what it is. Anybody knows what
function sin(1/x) is commonly called in analysis?
Because of this rapid oscillation, one must use much finer sampling density when employing
trapezid rule to get accurate answer.What do you think further simple analytic transformation
that I can make to improve the convergence of this numerical integration using trapezoid rule?
Suggestions would be highly appreciated.
Urkel
I am writing a simple code using Numerical Recipes (that bible of numerical method) to
integrate using trapezoid rule the following integral
int_pi/2_inf {sin(x)/x^2} dx
I first make variable change y = 1/x to change limit of integration so that now the integral
becomes int_0_2/pi sin(1/y) dy
I ever took analysis and this function has very special properties because of its extremely rapid
oscillation near x=0. Also, it has a special name, I forgot what it is. Anybody knows what
function sin(1/x) is commonly called in analysis?
Because of this rapid oscillation, one must use much finer sampling density when employing
trapezid rule to get accurate answer.What do you think further simple analytic transformation
that I can make to improve the convergence of this numerical integration using trapezoid rule?
Suggestions would be highly appreciated.
Urkel