\documentclass[11pt]{beamer}
%\usetheme{Darmstadt}
 \mode<presentation>
{
  \setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]
   \usetheme{Boadilla}
  %\usetheme{Warsaw}
  \usefonttheme[onlysmall]{structurebold}
}
\usepackage{multimedia,hyperref}
\usepackage{mpmulti}
%\usepackage{times}

\usepackage{graphicx}
\usepackage{amsfonts, amssymb, amsmath, amsthm, psfrag, epsfig}
\setbeamercovered{dynamic}
\usefonttheme{professionalfonts}

\newtheorem{property}{Property}
\theoremstyle{definition}
\newtheorem{algorithm}{Algorithm}
%\newtheorem{definition}{Definition}[section]
%\newtheorem{lemma}{Lemma}%[section]
%\newtheorem{corollary}{Corollary}%[section]
%\newtheorem{proposition}[definition]{Proposition}
%\newtheorem{theorem}{Theorem}%[section]
\newtheorem{remark}{Remark}%[section]
%\newtheorem{example}{Example}%[section]

%\newcommand{\textrr}{\textcolor[rgb]{0.7,0.00,0.00}}
%\newcommand{\textgg}{\textcolor[rgb]{0.00,0.7,0.00}}
%\newcommand{\textbb}{\textcolor[rgb]{0.00,0.0,0.7}}
\newcommand{\textrr}{\textcolor{red}}
\newcommand{\textgg}{\textcolor{green}}
\newcommand{\textbb}{\textcolor{blue}}
\pgfdeclareimage[height=1cm]{university-logo}{logo}
\logo{\pgfuseimage{university-logo}}

\newenvironment{mat}{\left[\begin{array}}{\end{array}\right]}
\newenvironment{dt}{\left|\begin{array}}{\end{array}\right|}

\def\rr{\mathbb{R}}
\def\rnn{\mathbb{R}^{n\times n}}
\def\rtnn{\mathbb{R}^{{2n}\times {2n}}}
\def\rnm{\mathbb{R}^{n\times m}}
\def\rmn{\mathbb{R}^{m\times n}}
\def\rmm{\mathbb{R}^{m\times m}}
\def\rkk{\mathbb{R}^{k\times k}}
\def\rkm{\mathbb{R}^{k\times m}}
\def\cnn{\mathbb{C}^{n\times n}}
\def\cn{\mathbb{C}^{n}}
\def\dis{\displaystyle}
\def\hm{\widehat{M}}
\def\hl{\widehat{L}}

\title[Numerical Integration]{Numerical Integration}
\author[T.M. Huang]{Tsung-Ming Huang}
 \institute[Nat. Taiwan Normal
Univ.]{Department of Mathematics\\National Taiwan Normal University,
Taiwan}
%\\E-mail: min@math.ntnu.edu.tw}} %87_0a8d4ab6.pdf
%\date{July 16--20, 2007, ICIAM07}


\begin{document}

\frame{\titlepage}

\begin{frame}


If we choose $x_{0} = a$, $x_{1} = \frac{1}{2}(a + b)$, $x_{2} = b$,
$ h = (b - a)/2$, and the second order Lagrange polynomial 
to interpolate $f(x)$, then
    \begin{eqnarray*}
        \int_a^b f(x) dx &=& \int_{x_0}^{x_2} \left[
        \frac{(x - x_{1})(x - x_{2})}{(x_{0} - x_{1})(x_{0} -
        x_{2})} f(x_{0}) + \frac{(x - x_{0})(x - x_{2})}{(x_{1} - x_{0})(x_{1} -
        x_{2})} f(x_{1}) \right. \\
        && \left. + \frac{(x - x_{0})(x - x_{1})}{(x_{2} - x_{0})(x_{2} -
        x_{1})} f(x_{2}) \right] dx \\
        && + \int_{x_0}^{x_2} \frac{(x-x_0)(x-x_1)(x-x_2)}{6}
        f^{(3)}  ( \zeta(x) ) dx.
    \end{eqnarray*}

    \begin{figure}[t] %\sidecaption
        \centering
        \resizebox{5.5cm}{!}{\includegraphics{SimpRul.pdf}}
    \end{figure}
\end{frame}


\begin{frame}
It holds that
\begin{eqnarray*}
   \int_a^b f(x) dx
   &=& h \left[ \frac{1}{3} f(x_0) + \frac{4}{3} f(x_1)
     + \frac{1}{3} f(x_2) \right] \\
   && + \int_{x_0}^{x_2} \frac{(x-x_0)(x-x_1)(x-x_2)}{6}
        f^{(3)}  ( \zeta(x) ) dx.
\end{eqnarray*}

