Rules for narrow intervals

The regular interval approaches all derive from the trapezoid rule through the powerful concept of Richardson extrapolation (Section 4). We therefore need consider in detail only the theory of the trapezoid rule.

Figure 1 illustrates the basic concept underlying regular-interval approaches, decomposition of the desired integral

\begin{displaymath}
I \equiv \int_a^b f(x) \, dx,
\end{displaymath} (2)

into a sum of integrals over $N$ regular intervals of width $h\equiv(b-a)/N$
$\displaystyle I$ $\textstyle =$ $\displaystyle \sum_{i=1}^N \int_{x_{i-1}}^{x_i} f(x) \, dx,$ (3)
  $\textstyle \equiv$ $\displaystyle \sum_{i=1}^N I_i$  

where $x_i \equiv a + i h$ for $i=0 \ldots N$. The rationale for this analysis is that the narrowness of the intervals allows the development of expansions for the $I_i$. For the trapezoid rule, the $x_i$ become $N+1$ sample points for the integration.

Figure: Decomposition of the integral $\int_a^b f(x)\,dx$ into $N$ regular intervals
\scalebox{0.75}{\includegraphics{intdecomp.eps}}

Narrowness of the intervals $i$ ensures that Taylor series about the center points $x^{(m)}_i \equiv (x_{i-1}+x_i)/2$ well represent $f(x)$ over the corresponding interval,

$\displaystyle f(x)$ $\textstyle =$ $\displaystyle \sum_n \frac{1}{n!} f^{[n]}_m u^n$ (4)
  $\textstyle =$ $\displaystyle f_m + f'_m u + \frac{1}{2} f''_m u^2 + \frac{1}{6} f'''_m
u^3 + \frac{1}{24} f^{iv} u^4 + \ldots,$  

where $u \equiv x-x^{(m)}_i$, and we define the value and derivatives of the function at the midpoint as $f^{[n]}_m \equiv
f^{[n]}(x^{(m)}_i)$. The integral over interval $i$ is then
$\displaystyle I_i$ $\textstyle =$ $\displaystyle \int_{-h/2}^{h/2} \left(\sum_n \frac{1}{n!} f^{[n]}_m
u^n\right) \, du$ (5)
  $\textstyle =$ $\displaystyle \sum_{n\mbox{ even}} \frac{1}{n!} f^{[n]}_m \frac{1}{n+1} 2
\left(\frac{h}{2}\right)^{n+1}$  
  $\textstyle =$ $\displaystyle \sum_{n\mbox{ even}} \frac{1}{2^n(n+1)!} f^{[n]}_m h^{n+1}$  
  $\textstyle =$ $\displaystyle h \left( f_m + \frac{1}{24} f''_m h^2 + \frac{1}{1920}
f^{iv}_m h^4 + \ldots \right),$  

where all of the odd $n$ terms integrate to zero by symmetry.

Figure 2: Integration of interval $I_i$.
\scalebox{0.75}{\includegraphics{intint.eps}}

From (6), the lowest-order approximation to $I_i$ is

$\displaystyle M_i$ $\textstyle \equiv$ $\displaystyle f_m h,$ (6)
  $\textstyle =$ $\displaystyle f\left(\frac{x_{i-1}+x_i}{2}\right) h,$  

the so-called midpoint rule. (See Figure 2.) The associated error is second order,
\begin{displaymath}
M_i-I_i = h \left(-\frac{1}{24} f''_m h^2-\frac{1}{1920}
f^{iv}_m h^4 + {\mathcal O}(h^6)\right),
\end{displaymath} (7)

where ${\mathcal O}(h^6)$ denotes that the remaining terms are of the order $h^6$ or higher.

If the $x_i$ are our sample points, we have no direct knowledge of the $f_m$, however. Working with the sample points nearest to $x^{(m)}$, $x_{i-1}=x^{(m)}_i-h/2$ and $x_{i}=x^{(m)}_i+h/2$, we do have knowledge of the values

$\displaystyle f(x_{i-1})$ $\textstyle =$ $\displaystyle \sum_n \frac{1}{n!} f^{[n]}_m \left(-\frac{h}{2}\right)^n$ (8)
  $\textstyle =$ $\displaystyle \sum_n \frac{(-1)^n}{2^n n!} f^{[n]}_m h^n$  
  $\textstyle =$ $\displaystyle f_m - \frac{1}{2} f'_m h + \frac{1}{8} f''_m h^2 -
\frac{1}{48} f'''_m h^3 + \frac{1}{384} f^{iv}_m h^4,$  
       
$\displaystyle f(x_i)$ $\textstyle =$ $\displaystyle \sum_n \frac{1}{2^n n!} f^{[n]}_m h^n$  
  $\textstyle =$ $\displaystyle f_m + \frac{1}{2} f'_m h + \frac{1}{8} f''_m h^2 +
\frac{1}{48} f'''_m h^3 + \frac{1}{384} f^{iv}_m h^4,$  

where we have used the series (5). Multiplying the average of these two values with $h$ gives the trapezoid rule for approximating $I_i$,
$\displaystyle T_i$ $\textstyle \equiv$ $\displaystyle \frac{f(x_{i-1})+f(x_i)}{2} h$ (9)
  $\textstyle =$ $\displaystyle h \sum_{n \mbox{\ even}} \frac{1}{2^n n!} f^{[n]}_m h^n$  
  $\textstyle =$ $\displaystyle h \left( f_m + \frac{1}{8} f''_m h^2 + \frac{1}{384}
f^{iv}_m h^4 + \ldots \right).$  

This also has a second-order error,
\begin{displaymath}
T_i-I_i = h \left(\frac{1}{12} f''_m h^2+ \frac{1}{480} f^{iv}_m h^4.
{\mathcal O}(h^6)\right).
\end{displaymath} (10)

Tomas Arias 2004-01-26