Skip to article frontmatterSkip to article content

8.5Peano kernel error formulas

#%config InlineBackend.figure_format = 'svg'
from pylab import *

The error formulae we have derived so far assume certain derivatives exist and are continuous. This may be a restrictive assumption in many cases. Even if the function is not differentiable everywhere, the derivatives may be integrable. In this case, we can use Taylor formula with an integral remainder term to perform the error analysis.

8.5.1Trapezoidal rule

Assume that ff is continuously differentiable and ff'' is integrable on [a,b][a,b], i.e.,

abf(x)dx<\int_a^b |f''(x)| \ud x < \infty

Single interval. Taylor’s theorem gives

f(x)=f(a)+(xa)f(a)+ax(xt)f(t)dt=:p1(x)+R2(x)\begin{align} f(x) &= \clr{red}{f(a) + (x-a) f'(a)} + \clr{blue}{ \int_a^x (x-t) f''(t) \ud t } \\ &=: \clr{red}{p_1(x)} + \clr{blue}{ R_2(x) } \end{align}

The quadrature error EnE_n is a linear operator

En(F+G)=En(F)+En(G),F,GC[a,b]E_n(F+G) = E_n(F) + E_n(G), \qquad F,G \in \cts[a,b]

Thus

E1(f)=E1(p1)+E1(R2)=E1(R2)E_1(f) = E_1(p_1) + E_1(R_2) = E_1(R_2)

since Trapezoidal rule is exact for linear polynomials. Now

E1(R2)=abR2(x)dxba2[R2(a)+R2(b)],R2(a)=0=abax(xt)f(t)dtdxba2ab(bt)f(t)dt\begin{aligned} E_1(R_2) &= \int_a^b R_2(x) \ud x - \frac{b-a}{2}[R_2(a) + R_2(b)], \qquad R_2(a) = 0 \\ &= \int_a^b \int_a^x (x-t) f''(t) \ud t \ud x - \frac{b-a}{2}\int_a^b (b-t) f''(t) \ud t \end{aligned}

For any integrable function G(x,t)G(x,t), by Fubini theorem

abaxG(x,t)dtdx=ab(abG(x,t)χ[a,x](t)dt)dx=ab(abG(x,t)χ[a,x](t)dx)dt=ab(abG(x,t)χ[t,b](x)dx)dt=abtbG(x,t)dxdt\begin{align} \int_a^b \int_a^x G(x,t) \ud t \ud x &= \int_a^b \left( \int_a^b G(x,t) \chi_{[a,x]}(t) \ud t \right) \ud x \\ &= \int_a^b \left( \int_a^b G(x,t) \chi_{[a,x]}(t) \ud x \right) \ud t \\ &= \int_a^b \left( \int_a^b G(x,t) \chi_{[t,b]}(x) \ud x \right) \ud t \\ &= \int_a^b \int_t^b G(x,t) \ud x \ud t \end{align}

Here χ is the characteristic function and we used χ[a,x](t)=χ[t,b](x)\chi_{[a,x]}(t) = \chi_{[t,b]}(x) since atxba \le t \le x \le b. Using this result in the above error formula for G(x,t)=(xt)f(t)G(x,t) = (x-t) f''(t) we get

E1(R2)=abf(t)tb(xt)dxdtba2ab(bt)f(t)dt=ab(ta)(tb)2f(t)dt\begin{aligned} E_1(R_2) &= \int_a^b f''(t) \int_t^b (x-t) \ud x \ud t - \frac{b-a}{2} \int_a^b (b-t) f''(t) \ud t \\ &= \int_a^b \frac{(t-a)(t-b)}{2} f''(t) \ud t \end{aligned}

Composite rule. For the composite Trapezoid rule, the error is obtained by adding the error from each interval and can be written as

En(f)=abK(t)f(t)dtE_n(f) = \int_a^b K(t) f''(t) \ud t

where

K(t)=12(txj1)(txj),t[xj1,xj],j=1,2,,nK(t) = \half (t - x_{j-1})(t - x_j), \qquad t \in [x_{j-1}, x_j], \qquad j=1,2,\ldots,n

This gives the following error estimate

En(f)Kabf(t)dt=h28abf(t)dt|E_n(f)| \le \norm{K}_\infty \int_a^b |f''(t)| \ud t = \frac{h^2}{8} \int_a^b |f''(t)| \ud t

Compare this to the previous error estimate

En(f)=ba12h2f(η)ba12h2f|E_n(f)| = \frac{b-a}{12} h^2 |f''(\eta)| \le \frac{b-a}{12} h^2 \norm{f''}_\infty

which may over-estimate the error if ff'' has a peaky distribution, since

1baabf(t)dtf\frac{1}{b-a} \int_a^b |f''(t)|\ud t \le \norm{f''}_\infty