It can show that there exists $\xi \in (a,b)$ such that
\[
   \int_{a}^{b} f(x) \, dx =
   \frac{h}{3} \left[ f(x_{0}) + 4 f(x_{1})
   + f(x_{2}) \right]
   - \frac{f^{(4)}(\xi)}{90} h^{5}.
\]
%
This gives the {\textcolor{blue}{Simpson's rule formulation}}.
\end{frame}

\begin{frame}
To illustrate the procedure, we choose an even integer
$n$ and partition the interval $[a,b]$ into $n$ subintervals
by nodes $a = x_{0} < x_{1} < \cdots < x_{n} = b$, and apply
Simpson's rule on each consecutive pair of subintervals.
With
%
\[
   h = \frac{b - a}{n} \quad \text{and} \quad
   x_{j} = a + j h, \quad j = 0, 1, \ldots, n,
\]
%
we have on each interval $[x_{2j-2}, x_{2j}]$,
%
\[
   \int_{x_{2j-2}}^{x_{2j}} f(x) \, dx
   = \frac{h}{3} \left[ f(x_{2j-2}) + 4 f(x_{2j-1}) + f(x_{2j}) \right]
    - \frac{h^{5}}{90} f^{(4)}(\xi_{j}),
\]
for some $\xi_{j} \in (x_{2j-2},x_{2j})$, provided that
$f \in C^{4}[a,b]$.


\begin{figure}[ht]
\begin{center}
%\resizebox{5cm}{!}{\includegraphics{CompSimpRule.pdf}}
\resizebox{5cm}{!}{\includegraphics{CompNumInt.pdf}}
\end{center}
\end{figure}

\end{frame}

\begin{frame}
The composite rule is obtained by summing up
over the entire interval, that is,
%
\begin{eqnarray*}
   \int_{a}^{b} f(x) \, dx
   & = &
   \sum_{j=1}^{n/2} \int_{x_{2j-2}}^{x_{2j}} f(x) \, dx  \\
%
   & = &
   \sum_{j=1}^{n/2} \left[ \frac{h}{3} \left( f(x_{2j-2})
   + 4 f(x_{2j-1}) + f(x_{2j}) \right)
   - \frac{h^{5}}{90} f^{(4)}(\xi_{j}) \right]  \\
%
   & = &
   \frac{h}{3} \left[ f(x_{0}) + 4 f(x_{1}) + f(x_{2})  \right. \\
   && \hspace{2mm} + f(x_{2})
   + 4 f(x_{3}) + f(x_{4}) \\
   && \hspace{2mm} + f(x_{4}) + 4 f(x_{5}) + f(x_6) \\
   & & \hspace{22mm} \vdots \\
   && \left. \hspace{2mm}
   + f(x_{n-2}) + 4 f(x_{n-1}) + f(x_{n})  \right]
   - \frac{h^{5}}{90} \sum_{j=1}^{n/2} f^{(4)}(\xi_{j})
\end{eqnarray*}
\end{frame}

\begin{frame}
Hence
\begin{eqnarray*}
%
   \int_{a}^{b} f(x) \, dx& = &
   \frac{h}{3} \left[ f(x_{0}) + 4 f(x_{1}) + 2 f(x_{2})
   + 4 f(x_{3}) + 2 f(x_{4}) + 4 f(x_{5})  \right.  \\
   & &
   \left. + \cdots
   + 2 f(x_{n-2}) + 4 f(x_{n-1}) + f(x_{n})  \right]
   - \frac{h^{5}}{90} \sum_{j=1}^{n/2} f^{(4)}(\xi_{j})   \\
%
   & = &
   \frac{h}{3} \left[ f(x_{0}) + 4 \sum_{j=1}^{n/2} f(x_{2j-1})
   + 2 \sum_{j=1}^{(n/2)-1} f(x_{2j}) + f(x_{n}) \right] \\
   && - \frac{b - a}{180} f^{(4)}(\mu) h^{4},
\end{eqnarray*}
for some $\mu \in (a,b)$. 
\end{frame}


\begin{frame}
\begin{block}{Composite Simpson's Rule}
%
\begin{eqnarray*}
   \int_{a}^{b} f(x) \, dx
   &=& \frac{h}{3} \left[ f(a) + 4 \sum_{j=1}^{n/2} f(x_{2j-1})
     + 2 \sum_{j=1}^{(n/2)-1} f(x_{2j}) + f(b) \right] \\
   &&  - \frac{b - a}{180} f^{(4)}(\mu) h^{4},
\end{eqnarray*}
%
where $n$ is an even integer, $h = (b - a)/n$, $x_{j} = a + j h$,
for $j = 0, 1, \ldots, n$, and some $\mu \in (a,b)$.
\end{block}
\end{frame}

\end{document}
