\documentclass{article}
%The following imports commands created for formatting lecture notes.
%This is custom-made and not part of a latex install.
\usepackage{lectures}
%Define your course info here
\institution{SIAST Palliser Campus}
\department{Mathematics}
\course{MAT 235}
\unittitle{The Definite Integral}
\unitnumber{2}
\date{September 2011}
\title{STUDY GUIDE}
\author{Alan Dill and Robert G. Petry}
%Note that the publisher is just the distributor of the printed copies and
%has no other claim on the document.  (See the GFDL license.)  It can be
%either a person or entity.
\publisher{the Department of Mathematics, SIAST Palliser Campus}
\begin{document}
%Create title page
\makeunittitle
%Include the copyright, etc. page.  Placed in a separate latex file for
%convenience.
\input{copyright_unit2}
%Reset the pages to start the actual content and change to arabic numbering
%since \makeunittitle set it to roman numerals.
\setcounter{page}{1}
\pagenumbering{arabic}
\section{Area Under a Curve}
There are a number of methods we can use for approximating the area
under a curve between two given points. These include:
\begin{itemize}
\item \parbox[t]{.4\textwidth}{sketching a triangle or rectangle of
    approximately the same area as the area under the curve and
    calculating the area}\hspace{.1\textwidth}
  \raisebox{-5em}{\includegraphics[width=.3\textwidth,keepaspectratio=,clip=]{Unit2figs-img1.pdf}}
\item \parbox[t]{.4\textwidth}{subdividing the area under the curve
    into squares, counting the squares and multiplying by the area of
    one square (this is most easily done using squared
    paper)}\hspace{.1\textwidth}
  \raisebox{-7em}{\includegraphics[width=.3\textwidth,keepaspectratio=,clip=]{Unit2figs-img2.pdf}}
\item \parbox[t]{.4\textwidth}{subdividing the area under the curve
    into rectangular panels of known width, whose height is equal to
    the height of the curve at some point between the sides of the
    rectangle, and summing the areas of the
    rectangles}\hspace{.1\textwidth}
  \raisebox{-6.5em}{\includegraphics[width=.3\textwidth,keepaspectratio=,clip=]{Unit2figs-img3.pdf}}
\end{itemize}
The first of these methods is the least accurate, but is good for
getting a quick estimate.  The accuracy of the second and third
methods increases as the number of squares or rectangular panels
increases.

\subsection{The Midpoint Method}
\parbox[t]{.7\textwidth}{When using the third of the above
methods, we need to decide at which point in the panels to take the
height of the curve as the height of the panel.  It turns out that, in
most cases, we will get the best approximation of the area under the
curve by defining the height of each panel as the height of the curve
(i.e.  the value of the function) at the \emph{midpoint} of the
panel.  By doing this we will, to a large extent, balance out the
extra area of the parts of the panels extending above the curve with
the missing area of the parts of the panels that fall below the curve.}
\hspace{.01\textwidth}
\raisebox{-9em}{\includegraphics[width=.29\textwidth,keepaspectratio=,clip=]{Unit2figs-img4.pdf}}

We call this approach the \emph{midpoint method}.  It should be fairly
obvious that, as we decrease the width and increase the number of
rectangular panels, the accuracy of the estimate also increases.

In symbols, we can write the sum of the areas found using the midpoint
method as follows:
\begin{boxedequation}
A_{ab}\approx\sum_{i=1}^n f(x_i^*)\Delta x =f(x_1^*)\Delta x +\cdots + f(x_n^*)\Delta x
\end{boxedequation}
where $f(x_i^*)$ is the value of the function at the midpoint $x_i^*$
of each panel, and $\Delta x$ is the width of each panel, $\Delta
x=\frac{b-a}{n}$.  $A_{ab}$ is the actual area under the curve $f(x)$
between $x=a$ and $x=b$.

\textbf{Examples}
\begin{enumerate}
\item Estimate each of the following areas by sketching a triangle or
rectangle:
\begin{enumerate}
\item the area under the curve $y = x^2$ from $x = 1$ to $x = 4$
\item the area given in Problem 6, p. 879 of the text
\end{enumerate}
\item Estimate the area under the curve $y=\sqrt{2x+1}$ from $x=1$ to
  $x=7$ by the midpoint method.
