## Approximating Area

### Learning Outcomes

• Use the sum of rectangular areas to approximate the area under a curve

Now that we have the necessary notation, we return to the problem at hand: approximating the area under a curve. Let $f(x)$ be a continuous, nonnegative function defined on the closed interval $[a,b]$. We want to approximate the area $A$ bounded by $f(x)$ above, the $x$-axis below, the line $x=a$ on the left, and the line $x=b$ on the right (Figure 1).

Figure 1. An area (shaded region) bounded by the curve $f(x)$ at top, the x-axis at bottom, the line $x=a$ to the left, and the line $x=b$ at right.

How do we approximate the area under this curve? The approach is a geometric one. By dividing a region into many small shapes that have known area formulas, we can sum these areas and obtain a reasonable estimate of the true area. We begin by dividing the interval $[a,b]$ into $n$ subintervals of equal width, $\frac{b-a}{n}$. We do this by selecting equally spaced points $x_0,x_1,x_2,\cdots,x_n$ with $x_0=a, \, x_n=b$, and

$x_i-x_{i-1}=\dfrac{b-a}{n}$

for $i=1,2,3,\cdots,n$.

We denote the width of each subinterval with the notation $\Delta x$, so $\Delta x=\dfrac{b-a}{n}$ and

$x_i=x_0+i \Delta x$

for $i=1,2,3,\cdots,n$. This notion of dividing an interval $[a,b]$ into subintervals by selecting points from within the interval is used quite often in approximating the area under a curve, so let’s define some relevant terminology.

### Definition

A set of points $P=\{x_i\}$ for $i=0,1,2,\cdots,n$ with $a=x_0<x_1<x_2<\cdots<x_n=b$, which divides the interval $[a,b]$ into subintervals of the form $[x_0,x_1], \, [x_1,x_2],\cdots,[x_{n-1},x_n]$ is called a partition of $[a,b]$. If the subintervals all have the same width, the set of points forms a regular partition of the interval $[a,b]$.

We can use this regular partition as the basis of a method for estimating the area under the curve. We next examine two methods: the left-endpoint approximation and the right-endpoint approximation.

### Left-Endpoint Approximation

On each subinterval $[x_{i-1},x_i]$ (for $i=1,2,3,\cdots,n$), construct a rectangle with width $\Delta x$ and height equal to $f(x_{i-1})$, which is the function value at the left endpoint of the subinterval. Then the area of this rectangle is $f(x_{i-1})\Delta x$. Adding the areas of all these rectangles, we get an approximate value for $A$ (Figure 2). We use the notation $L_n$ to denote that this is a left-endpoint approximation of $A$ using $n$ subintervals.

$\begin{array}{ll} A \approx L_n & =f(x_0)\Delta x+f(x_1)\Delta x+\cdots+f(x_{n-1})\Delta x \\ & =\displaystyle\sum_{i=1}^{n} f(x_{i-1})\Delta x \end{array}$

Figure 2. In the left-endpoint approximation of area under a curve, the height of each rectangle is determined by the function value at the left of each subinterval.

The second method for approximating area under a curve is the right-endpoint approximation. It is almost the same as the left-endpoint approximation, but now the heights of the rectangles are determined by the function values at the right of each subinterval.

### Right-Endpoint Approximation

Construct a rectangle on each subinterval $[x_{i-1},x_i]$, only this time the height of the rectangle is determined by the function value $f(x_i)$ at the right endpoint of the subinterval. Then, the area of each rectangle is $f(x_i)\Delta x$ and the approximation for $A$ is given by

$\begin{array}{ll} A \approx R_n & =f(x_1)\Delta x+f(x_2)\Delta x+\cdots+f(x_n)\Delta x \\ & =\displaystyle\sum_{i=1}^{n} f(x_i)\Delta x \end{array}$

The notation $R_n$ indicates this is a right-endpoint approximation for $A$ (Figure 3).

