6.3: Local Versus Global Error
- Page ID
- 96061
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Consider the elementary formula (6.4) for the trapezoidal rule, written in the form
\[\int_{0}^{h} f(x) d x=\frac{h}{2}(f(0)+f(h))-\frac{h^{3}}{12} f^{\prime \prime}(\xi) \nonumber \]
where \(\xi\) is some value satisfying \(0 \leq \xi \leq h\), and we have used Taylor’s theorem with the mean-value form of the remainder. We can also represent the remainder as
\[-\frac{h^{3}}{12} f^{\prime \prime}(\xi)=\mathrm{O}\left(h^{3}\right) \nonumber \]
where \(\mathrm{O}\left(h^{3}\right)\) signifies that when \(h\) is small, halving of the grid spacing \(h\) decreases the error in the elementary trapezoidal rule by a factor of eight. We call the terms represented by \(\mathrm{O}\left(h^{3}\right)\) the Local Error.
More important is the Global Error which is obtained from the composite formula (6.7) for the trapezoidal rule. Putting in the remainder terms, we have
\[\int_{a}^{b} f(x) d x=\frac{h}{2}\left(f_{0}+2 f_{1}+\cdots+2 f_{n-1}+f_{n}\right)-\frac{h^{3}}{12} \sum_{i=0}^{n-1} f^{\prime \prime}\left(\xi_{i}\right) \nonumber \]
where \(\xi_{i}\) are values satisfying \(x_{i} \leq \xi_{i} \leq x_{i+1}\). The remainder can be rewritten as
\[-\frac{h^{3}}{12} \sum_{i=0}^{n-1} f^{\prime \prime}\left(\xi_{i}\right)=-\frac{n h^{3}}{12}\left\langle f^{\prime \prime}\left(\xi_{i}\right)\right\rangle \nonumber \]
where \(\left\langle f^{\prime \prime}\left(\xi_{i}\right)\right\rangle\) is the average value of all the \(f^{\prime \prime}\left(\xi_{i}\right)^{\prime}\) s. Now,
\[n=\frac{b-a}{h} \nonumber \]
so that the error term becomes
\[\begin{aligned} -\frac{n h^{3}}{12}\left\langle f^{\prime \prime}\left(\xi_{i}\right)\right\rangle &=-\frac{(b-a) h^{2}}{12}\left\langle f^{\prime \prime}\left(\xi_{i}\right)\right\rangle \\ &=\mathrm{O}\left(h^{2}\right) \end{aligned} \nonumber \]
Therefore, the global error is \(\mathrm{O}\left(h^{2}\right)\). That is, a halving of the grid spacing only decreases the global error by a factor of four.
Similarly, Simpson’s rule has a local error of \(\mathrm{O}\left(h^{5}\right)\) and a global error of \(\mathrm{O}\left(h^{4}\right)\).

Figure 6.1: Adaptive Simpson quadrature: Level \(1 .\)


