\documentclass{amsart}[11pt]
\usepackage{graphicx}

\addtolength{\textwidth}{1.4in}                          
\oddsidemargin=0in                          
\evensidemargin=0in       

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}
\newtheorem{fact}[example]{Fact}

\begin{document}

\title{Math 242, Lecture 7}
\maketitle

We continue our study of Riemann sums, today emphasizing the connection
to areas.  

\begin{definition}
If $f$ is a function over some interval $[a,b]$ then the Riemann sum of $f$
with $n$ terms is defined as
$$ RS_n f|_a^b = \Delta x[ f(x_0) + f(x_1) + \cdots + f(x_n)],$$
where
 $\Delta x = \frac{b-a}{n}$ and $x_i = a + i \Delta x$.  
 \end{definition}

\begin{example}
Compute the Riemann sum for the function $f(x) = x^2 - 5$ over the interval from
$0$ to $4$ with $n = 8$. 
\end{example}

Riemann sums are easy to do with the help of a computer.  

\begin{example}
Use Excel to compute the Riemann sum with everything as in the previous example
but with $n=20$.  
\end{example}


\section{ Areas and Riemann sums}  
 
 We have seen that Riemann sums arise natural when one is trying to compute
 a total displacement from velocity data, total cost from marginal cost data, etc.  
 They first arose arose historically in computing areas under curves,  
 a first step to computing areas of arbitrary shapes.  
 
 \begin{example}
 Use rectangles to approximate the area of the trapezoid which is 
 under the graph of $y = 100-32x$, above the $x$-axis and between the
 lines $x = 3$ and $x = 4$.   Compare this question with the first example
 from the previous lecture.    Use geometry to get an exact answer.  
 \end{example}
 
 As we see in this example, the areas of individual rectangles used to 
 approximate area are exactly the terms which occur in a Riemann sum.   
 This relationship is so natural, we won't muddy the waters by trying to formalize
 it.  We'll just give one more example.  
 
 \begin{example}
 Write down and (use computer to) evaluate a Riemann sum with twenty terms 
 which approximates the area under
 the curve $y = \frac{x}{x^2 + 2}$ between $x = 1$ and $x = 3$.  
 \end{example}
 


\section{ The Fundamental Theorem}  


We return to the the Fundamental Theorem of Calculus.  

The way mathematicians usually organize these ideas
is by defining $\int_a^b f(x) dx$ to be the limit as $N \to \infty$ of  
$RS_N|_a^b f(x)$.
% $f(x_1) \Delta x + f(x_2) \Delta x + \cdots + f(x_N) \Delta x$,  
%where $\Delta x = \frac{b-a}{N}$ and $x_ i = a + i \cdot \Delta x$.  
%This is independent of the interpretation in terms of area.  

\begin{theorem}[Fundamental Theorem]
$\int_a^b f(x) dx = F(b) - F(a) $ where
$F$ is any anti-derivative for $f$.  
\end{theorem}

This theorem now makes some intuitive sense, in the case where $f(x)$
is measuring the marginal change in some quantity $F(x)$.  
Adding up all of those changes yields the total change $F(b) - F(a)$.  
Indeed, we can almost (ignoring issues about limits)
see a mathematically complete proof by writing
in the definition of the derivative of $F(x_i)$ everywhere $f(x_i)$ appears
in the Riemann sums defining $\int_a^b f(x) dx $.  

\begin{example}
Use the Fundamental Theorem to find exact answers for each of the questions
we have considered so far in this lecture.
\end{example}


\end{document}
