# RAM (Rectangle Approximation Method/Riemann Sum)

## Key Questions

• Usually, integration using rectangles is the first step for learning integration. At its most basic, integration is finding the area between the x axis and the line of a function on a graph - if this area is not "nice" and doesn't look like a basic shape (triangle, rectangle, etc.) that we can easily calculate the area of, a good way to approximate it is by using rectangles.

Let's take an example:

${\int}_{0}^{7} \frac{3 x}{2} \mathrm{dx}$

This is a function that finds the area between x=0 and x=7 underneath the line of $f \left(x\right) = \frac{3 x}{2}$. We already know that this is simply going to be a right-angled triangle with base 7 and height 10.5, so the area is going to be $\frac{7 \cdot 10.5}{2} = \frac{73.5}{2} = 36.75$.

Imagine, now, that we didn't have a formula for calculating the area of a triangle, but we did have a formula for calculating the area of a rectangle (which is base x height, as usual). Imagine that we want to "guess" the area of that triangle. So we draw ten rectangles, each with base 0.7. The height is whatever the value of x is at the left-hand side of that rectangle. So:

• The rectangle between 0 and 0.7 has height 0, because f(x) = 0 on the left-hand side.
• The rectangle between 0.7 and 1.4 has height 1.05, because f(x) = 1.05 on the left-hand side.
• The rectangle between 1.4 and 2.1 has height 2.1, because f(x) = 2.1 on the left-hand side.
• And so on.

Eventually, we'll get ten rectangles. We can easily calculate the areas of these rectangles:

• The first rectangle has area $0.7 \cdot 0 = 0$. Remember that the base of all these rectangles is 0.7
• The second rectangle has area $0.7 \cdot 1.05 = 0.735$.
• The third rectangle has area $0.7 \cdot 2.1 = 1.47$.
• And so on.

The areas of the ten rectangles, in order, are:

$0 , 0.735 , 1.47 , 2.205 , 2.94 , 3.675 , 4.41 , 5.145 , 5.88 , 6.615$

To get the total area of all the rectangles, we just add them together to get $33.705$. This is a pretty good approximation for our area above.

Note: you don't always have to choose the left-hand side. You can choose the right-hand side, or the midpoint, but make sure you do the same thing for the entire question - don't take one rectangle from the left-hand side and one from the right.

• The interval $\left[1 , 2\right]$ is divided into 5 equal subintervals

$\left[1 , 1.2\right] , \left[1.2 , 1.4\right] , \left[1.4 , 1.6\right] , \left[1.6 , 1.8\right] , \mathmr{and} \left[1.8 , 2\right]$.

Each interval are of length $\Delta x = \frac{b - a}{n} = \frac{2 - 1}{5} = 0.2$.

The midpoints of the above subintervals are

$1.1 , 1.3 , 1.5 , 1.7 , \mathmr{and} 1.9$.

Using the above midpoints to determine the heights of the approximating rectangles, we have

${M}_{5} = \left[f \left(1.1\right) + f \left(1.3\right) + f \left(1.5\right) + f \left(1.7\right) + f \left(1.9\right)\right] \Delta x$

$= \left(\frac{1}{1.1} + \frac{1}{1.3} + \frac{1}{1.5} + \frac{1}{1.7} + \frac{1}{1.9}\right) \cdot 0.2 \approx 0.692$

By Midpoint Rule,

${\int}_{1}^{2} \frac{1}{x} \mathrm{dx} \approx 0.692$.

I hope that this was helpful.

• The area A of the region under the graph of $f$ above the $x$-axis from $x = a$ to $b$ can be found by

$A = {\lim}_{n \to \infty} {\sum}_{i = 1}^{n} f \left({x}_{i}\right) \Delta x$,

where ${x}_{i} = a + i \Delta x$ and $\Delta x = \frac{b - a}{n}$.

Let us find the area of the region under the graph of $y = 2 x + 1$ from $x = 1$ to $3$.

By definition,

$A = {\lim}_{n \to \infty} {\sum}_{i = 1}^{n} \left[2 \left(1 + \frac{2}{n} i\right) + 1\right] \frac{2}{n}$

by simplifying the expression inside the summation,

$= {\lim}_{n \to \infty} {\sum}_{i = 1}^{n} \left(\frac{8}{n} ^ 2 i + \frac{6}{n}\right)$

by splitting the summation and pulling out constants,

$= {\lim}_{n \to \infty} \left(\frac{8}{n} ^ 2 {\sum}_{i = 1}^{n} i + \frac{6}{n} {\sum}_{i = 1}^{n} 1\right)$

by the summation formulas ${\sum}_{i = 1}^{n} i = \frac{n \left(n + 1\right)}{2}$ and ${\sum}_{i = 1}^{n} 1 = n$,

$= {\lim}_{n \to \infty} \left(\frac{8}{n} ^ 2 \cdot \frac{n \left(n + 1\right)}{2} + \frac{6}{n} \cdot n\right)$

by cancelling out $n$'s,

$= {\lim}_{n \to \infty} \left[4 \left(1 + \frac{1}{n}\right) + 6\right] = 4 \left(1 + 0\right) + 6 = 10$

I hope that this was helpful.

• In my opinion, you do not need to unless it takes too long to work out integrals. If integrals are time-consuming, and you do not need an exact value for your purposes, it makes sense to approximate them.

I hope that this was helpful.