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
$$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.