Skip to main content
Mathematics LibreTexts

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{\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}}\)

    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)\).

    Screen Shot 2022-05-31 at 12.20.51 AM.png

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


    This page titled 6.3: Local Versus Global Error is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.