Huge error bounds for midpoint rule in calculating integral

118 Views Asked by At

[the value of K is 195]. 1I have this problem an integration approximation problem of: $$\int_0^{4\sqrt{\pi}}\sin(x^2)dx$$ with n = 4. The result is 5.01. But when I check the error bound using the formula $K\frac{(a-b)^3}{24n^2}$ (my K is 195), it's huge (being around 180). It is so weird how can it be so big, when I check with my calculator if n is infinite then the result is 0.5561, should the error bound be around 5?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, the upper bound for error in the Midpoint Rule for $\int_a^b f(x)\; dx$ with $n$ intervals is $K (b-a)^2/(24 n^2)$, where $K$ is the maximum of $|f''|$ on $[a,b]$, and in your case $K$ is approximately $195$.

The thing is, an upper bound is just that, an upper bound. It does not mean the actual error is anywhere near that. There are in fact functions with the same $K$ where the error in the Midpoint Rule would be equal to that bound, e.g. $f(x) = 2 K x^2$. It happens that in your example $f''(x)$ fluctuates rather wildly, and essentially what's going on is that the places where $f''$ is large and positive nearly cancel out the places where $f''$ is large and negative.