>It seems to be wellknown fact that the errors are
>bounded by
[quoted text clipped - 6 lines]
>
>Does anyone here know how to derive the error estimates?
There should be a derivation in any book on numerical analysis.
It's not hard, using Taylor's Theorem.
Working it out just now, I found that the midpoint
rule, approximating int_a^b f(t) dt by
(b-a) f((a+b)/2),
actually gives a smaller constant in the error than
the trapezoidal rule.
Let's assume that a = -b, to simplify the typing below.
Note that then b-a = 2b. Taylor's Theorem shows that
(*) f(t) = f(0) + t f'(0) + R(t),
where
|R(t)| <= m t^2/3.
So
int_{-b}^b f(t) = 2b f(0) + int_{-b}^b R(t) dt
= (b-a) f(0) + int_{-b}^b R(t),
so the absolute value of the error in the midpoint
rule is
|E_mid| <= int_{-b}^b m t^2/2 dt
= m b^3/3 = m (b-a)^3/24.
Applying (*) with t = b and t = -b shows that the
difference between the midpoint rule and the
trapezoidal rule is
b(f(b) + f(-b)) - 2b f(0) = b(R(b) + R(-b)),
so the absolute value of the difference is
|mid - trap| <= bm(b^2/2 + b^2/2)
= m b^3 = m (b-a)^3/8.
So the absolute value of the error in the trapezoidal
rule is
|E_trap| <= m (b-a)^3/24 + m (b-a)^3/8 = m (b-a)^3/6.
You can use a similar argument to get an error estimate
for Simpson's Rule, with a constant slightly worse than
what you cite above:
(**) f(t) = f(0) + t f'(0) + t^2/2 f''(0) + R(t).
where now
|R(t)| <= t^3/6 m_3,
where m_3 is the maximum of the third derivative.
So
int_{-b}^b f = 2b f(0) + b^3/3 f''(0) + int R(t),
where
int |R(t)| <= int_{-b}^b t^3/6 m_3 = b^4 m_3/12.
Now we don't want that f''(0) in the approximation
to the integral. Applying (**) with t = b and t = -b
and rearranging gives
b^3/3 f''(0) = b(f(b) + f(-b))/3 - 2b/3 f(0)
+ b/3 (R(b) + R(-b)),
so that
2b f(0) + b^3/3 f''(0) = 4b/3 f(0) + b/3 (f(b)+f(-b))
+ b/3 (R(b) + R(-b))
= (b-a)/6 (4 f(0) + f(b) + f(a))
+ b/3 (R(b) + R(-b)),
exactly the Simpson thing plus another error term.
The absolute value of the sum of the two error terms
is
<= b^4 m_3 (1/12 + 1/9) = b^4/m_3 (7/36)
= (b-1)^4 m_3 (7/288)
Of course 7/288 > 1/90.
On the other hand that's not the "right" error anyway!
According to http://en.wikipedia.org/wiki/Simpson's_rule
the error in Simpson's rule is actually bounded by a
constant times (b-a)^5, which is much better.
Oops, I just realized that you cited a bound in
terms of (b-a)^5 above...)
If I work through the above with a third-degree Taylor
polynoial in place of (**) I get an error of
(b-a)^5 m_4/560 (which is worse than the constant
at wikipedia, but better than the one you cite above),
where m_4 is the maximum of the fourth derivative.
************************
David C. Ullrich
Gunnar G - 31 Dec 2006 21:18 GMT
David C. Ullrich wrote a lot:
And I say, thank you, I will study it for the rest of this year.