I am trying to approximate the following integral by using Simpson's Rule with $n=6$

$$I = \int_{1}^{\infty} \frac{\sin(x)}{x^4} dx$$

The textbook I am using for Numerical Analysis (Burden, Faires 9-th Edition) suggests the following substitution:

$$t = \frac{1}{x}, dx = {-t}^{-2}dt.$$

which yields the following $$I = \int_{0}^{1} t^{-2} \cdot \frac{\sin\left(\frac{1}{t}\right)}{\left(\frac{1}{t}\right)^4} dt$$

$$I = \int_{0}^{1} t^{2} \cdot \sin\left(\frac{1}{t}\right) dt$$

Now we have a left endpoint singularity, but how to proceed further

  • $\begingroup$ The endpoint singularity is a good indication that using Simpson's rule is not a good idea in this case. $\endgroup$ – Somos May 6 '18 at 19:09
  • $\begingroup$ But this is the statement of the problem I am trying to solve: Use Composite Simpson's Rule to approximate the integral $\endgroup$ – S.19LaBG May 6 '18 at 19:10
  • $\begingroup$ I don't know what "Composite Simpson's Rule" is, but I suggest using a slightly different endpoint instead. That is, use $a>0$ but still small and try to find $\int_a^1$. Or else, just pretend that the integrand is zero at zero. $\endgroup$ – Somos May 6 '18 at 19:13
  • 1
    $\begingroup$ There is a singularity at $t=0$, but the function (taking the value $0$ there) is still continuous there. $\endgroup$ – Robert Israel May 6 '18 at 19:57
  • $\begingroup$ I hope your first integral is $\int_1^\infty \ldots$, not $\int_0^\infty \ldots$. $\endgroup$ – Robert Israel May 6 '18 at 20:12

$$f(t)=t^2 \sin\frac1t$$

To apply Simpson's rule for $n=6$, you need to calculate values $f_i$ for $t=i\Delta t$ where $i=0,1,2,...6$ and $\Delta t=1/6$

$f_0=f(0)$ is not defined but you can replace it with $\lim_{t\to0}f(t)=0.$

$f_1 = f(1/6)= -0.00776154$

$f_2 = f(2/6)= 0.01568$

$f_3 = f(3/6)= 0.227324$

$f_4= f(4/6)= 0.443331$

$f_5= f(5/6)= 0.647249$

$f_6= f(6/6)= 0.841471$

$I\approx\frac{\Delta t}{3}(f_0+4f_1+2f_2+4f_3+2f_4+4f_5+f_6)=0.290375$

Mathematica provides much better approximation (0.28653) but we are still within 2% margin.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.