\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 5}
\maketitle


\section{ The definite integral  and the fundamental theorem of calculus}

Today we give an overview of sections 6.3, 6.4 and 6.5 together.  We will go over these
ideas again more separately.

Areas naturally correspond to aggregate amounts.   
If the bars on a bar graph of profit are of unit width, 
then the area of the bar graph represents total profit.  
We will see that for a continuous(ly modelled) revenue stream, the
area under the marginal revenue curve represents total revenue.  

The Fundamental Theorem of Calculus will tell us
that anti-derivative computes area under a curve. 

\subsection{ Approximating areas by rectangles} 

While we do not know how to find areas of regions with curved boundaries,
we do know how to find areas of regions with straight boundaries, 
especially rectangles.    We approximate the area of a curved region
by trying to fill it (or cover it, with some ``spillage'') with rectangles. 
This method for finding curved areas, such as that inside a circle,
was known to some Greek mathematicians  but was lost until
the Renaissance and the (re?)invention of integral calculus. 

\begin{example}
Approximate the area under the curve $f(x) = x^2$ between $x=0$
and $x=1$ using ten rectangles.

We can see that ten rectangles gives a pretty good fit.  
The area of each rectangle is computed as base times height.  Each rectangle
has base of $\frac{1}{10} = 0.1$  and the $i$th rectangle has height equal to 
$f(0.1 \cdot i)$.  Thus, the total area is 

\begin{multline*}
0.1 (0.1)^2 + 0.1 (0.2)^2 + 0.1 (0.3)^2 + \cdots + 0.1 (1.0)^2   \\
= 0.1 \left[(0.1)^2 + (0.2)^2 + \cdots + (0.9)^2 + (1.0)^2 \right]   \\
= 0.1 \left[ 0.01 + 0.04 + \cdots + 0.21 + 1.00 \right]  \\
= 0.1 (3.85)  = 0.385 
\end{multline*}
\end{example}


We will see soon that the exact answer is $\frac{1}{3}$, so this approximation 
is not bad  (but not spectacularly good either). 

The general technique is as follows:  we find the area under $f(x)$ between
$x=a$ and $x=b$ by
approximating it by $N$ rectangles, each of width $\frac{b-a}{N}$.    
We let $\Delta x = \frac{b-a}{N}$ to save writing,  and also let
$x_i = a + \Delta x \cdot i$, the place of the dividing line between the $i$th
rectangle and the $i+1$st.   Then the area of these $N$ rectangles is 
\begin{equation}
 f(x_1) \Delta x + f(x_2) \Delta x + \cdots + f(x_N) \Delta x 
 = \Delta x\left[ f(x_1) + f(x_2) + \cdots + f(x_N) \right] 
 \end{equation} 
 
 

If we let $N$ get larger and larger, we get a better approximation to the
area, leading to the following. 

\begin{theorem}
If $f(x)$ is continuous, the area under the graph of $f$ between $x=a$ 
and $x = b$ is $$\lim_{N \to \infty} \left( \frac{b-a}{N}\right) \left[ f(x_1) + \cdots + f(x_N)\right]$$. 
\end{theorem}

\subsection{The (First) Fundamental Theorem}

As we know well, computing limits can be a difficult process,  and in this case
the function whose limit we take is complicated.   One of the best theorems in
all of mathematics gives us an easy way to find this area using the anti-derivative. 

\begin{theorem}[First Fundamental Theorem]
Let $F(x)$ be an anti-derivative of $f(x)$.   Then the area under $f(x)$ between
$x= a$ and $x=b$ is equal to $F(b) - F(a)$. 
\end{theorem}

\begin{example}
\begin{itemize}
\item Find the area under $f(x) = x^2$ between $x= 0$ and $x=1$  and between
$x = 2$ and $x = 5$. 
\item Find the area under $f(x) = e^x$ between $x = 0$ and $x = 3$. 
\item Find the area under $f(x) = \frac{1}{x}$ between $x=1$ and $x=2$ 
and between $1$ and $4$  and between $1$ and $10$  and in general
between $1$ and $a$ where $a > 1$ is any number. 
\end{itemize}

\end{example}

Question: why would using any anti-derivative give the same answer when
using the Fundamental Theorem?

We will revisit the process of defining the definite integral as a sum and 
the Fundamental Theorem in our next lectures.

\end{document}

Today we practice using the Fundamental Theorem of Calculus (FTC).   We start
by rounding out the development of the FTC. 