\begin{enumerate}
\item using panels of width 2
\item using panels of width 1
\end{enumerate}
\end{enumerate}

\textassignment{Sec. 30-5, pp. 875-879}{Ex. 5, p. 879 \# 1-9 (odd), 17, 18, 19, 20}

\clearpage
\section{The Definite Integral}

If we are asked to approximate the area under the curve of a given
mathematical function between two given $x$-values, we can inscribe
rectangles between the curve and the $x$-axis and add the areas of
these rectangles.  If only a few such rectangles were used, we would
only get a rough approximation of the area.  If, however, we were to
use a larger number of rectangles, the amount of ``empty space'' above
the rectangles would be decreased, and we would get a better
approximation of the area.  (See the two diagrams in
Figure~\vref{fig:approxarea}, which illustrate this idea.)

\begin{figure}[h]
\begin{center}
\includegraphics[width=.4\textwidth,keepaspectratio=,clip=]{Unit2figs-img5.pdf}
\hspace{.1\textwidth}
\includegraphics[width=.4\textwidth,keepaspectratio=,clip=]{Unit2figs-img6.pdf}
\end{center}
\caption{\label{fig:approxarea} Approximating the area under a curve.}
\end{figure}

If you imagine that the number of rectangles is increased without bound,
the sum of the areas of the rectangles will approach a limiting value
that is equal to the exact area under the curve.

\parbox[t]{.6\textwidth}{In general, the area under a curve $y=f(x)$ is given by
\[A = \lim_{n\rightarrow\infty}\sum_{i=1}^n f(x_i)\Delta x\]
where
\[\Delta x = \frac{b-a}{n}\]
}
\hspace{.02\textwidth}
\raisebox{-9em}{\includegraphics[width=.38\textwidth,keepaspectratio=,clip=]{Unit2figs-img7.pdf}}

\parbox[t]{.6\textwidth}{Let $\Delta A$ represent the area \emph{PQSU}
  under the curve.
\begin{eqnarray}
  A_{PQRU} & \le & \Delta A \ \ \le \ A_{PQST} \nonumber \\
  y\Delta x & \le & \Delta A \ \ \le \ (y+\Delta y)\Delta x \nonumber
\end{eqnarray}
Dividing by $\Delta x$ gives
\[y \le \frac{\Delta A}{\Delta x}\le y+\Delta y\]}
\hspace{.02\textwidth}
\raisebox{-9em}{\includegraphics[width=.38\textwidth,keepaspectratio=,clip=]{Unit2figs-img8.pdf}}

Taking the limit as $\Delta x$ approaches zero, we get
\[y\le \lim_{\Delta x \rightarrow 0}\frac{\Delta A}{\Delta x}\le y\]

since, as $\Delta x \rightarrow 0$, $\Delta y \rightarrow 0$.

The middle term, which is ``sandwiched'' between two terms that both
become equal to {y} in the limit, is, in fact, the derivative of the
area with respect to $x$, i.e. $dA/dx$.  Thus, we can write

\[\frac{dA}{dx}= y\]

In differential form this becomes what one would intuitively expect
for the infinitessimal area $dA$ of the rectangle of height $y$ and
infinitessimal width $dx$, namely

\[dA = y\;dx\]

Taking the integral of both sides, we get

\[\int dA = \int y\;dx\]

But the integral of $dA$ is, by definition, $A$.  Using the notation
$A_{ax}$ to represent the area between $x=a$ and any given value of
$x$, we can write

\[A_{ax} = F(x)+C\]

where $F(x)$ is the antiderivative of the function $y$, and $C$ is the
constant of integration.

The area between $x = a$ and $x = a$ must, of course be zero.  We can
use this information to determine the constant C.

\[A_{aa} = F(a) + C = 0\]

Solving for {C}, we get

\[C = -F(a)\]

We can then write an expression for the area between $x=a$ and
$x=b$:
\[A_{ab} = F(b) + C\]

Substituting $C = -F(a)$ we get

\[A_{ab} = F(b) - F(a)\]

This leads us to the following formal definition of the definite integral.

We define the \emph{definite integral} of a function $y = f(x)$
as follows:
\begin{boxedequation}
\int_{a}^{b}f(x)\;dx = F(b)-F(a)
\end{boxedequation}
where $a$ and $b$ are called the \emph{limits of integration}.  $F(b)$
and $F(a)$ are the values of the integral (or antiderivative) for $x =
b$ and $x = a$ respectively.

As we have shown above, the definite integral is numerically equal to
the area under the curve $y = f(x)$ between $x = a$ and $x = b$, i.e.
\begin{boxedequation}
A_{ab} = \int_{a}^{b}f(x)\;dx = F(b) - F(a)
\end{boxedequation}

It should be noted that the area $A_{ab}$ will be \emph{negative} if
the function lies below the $x$-axis (i.e. is negative) over the
interval $[a,b]$.

\textbf{Examples}
\begin{enumerate}
\item Find the exact area under the curve $y=\sqrt{2x+1}$ from $x=1$ to
$x=7$.  (This is the same area that we estimated earlier by
the midpoint method.)
\newline
Evaluate the following definite integrals.  Give the answers in exact
form, and in approximate form to 3 significant digits.

\item $\displaystyle \int_2^3\frac{1}{x^2}\;dx$

\item $\displaystyle \int_{-1}^2(x^2-7)x\;dx$

\item $\displaystyle \int_0^1\frac{x\;dx}{\sqrt{2-x^2}}$

\item $\displaystyle \int_{-1.6}^{0.7}\sqrt[3]{1-x}\;dx$

\item $\displaystyle \int_1^e\frac{dx}{x}$

\item $\displaystyle \int_0^2\frac{dx}{8-3x}$
\end{enumerate}

\clearpage
\textbf{Additional Examples} (Text, p. 875)
\begin{itemize}
\item Problem 6
\item Problem 8
\item Problem 12
\end{itemize}

\textassignment{Secs. 30-4, 30-6; pp. 873-875, 880-882}
{Ex. 4, p. 875 \# 1-14 (all); Ex. 6, p. 883 \# 1-12 (all)}
\clearpage

\section{Numerical Integration}

We have seen that we can find the exact area under a curve by finding
the definite integral.  This works well as long as the function is one
that we can integrate using the rules for integration or the table of
integrals.  This may not always be the case.  The function may be one
that cannot be integrated, or it may be given in the form of a table of
values rather than an algebraic expression.  In cases like these, we
can use numerical methods to find the value of the definite integral to
whatever degree of accuracy we need, using a calculator or computer.

We have already seen one numerical method for approximating areas
under a curve -- the midpoint method.  We will look at two more
methods that give us more accuracy than the midpoint method for a
given number of intervals -- the trapezoidal rule and Simpson's rule.
Of course, the accuracy of all three methods is improved by increasing
the number of intervals.  When the number of intervals is very large,
a computer is absolutely essential.

\subsection{The Trapezoidal Rule}

\begin{minipage}{.5\textwidth}\setlength{\parskip}{\docparskip}
In the diagram shown on the right, suppose we wish to estimate the
area under the curve \mbox{$y=f(x)$} between $x = a$ and $x = b$.

We have divided the interval from $x = a$ to $x = b$ into $n$ equal
intervals of width $h$. If we join the tops of the vertical lines by
straight line segments, we form trapezoids each of whose areas is
\emph{approximately} equal to the area under the curve between
successive $x$-values.
\end{minipage}
\hspace{.02\textwidth}
\raisebox{-6em}{\includegraphics[width=.48\textwidth,keepaspectratio=,clip=]{Unit2figs-img9.pdf}}

The height of each trapezoid (measured horizontally) is equal to
$h$, and the lengths of the parallel sides are equal to the
$y$-values on either side of the trapezoid.  Making use of the
fact that the area of a trapezoid is equal to half the height times the
sum of the parallel sides, we get the following expression for the sum
of the areas of the trapezoids between $a$ and $b$:
\[A_T=\frac{1}{2}h(y_0+y_1)+\frac{1}{2}h(y_1+y_2)+\frac{1}{2}h(y_2+y_3)+\cdots
+\frac{1}{2}h(y_{n-2}+y_{n-1})+\frac{1}{2}h(y_{n-1}+y_{n})\]
Factoring out the common factor  ${\frac{1}{2}h}$ and collecting like
terms, we get
\begin{eqnarray}
A_T & = & \frac{h}{2}\left[y_0+y_1+y_1+y_2+y_2+\cdots
+y_{n-1}+y_{n-1}+y_n\right] \nonumber \\
& = & \frac{h}{2}\left[y_0+2y_1+2y_2+\cdots+2y_{n-1}+y_n\right]\nonumber
%& = & \frac{h}{2}\left[y_0+2\left(y_1+y_2+\cdots
%+y_{n-1}\right)+y_n\right]\nonumber
\end{eqnarray}

Since the sum of the areas of the trapezoids is approximately equal to
the area under the curve from $a$ to $b$, which is in
turn equal to the definite integral from $a$ to $b$, we
can state the following formula, called the \emph{trapezoidal rule}:
\begin{boxedequation}
\int_a^bf(x)\;dx\approx \frac{h}{2}\left[y_0+2\left(y_1+y_2+\cdots
+y_{n-1}\right)+y_n\right]
\end{boxedequation}
where  $h=\frac{b-a}{n}$ and $n$ is the number of intervals
used.

It should be fairly obvious that, as the number of intervals is
increased and the width of the intervals is decreased, the area of
each trapezoid approaches the area under the curve for each interval
more and more closely.  Thus any desired degree of accuracy can be
obtained simply by using a sufficiently large number of intervals.

It should be noted that the trapezoidal rule can be used whether the
function is given as a mathematical equation or as a table of values. 
Also, it can be used to evaluate a definite integral even for a
function that cannot be integrated analytically.

\textbf{Examples}
\begin{itemize}
\item Evaluate the definite integral $\int_0^{10}x^\frac{3}{2}\;dx$
  \begin{enumerate}
  \item using the trapezoidal rule
    \begin{enumerate}
    \item with 5 panels of equal width
    \item with 10 panels of equal width
    \end{enumerate}
  \item by integration
  \end{enumerate}
  Carry 6 significant digits and round your answers to 4 significant
  digits.  Compare each of your results for part~(a) with the answer
  found in part~(b).
\end{itemize}
\textbf{Additional Examples} (Text, p. 1000)
\begin{itemize}
\item Problem 2
\item Problem 6
\item Problem 10
\item Problem 14
\end{itemize}

\textassignment{Sec. 34-9, pp. 996 to 998}
{Ex. 9, p. 1000 \# 1-17 (odd) -- use trapezoidal rule only}
\clearpage

\subsection{Simpson's Rule}
In the previous section, we approximated the area under a curve by
summing the areas of trapezoids formed by connecting successive points
of the curve with straight-line segments.  Suppose that, instead of
straight-line segments, we connect each successive set of three points
on the curve with a parabolic arc.  This leads to a formula called
\emph{Simpson's Rule}, which is derived in the text (pp. 998-1000).
According to Simpson's Rule, the definite integral of a function
between two points is given by the following formula:
\begin{boxedequation}
\int_a^bf(x)\;dx\approx \frac{h}{3}\left[y_0+4y_1+2y_2+\cdots
  +2y_{n-2}+4y_{n-1}+y_n\right]
\end{boxedequation}
where $h=\frac{b-a}{n}$ is the width
of each panel and $n$ is the number of panels.

It is intuitively clear that, by using parabolic arcs instead of
straight line segments to join the points on a curve, we should get a
better approximation of the area under a curve for the same number of
intervals.

It should be noted that, in order to apply Simpson's
Rule, we must have an \emph{even} number of intervals.

As was the case with the trapezoidal rule, using more intervals leads to
higher accuracy.

\textbf{Example}
\begin{itemize}
\item Evaluate the definite integral $\int_0^{10}x^\frac{3}{2}\;dx$
  using Simpson's rule with 10 intervals.  Carry 6 significant digits
  and round your answer to 4 significant digits.  Compare your answer
  to that found on the previous page using the trapezoidal rule, and
  to the answer found by integration.
\end{itemize}
\textbf{Additional Examples} (Text, p. 1000)
\begin{itemize}
\item Problem 12
\item Problem 16
\end{itemize}

\textassignment{Sec 34-9, pp. 998-1000}
{Ex. 9, p. 1000 \# 1-17 (odd) -- use Simpson's rule only}
\clearpage

\section{Review Problems: The Definite Integral}
\textbf{Questions:}
\begin{enumerate}

\item Evaluate the following definite integrals.  Give the answers in exact
  form and in approximate decimal form to three significant digits.
  \begin{enumerate}
  \item $\displaystyle \int_1^3x^2(3x^3-1)^2\;dx$
  \item $\displaystyle \int_0^1\frac{t\;dt}{4+t^2}$
  \end{enumerate}

\item Given the function $y = 2x^3+ 5$,
  \begin{enumerate}
  \item Use \emph{Simpson's rule} with 4 intervals to find the
    approximate area under the curve between $x = 0$ and $x = 4$.
  \item Find the \emph{exact} area under the above curve from $x = 0$
    to $x = 4$ by integration.
  \end{enumerate}
  (Note: If your answers to (a) and (b) are not reasonably close to
  each other, you'd better recheck your work!)

\item  Use the \emph{trapezoidal rule} to find the approximate area under
the curve defined by the following set of experimental data:

\begin{center}
\begin{tabular}{|c||r|r|r|r|r|r|}\hline
  x &
  5.0 &
  6.0 &
  7.0 &
  8.0 &
  9.0 &
  10.0 \\ \hline
  y &
  4.2 &
  3.9 &
  3.8 &
  4.0 &
  3.5 &
  3.4\\\hline
\end{tabular}
\end{center}
\item Additional Review Problems:
\begin{itemize}
\item Chapter 30 Review Problems (p. 883)  \# 10-14 (all) , 28, 29
\item Chapter 34 Review Problems (p. 1002) \# 21 (use the trapezoidal rule
with 8 intervals)
\end{itemize}

\end{enumerate}

\clearpage
\textbf{Answers:}
\begin{enumerate}

\item \begin{enumerate}
  \item $\frac{56,888}{3}\approx 1.90\times 10^4$
  \item $\frac{1}{2}(\ln 5-\ln 4)\approx 0.112$
  \end{enumerate}

\item \begin{enumerate}
    \item 148 square units
    \item 148 square units
    \end{enumerate}

\item 19 square units

\item (Answers to Even-Numbered Review Problems):
\begin{itemize}
\item Chapter 30:
  \begin{description}
  \item[10.] $\ln 2 \approx 0.693$
  \item[12.] $\frac{\ln 2}{2}\approx 0.347$
  \item[14.] $-\frac{14}{9}\approx-1.56$
  \item[28.] $280$
  \end{description}
\end{itemize}    

\end{enumerate}
\clearpage
\section{Formulas}
\begin{center}
\textbf{\large The Definite Integral}
\end{center}
\setcounter{equation}{0}
\begin{boxedequation}
\int_{a}^{b}f(x)\;dx = F(b)-F(a)
\end{boxedequation}
where $F$ is the antiderivative (indefinite integral) of $f$.

\vspace{\parskip}
\begin{boxedequation}
A_{ab} = \int_{a}^{b}f(x)\;dx
\end{boxedequation}
where $A_{ab}$ is the area under the curve $f(x)$ between $x=a$ and $x=b$.

\begin{center}
\textbf{\large Numerical Approximations of the Definite Integral}
\end{center}

\emph{Midpoint Method}:
\begin{boxedequation}
  \int_{a}^{b}f(x)\;dx \approx\sum_{i=1}^n f(x_i^*)\Delta
  x=f(x_1^*)\Delta x +\cdots + f(x_n^*)\Delta x
\end{boxedequation}
where $f(x_i^*)$ is the value of the function at the midpoint $x_i^*$ of
each panel, $n$ is the number of panels, and $\Delta x$ is the width
of each panel, $\Delta x=\frac{b-a}{n}$.

\emph{Trapezoidal rule}:
\begin{boxedequation}
\int_a^bf(x)\;dx\approx \frac{h}{2}\left[y_0+2\left(y_1+y_2+\cdots
+y_{n-1}\right)+y_n\right]
\end{boxedequation}
where $h=\frac{b-a}{n}$, $n$ is the number of intervals used, and
$y_i=f(x_i)$.

\emph{Simpson's Rule}:
\begin{boxedequation}
\int_a^bf(x)\;dx\approx \frac{h}{3}\left[y_0+4y_1+2y_2+\cdots
  +2y_{n-2}+4y_{n-1}+y_n\right]
\end{boxedequation}
where $h=\frac{b-a}{n}$ is the width of each panel, $n$ is the (even)
number of panels, and $y_i=f(x_i)$.
% Print the license
\gfdlsinglenewpage
\end{document}
