$\newenvironment {prompt}{}{} \newcommand {\ungraded }{} \newcommand {\todo }{} \newcommand {\oiint }{{\large \bigcirc }\kern -1.56em\iint } \newcommand {\mooculus }{\textsf {\textbf {MOOC}\textnormal {\textsf {ULUS}}}} \newcommand {\npnoround }{\nprounddigits {-1}} \newcommand {\npnoroundexp }{\nproundexpdigits {-1}} \newcommand {\npunitcommand }{\ensuremath {\mathrm {#1}}} \newcommand {\RR }{\mathbb R} \newcommand {\R }{\mathbb R} \newcommand {\N }{\mathbb N} \newcommand {\Z }{\mathbb Z} \newcommand {\sagemath }{\textsf {SageMath}} \newcommand {\d }{\mathop {}\!d} \newcommand {\l }{\ell } \newcommand {\ddx }{\frac {d}{\d x}} \newcommand {\zeroOverZero }{\ensuremath {\boldsymbol {\tfrac {0}{0}}}} \newcommand {\inftyOverInfty }{\ensuremath {\boldsymbol {\tfrac {\infty }{\infty }}}} \newcommand {\zeroOverInfty }{\ensuremath {\boldsymbol {\tfrac {0}{\infty }}}} \newcommand {\zeroTimesInfty }{\ensuremath {\small \boldsymbol {0\cdot \infty }}} \newcommand {\inftyMinusInfty }{\ensuremath {\small \boldsymbol {\infty -\infty }}} \newcommand {\oneToInfty }{\ensuremath {\boldsymbol {1^\infty }}} \newcommand {\zeroToZero }{\ensuremath {\boldsymbol {0^0}}} \newcommand {\inftyToZero }{\ensuremath {\boldsymbol {\infty ^0}}} \newcommand {\numOverZero }{\ensuremath {\boldsymbol {\tfrac {\#}{0}}}} \newcommand {\dfn }{\textbf } \newcommand {\unit }{\mathop {}\!\mathrm } \newcommand {\eval }{\bigg [ #1 \bigg ]} \newcommand {\seq }{\left ( #1 \right )} \newcommand {\epsilon }{\varepsilon } \newcommand {\phi }{\varphi } \newcommand {\iff }{\Leftrightarrow } \DeclareMathOperator {\arccot }{arccot} \DeclareMathOperator {\arcsec }{arcsec} \DeclareMathOperator {\arccsc }{arccsc} \DeclareMathOperator {\si }{Si} \DeclareMathOperator {\scal }{scal} \DeclareMathOperator {\sign }{sign} \newcommand {\arrowvec }{{\overset {\rightharpoonup }{#1}}} \newcommand {\vec }{{\overset {\boldsymbol {\rightharpoonup }}{\mathbf {#1}}}\hspace {0in}} \newcommand {\point }{\left (#1\right )} \newcommand {\pt }{\mathbf {#1}} \newcommand {\Lim }{\lim _{\point {#1} \to \point {#2}}} \DeclareMathOperator {\proj }{\mathbf {proj}} \newcommand {\veci }{{\boldsymbol {\hat {\imath }}}} \newcommand {\vecj }{{\boldsymbol {\hat {\jmath }}}} \newcommand {\veck }{{\boldsymbol {\hat {k}}}} \newcommand {\vecl }{\vec {\boldsymbol {\l }}} \newcommand {\uvec }{\mathbf {\hat {#1}}} \newcommand {\utan }{\mathbf {\hat {t}}} \newcommand {\unormal }{\mathbf {\hat {n}}} \newcommand {\ubinormal }{\mathbf {\hat {b}}} \newcommand {\dotp }{\bullet } \newcommand {\cross }{\boldsymbol \times } \newcommand {\grad }{\boldsymbol \nabla } \newcommand {\divergence }{\grad \dotp } \newcommand {\curl }{\grad \cross } \newcommand {\lto }{\mathop {\longrightarrow \,}\limits } \newcommand {\bar }{\overline } \newcommand {\surfaceColor }{violet} \newcommand {\surfaceColorTwo }{redyellow} \newcommand {\sliceColor }{greenyellow} \newcommand {\vector }{\left \langle #1\right \rangle } \newcommand {\sectionOutcomes }{} \newcommand {\HyperFirstAtBeginDocument }{\AtBeginDocument }$

We introduce the basic idea of using rectangles to approximate the area under a curve.

### Rectangles and areas

We want to compute the area between the curve $y=f(x)$ and the horizontal axis on the interval $[a,b]$:

One way to do this would be to approximate the area with rectangles. With one rectangle we get a rough approximation: Two rectangles might make a better approximation: With even more, we get a closer, and closer, approximation:
Suppose we wanted to approximate area between the curve $y=x^2+1$ and the $x$-axis on the interval $[-1,1]$, with $8$ rectangles. What is $\Delta x$?

As we add rectangles, we are more closely approximating the area we are interested in:

We could find the area exactly if we could compute the limit as the width of the rectangles goes to zero and the number of rectangles goes to infinity.

Let’s setup some notation to help with these calculations:

If we are approximating the area between a curve and the horizontal axis with $11$ rectangles, how many grid points will we have?
You can draw it!
We’ll have $\answer [given]{12}$ grid points.

### But which set of rectangles?

When we use $n$ rectangles to compute the area under a curve, the width of each rectangle is $\Delta x=\frac {b-a}{n}$. It is clear that $\Delta x=x_k-x_{k-1}$, for $k=1,\dots , n$.

But how do we determine the height of the rectangle?

We choose a sample point $x_k^*$ and evaluate the function at that point. The value $f(x_k^*)$ determines the height of a rectangle.

What is the area of the $k^{th}$ rectangle shown in the figure above?
$A=\Delta x$ $A=f(x)\Delta x$ $A= f( x_k^*)x_k^*$ $A= f( x_k^*)\Delta x$ $A=f(x)x$ $A=k\Delta k$ $A= f( x_k^*)(x_k-x_{k-1})$
Here are three options for sample points that we consider:

#### Rectangles defined by left-endpoints

We can set the rectangles up so that the sample point is the left-endpoint.

In the graph above, the $k^{th}$ rectangle’s left-endpoint determines the height of the rectangle.

#### Rectangles defined by right-endpoints

We can set the rectangles up so that the right-endpoint determines the height.

In the graph above, the $k^{th}$ rectangle’s right-endpoint of the base determines the height.

#### Rectangles defined by midpoints

We can set the rectangles up so that the midpoint of the base determines the height.

In the graph above, the midpoint of the base of the $k^{th}$ rectangle determines the height.

### Riemann sums and approximating area

Once we know how to identify our rectangles, we can compute approximations of some areas. If we are approximating area with $n$ rectangles, then

A Riemann sum computes an approximation of the area between a curve and the $x$-axis on the interval $[a,b]$. It can be defined in several different ways. In our class, it will be defined via left-endpoints, right-endpoints, or midpoints. Here we see the explicit connection between a Riemann sum defined by left-endpoints and the area between a curve and the $x$-axis on the interval $[a,b]$:

and here is the associated Riemann sum

#### Summary

Riemann sums approximate the area between curves and the $x$-axis via rectangles. When computing this area via rectangles, there are several things to know:

• What interval are we on? In our discussion above we call this $[a,b]$.
• How many rectangles will be used? In our discussion above we called this $n$.
• What is the width of each individual rectangle? In our discussion above we called this $\Delta x$.
• What points will determine the height of the rectangle? In our discussion above we called these sample points, $x_k^*$, and they can be left-endpoints, right-endpoints, or midpoints.
• What is the actual height of the rectangle? This will always be $f(x_k^*)$.
• We approximate the area $A$ with a Riemann sum

$A\approx \sum _{k=1}^n f(x_k^*)\Delta x$.

• As $n$ gets bigger and bigger, $\Delta x$ gets smaller and smaller, and approximation gets better and better. We compute the exact value of $A$ by taking the limit of Riemann sums

$A= \lim _{n\to \infty }\sum _{k=1}^n f(x_k^*)\Delta x$.