Accuracy comparision between composite simpson's rule and $\frac{3}{8}$ simpson's rule

988 Views Asked by At

I am integrating the function $f(x)=0.2+ 25x-200x^2+675x^3+900x^4+400x^5$, I have to integrate it between $a=0$ to $b=0.8$ with $n=5$ (five segments), I have integrated it by using only $\frac{3}{8}$ simpson's rule, and using composite simpson's rule,(for first 2 segments I have used $\frac{1}{3}$ simpson's rule and for last 3 segments, I have used $\frac{3}{8}$ simpson's rule) I got the values as nearly $1.7$ in case of only using $\frac{3}{8}$ simpson's rule and 1.645 in case of composite simpson's rule. I got a more accurate value in case of composite simpson's rule in this problem.(Actual value is 1.640533)

Is there any mathematical proof that I can always get a accurate value using composite simpson's rule rather than only using $\frac{3}{8}$ simpson's rule? First of all is my claim correct that we yield a better accuracy always with composite simpson's rule?

1

There are 1 best solutions below

0
On

As explained here, estimating $\int_a^bf(x)dx$ where $a<b$ by the $\frac38$ Simpson's rule has error $-\frac{(b-a)^5}{6480}f^{(4)}(\xi)$ for some $\xi\in[a,\,b]$, but for the composite version the denominator $6480$ is changed to $80n^4$ if $3|n$. Admittedly the exact value of $\xi$ is bound to change too, but if $|f^{(4)}|$ is nonzero and not very variable in relative terms on $[a,\,b]$, this only causes a small change in the value of $n$ for which the methods' error terms are closest to matching. In fact, $80n^4=6480$ for $n=3$, so by the time you get to $n=5$ the composite rule should have a much smaller error term (although, since $5$ isn't quite the same as $6$, which is a multiple of $3$, we can't use the above formula for the error term).