Figure 3. In the right-endpoint approximation of area under a curve, the height of each rectangle is determined by the function value at the right of each subinterval. Note that the right-endpoint approximation differs from the left-endpoint approximation in (Figure).

The graphs in Figure 4 represent the curve $f(x)=\frac{x^2}{2}$. In graph (a) we divide the region represented by the interval $[0,3]$ into six subintervals, each of width 0.5. Thus, $\Delta x=0.5$. We then form six rectangles by drawing vertical lines perpendicular to $x_{i-1}$, the left endpoint of each subinterval. We determine the height of each rectangle by calculating $f(x_{i-1})$ for $i=1,2,3,4,5,6$. The intervals are $[0,0.5], \, [0.5,1], \, [1,1.5], \, [1.5,2], \, [2,2.5], \, [2.5,3]$. We find the area of each rectangle by multiplying the height by the width. Then, the sum of the rectangular areas approximates the area between $f(x)$ and the $x$-axis. When the left endpoints are used to calculate height, we have a left-endpoint approximation. Thus,

$\begin{array}{ll} A \approx L_6 & =\displaystyle\sum_{i=1}^{6} f(x_{i-1})\Delta x=f(x_0)\Delta x+f(x_1)\Delta x+f(x_2)\Delta x+f(x_3)\Delta x+f(x_4)\Delta x+f(x_5)\Delta x \\ & =f(0)0.5+f(0.5)0.5+f(1)0.5+f(1.5)0.5+f(2)0.5+f(2.5)0.5 \\ & =(0)0.5+(0.125)0.5+(0.5)0.5+(1.125)0.5+(2)0.5+(3.125)0.5 \\ & =0+0.0625+0.25+0.5625+1+1.5625 \\ & =3.4375 \end{array}$

Figure 4. Methods of approximating the area under a curve by using (a) the left endpoints and (b) the right endpoints.

In Figure 4(b), we draw vertical lines perpendicular to $x_i$ such that $x_i$ is the right endpoint of each subinterval, and calculate $f(x_i)$ for $i=1,2,3,4,5,6$. We multiply each $f(x_i)$ by $\Delta x$ to find the rectangular areas, and then add them. This is a right-endpoint approximation of the area under $f(x)$. Thus,

$\begin{array}{ll} A \approx R_6 & =\displaystyle\sum_{i=1}^{6} f(x_i)\Delta x=f(x_1)\Delta x+f(x_2)\Delta x+f(x_3)\Delta x+f(x_4)\Delta x+f(x_5)\Delta x+f(x_6)\Delta x \\ & =f(0.5)0.5+f(1)0.5+f(1.5)0.5+f(2)0.5+f(2.5)0.5+f(3)0.5 \\ & =(0.125)0.5+(0.5)0.5+(1.125)0.5+(2)0.5+(3.125)0.5+(4.5)0.5 \\ & =0.0625+0.25+0.5625+1+1.5625+2.25 \\ & =5.6875 \end{array}$

### Example: Approximating the Area Under a Curve

Use both left-endpoint and right-endpoint approximations to approximate the area under the curve of $f(x)=x^2$ on the interval $[0,2]$; use $n=4$.

Watch the following video to see the worked solution to Example: Approximating the Area Under a Curve.

### Try It

Sketch left-endpoint and right-endpoint approximations for $f(x)=\frac{1}{x}$ on $[1,2]$; use $n=4$. Approximate the area using both methods.

Looking at Figure 4 and the graphs in the previous example, we can see that when we use a small number of intervals, neither the left-endpoint approximation nor the right-endpoint approximation is a particularly accurate estimate of the area under the curve. However, it seems logical that if we increase the number of points in our partition, our estimate of $A$ will improve. We will have more rectangles, but each rectangle will be thinner, so we will be able to fit the rectangles to the curve more precisely.

We can demonstrate the improved approximation obtained through smaller intervals with an example. Let’s explore the idea of increasing $n$, first in a left-endpoint approximation with four rectangles, then eight rectangles, and finally 32 rectangles. Then, let’s do the same thing in a right-endpoint approximation, using the same sets of intervals, of the same curved region. Figure 7 shows the area of the region under the curve $f(x)=(x-1)^3+4$ on the interval $[0,2]$ using a left-endpoint approximation where $n=4$. The width of each rectangle is

