Skip to main content Contents
Prev Up Next \(\newcommand{\Z}{{\mathbb Z}}
\newcommand{\Q}{{\mathbb Q}}
\newcommand{\R}{{\mathbb R}}
\newcommand{\C}{{\mathbb C}}
\newcommand{\T}{{\mathbb T}}
\newcommand{\F}{{\mathbb F}}
\newcommand{\PP}{{\mathbb P}}
\newcommand{\HH}{{\mathbb H}}
\newcommand{\compose}{\circ}
\newcommand{\bolda}{{\mathbf a}}
\newcommand{\boldb}{{\mathbf b}}
\newcommand{\boldc}{{\mathbf c}}
\newcommand{\boldd}{{\mathbf d}}
\newcommand{\bolde}{{\mathbf e}}
\newcommand{\boldi}{{\mathbf i}}
\newcommand{\boldj}{{\mathbf j}}
\newcommand{\boldk}{{\mathbf k}}
\newcommand{\boldn}{{\mathbf n}}
\newcommand{\boldp}{{\mathbf p}}
\newcommand{\boldq}{{\mathbf q}}
\newcommand{\boldr}{{\mathbf r}}
\newcommand{\bolds}{{\mathbf s}}
\newcommand{\boldt}{{\mathbf t}}
\newcommand{\boldu}{{\mathbf u}}
\newcommand{\boldv}{{\mathbf v}}
\newcommand{\boldw}{{\mathbf w}}
\newcommand{\boldx}{{\mathbf x}}
\newcommand{\boldy}{{\mathbf y}}
\newcommand{\boldz}{{\mathbf z}}
\newcommand{\boldzero}{{\mathbf 0}}
\newcommand{\boldmod}{\boldsymbol{ \bmod }}
\newcommand{\boldT}{{\mathbf T}}
\newcommand{\boldN}{{\mathbf N}}
\newcommand{\boldB}{{\mathbf B}}
\newcommand{\boldF}{{\mathbf F}}
\newcommand{\boldS}{{\mathbf S}}
\newcommand{\boldE}{{\mathbf E}}
\newcommand{\boldG}{{\mathbf G}}
\newcommand{\boldK}{{\mathbf K}}
\newcommand{\boldL}{{\mathbf L}}
\DeclareMathOperator{\lns}{lns}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\Span}{span}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\NS}{null}
\DeclareMathOperator{\RS}{row}
\DeclareMathOperator{\CS}{col}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\range}{range}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\nullity}{nullity}
\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\Fix}{Fix}
\DeclareMathOperator{\Aff}{Aff}
\DeclareMathOperator{\Frac}{Frac}
\DeclareMathOperator{\Ann}{Ann}
\DeclareMathOperator{\Tor}{Tor}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\mdeg}{mdeg}
\DeclareMathOperator{\Lt}{Lt}
\DeclareMathOperator{\Lc}{Lc}
\DeclareMathOperator{\disc}{disc}
\DeclareMathOperator{\Frob}{Frob}
\DeclareMathOperator{\adj}{adj}
\DeclareMathOperator{\curl}{curl}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\diver}{div}
\DeclareMathOperator{\flux}{flux}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\ab}{ab}
\newcommand{\surjects}{\twoheadrightarrow}
\newcommand{\injects}{\hookrightarrow}
\newcommand{\bijects}{\leftrightarrow}
\newcommand{\isomto}{\overset{\sim}{\rightarrow}}
\newcommand{\floor}[1]{\lfloor#1\rfloor}
\newcommand{\ceiling}[1]{\left\lceil#1\right\rceil}
\newcommand{\mclass}[2][m]{[#2]_{#1}}
\newcommand{\val}[2][]{\left\lvert #2\right\rvert_{#1}}
\newcommand{\abs}[2][]{\left\lvert #2\right\rvert_{#1}}
\newcommand{\valuation}[2][]{\left\lvert #2\right\rvert_{#1}}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\anpoly}{a_nx^n+a_{n-1}x^{n-1}\cdots +a_1x+a_0}
\newcommand{\anmonic}{x^n+a_{n-1}x^{n-1}\cdots +a_1x+a_0}
\newcommand{\bmpoly}{b_mx^m+b_{m-1}x^{m-1}\cdots +b_1x+b_0}
\newcommand{\pder}[2]{\frac{\partial#1}{\partial#2}}
\newcommand{\normalin}{\trianglelefteq}
\newcommand{\angvec}[1]{\langle #1\rangle}
\newcommand{\varpoly}[2]{#1_{#2}x^{#2}+#1_{#2-1}x^{#2-1}\cdots +#1_1x+#1_0}
\newcommand{\varpower}[1][a]{#1_0+#1_1x+#1_1x^2+\cdots}
\newcommand{\limasto}[2][x]{\lim_{#1\rightarrow #2}}
\newenvironment{linsys}[2][m]{
\begin{array}[#1]{@{}*{#2}{rc}r@{}}
}{
\end{array}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 1.22 Numerical integration: techniques
Definition 1.22.1 . Trapezoidal rule.
Let \(f\) be an integrable function on \([a,b]\text{,}\) let \(n\) be a positive integer, and let
\begin{equation*}
a=x_0\lt x_1\lt x_2\lt \cdots \lt x_n=b
\end{equation*}
be partition of \([a,b]\) into \(n\) subintervals of equal length \(\Delta x=\frac{b-a}{n}\text{.}\)
The \(n\) -th trapezoidal estimate of \(\displaystyle\int f(x)\, dx\text{,}\) denoted \(T_n\text{,}\) is defined as
\begin{equation*}
T_n=\frac{1}{2}\Delta x(f(x_0)+2f(x_1)+2f(x_2)+\cdots +2f(x_{n-1})+f(x_n))\text{.}
\end{equation*}
The trapezoidal estimate is the result of approximating the graph of \(f\) with the polygon passing through the points \(P_0=(x_0, f(x_0)), P_1=(x_1,f(x_1)), \dots, P_n=(x_n, f(x_n))\text{.}\)
Definition 1.22.2 . Simpson’s rule.
Let \(f\) be an integrable function on \([a,b]\text{,}\) let \(n=2r\) be an even positive integer, and let
\begin{equation*}
a=x_0\lt x_1\lt x_2\lt \cdots \lt x_n=b
\end{equation*}
be partition of \([a,b]\) into \(n\) subintervals of equal length \(\Delta x=\frac{b-a}{n}\text{.}\)
The \(n\) -th Simpson’s rule estimate of \(\displaystyle\int f(x)\, dx\text{,}\) denoted \(S_n\text{,}\) is defined as
\begin{equation*}
S_n=\frac{1}{3}\Delta x(f(x_0)+4f(x_1)+2f(x_2)+\cdots +2f(x_{n-2})+4f(x_{n-1})+f(x_n))\text{.}
\end{equation*}
The Simpson’s rule estimate is the result of approximating the graph of
\(f\) over each of the
\(r\) subintervals
\([x_{2(k-1)},x_{2k}]\) with the unique “parabolic arc”
1 passing through the points
\begin{equation*}
P_{2(k-1)}=(x_{2(k-1)}, f(x_{2(k-1)})), P_{2k-1}=(x_{2k-1}, f(x_{2k-1})), P_{2k}=(x_{2k},f(x_{2k}))\text{.}
\end{equation*}
Interactive example 1.22.1 . Trapezoidal and Simpson’s rule.
Example 1.22.4 . Estimating \(\ln 4\) .
Let \(f(x)=\frac{1}{x}\text{.}\) Recall that we have by definition \(\ln 4=\int_1^4f(x)\, dx\text{.}\) Compute (a) the \(n=6\) trapezoidal estimate of \(I\text{,}\) and (b) the \(n=6\) Simpson’s rule estimate of \(I\text{.}\)
Example 1.22.5 . Estimating \(\pi\) .
Let \(f(x)=\frac{4}{x^2+1}\text{,}\) and let \(I=\int_0^1f(x)\, dx\text{.}\)
Show that \(I=\pi\text{.}\)
Estimate \(\pi\) using the \(n=6\) trapezoidal estimate of \(I\text{.}\)
Estimate \(\pi\) using the \(n=6\) Simpson’s rule estimate of \(I\text{.}\)