\begin{itemize}
\item The FTC replaces a complicated limit which computes area by 
a simple evaluation of the anti-derivative  - an amazing savings of
effort when it applies.   For many applied problems, needing only
approximate answers, it can be easier for a computer to use 
rectangular approximation with a large number of rectangles. 
Moreover, some functions cannot be anti-differentiated, 
so the rectangular method is all that's available. 

\item The area between the graph of a function and the $x$-axis, 
which sits over the curve when the function is negative,  counts
as ``negative area'' when computing through the fundamental theorem. 
This isn't as strange as it sounds  - in examples we will see when we compute
with revenue streams, negative marginal revenues do decrease total revenue. 
To count all area between the graph and the $x$-axis as positive, you need to 
use absolute value and/or break up the function as we will see in examples below. 

\item It is often helpful to sketch the region whose area is being computed by 
an integral.   In some cases one can get an idea of what the answer should
be so that there's some chance you can catch an error in computation. 

\item Notation:  it is customary to denote the area of the region between the graph
of $f(x)$ and the $x$-axis,  between $x=a$ and $x=b$,  counted as negative
area when $f(x)$ is negative area,  as $\int_a^b f(x) dx$.    This is 
also called the definite integral  from $a$ to $b$ of $f(x)$,  with $a$ and
$b$ known as the limits of integration  (not to be confused with
taking some limit).   

In this notation, the FTC 
states that if $F(x)$ is an anti-derivative for $f(x)$ then $\int_a^b f(x) dx = F(b) - F(a)$. 

\end{itemize}
\begin{example}
\begin{itemize}
\item Find the total area  (counting all area as positive)
between the graph of $f(x) = x^2 - 1$  and the $x$-axis for $x$
values between $x=-1$ and $x=2$. 
\item Find the total area 
between the graph of $e^x - 2$ and the $x$-axis from $x = 0$ and $x = 2$. 
\item Find the area of a triangle with side lengths $3$ and $5$ by 
evaluating $\int_0^5 \left( \frac{3}{5} x \right) dx$.   
\item Set up and evaluate
an integral which computes the area of a trapezoid of height 2
and bases $3$ and $6$. 

\end{itemize}
\end{example}



Finally we give the following important 
WARNING!   If you use a $u$-substitution to 
find an anti-derivative to evaluate a definite integral,  
then you must either make sure to substitute back in
for $u$ in order to use the limits of integration for $x$, 
or you have to substitute in for the limits of integration. 

For example, to evaluate $\int_1^2 e^{2x} 2dx$, we want
to substitute $u = 2x$.   We can either
change the indefinite integral to $\int e^u du$,  which has 
$e^u$ as an anti-derivative,  and then plug $2x$ in 
for $u$ to get an anti-derivative of $e^{2x}$ for our 
original function,  which
we evaluate to get $e^{2\cdot 2} - e^{2\cdot 1} = e^4 - e^2$. 
Or, when we plug in $u = 2x$ then we also observe
that when $x = 1$, $u =2$ and when $x = 2$, $u = 4$. 
So we change the {\em definite} integral to 
$\int_2^4 e^u du$, which gives the same answer. 
Which approach you choose is a matter of taste. 
What is INCORRECT is to change the integral
to $\int_1^2 e^u du$. 


\begin{example}
\begin{itemize}
\item Find the area under the graph of $f(x) = x^2 \sqrt{x^3 + 8}$ between $x = 1$
and $x = 2$. 
\item Evaluate $\int_{\frac{1}{2}}^4 \left(\frac{\ln x}{x} \right) dx$. 
\item Evaluate $\int_{e^2}^{e^4} \frac{1}{x \ln x} dx$.
\end{itemize}
\end{example}

Finally, note that the indefinite integral is useful in the process
of finding the total change of a quantity whose marginal
values  - that is, derivative  - is given.    Looking at the FTC
in a different light, we see that for any function $f$ whose derivative
exists, and any two numbers $a$ and $b$ then
$f(a) - f(b) = \int_a^b f'(x) dx$,  so we can recover the difference
in value of $f$ between $a$ and $b$ if we are given the
derivative of $f$.  

\begin{example}
\begin{itemize}
\item Find the total distance travelled by a car whose velocity is  
given by $55 + 3t$ miles per hour over three hours.  (Check the answer
against how far it would travel if it travelled only at 55 or only at 64 mph).  
\item Find the cost of raising production from $4$ to $9$ units (measured
in thousands) when the marginal cost is $5 - q + 3q^2$ dollars
per unit. 
\end{itemize}
\end{example}

\end{document}
 