$\Delta x=\frac{2-0}{4}=\frac{1}{2}$

The area is approximated by the summed areas of the rectangles, or

$\begin{array}{ll} L_4 & =f(0)(0.5)+f(0.5)(0.5)+f(1)(0.5)+f(1.5)0.5 \\ & =7.5 \end{array}$

Figure 8. With a left-endpoint approximation and dividing the region from a to b into four equal intervals, the area under the curve is approximately equal to the sum of the areas of the rectangles.

Figure 9 shows the same curve divided into eight subintervals. Comparing the graph with four rectangles in Figure 8 with this graph with eight rectangles, we can see there appears to be less white space under the curve when $n=8$. This white space is area under the curve we are unable to include using our approximation. The area of the rectangles is

$\begin{array}{ll} L_8 & =f(0)(0.25)+f(0.25)(0.25)+f(0.5)(0.25)+f(0.75)(0.25) \\ & +f(1)(0.25)+f(1.25)(0.25)+f(1.5)(0.25)+f(1.75)(0.25) \\ & =7.75 \end{array}$

Figure 9. The region under the curve is divided into $n=8$ rectangular areas of equal width for a left-endpoint approximation.

The graph in Figure 10 shows the same function with 32 rectangles inscribed under the curve. There appears to be little white space left. The area occupied by the rectangles is

$\begin{array}{ll} L_{32} & =f(0)(0.0625)+f(0.0625)(0.0625)+f(0.125)(0.0625)+\cdots+f(1.9375)(0.0625) \\ & =7.9375 \end{array}$

Figure 10. Here, 32 rectangles are inscribed under the curve for a left-endpoint approximation.

We can carry out a similar process for the right-endpoint approximation method. A right-endpoint approximation of the same curve, using four rectangles (Figure 11), yields an area

$\begin{array}{ll} R_4 & =f(0.5)(0.5)+f(1)(0.5)+f(1.5)(0.5)+f(2)(0.5) \\ & =8.5 \end{array}$

Figure 11. Now we divide the area under the curve into four equal subintervals for a right-endpoint approximation.

Dividing the region over the interval $[0,2]$ into eight rectangles results in $\Delta x=\frac{2-0}{8}=0.25$. The graph is shown in Figure 12. The area is

$\begin{array}{ll} R_8 & =f(0.25)(0.25)+f(0.5)(0.25)+f(0.75)(0.25)+f(1)(0.25) \\ & +f(1.25)(0.25)+f(1.5)(0.25)+f(1.75)(0.25)+f(2)(0.25) \\ & =8.25 \end{array}$

Figure 12. Here we use right-endpoint approximation for a region divided into eight equal subintervals.

Last, the right-endpoint approximation with $n=32$ is close to the actual area (Figure 13). The area is approximately

$\begin{array}{ll} R_{32} & =f(0.0625)(0.0625)+f(0.125)(0.0625)+f(0.1875)(0.0625)+\cdots+f(2)(0.0625) \\ & =8.0625 \end{array}$

Figure 13. The region is divided into 32 equal subintervals for a right-endpoint approximation.

Based on these figures and calculations, it appears we are on the right track; the rectangles appear to approximate the area under the curve better as $n$ gets larger. Furthermore, as $n$ increases, both the left-endpoint and right-endpoint approximations appear to approach an area of 8 square units. The table below shows a numerical comparison of the left- and right-endpoint methods. The idea that the approximations of the area under the curve get better and better as $n$ gets larger and larger is very important, and we now explore this idea in more detail.

Converging Values of Left- and Right-Endpoint Approximations as $n$ Increases
Values of $n$ Approximate Area $L_n$ Approximate Area $R_n$
$n=4$ 7.5 8.5
$n=8$ 7.75 8.25
$n=32$ 7.94 8.06