# Calculation of Areas under Curves

Consider the function $f(x)=x^2+2$.
We wish to estimate the green area enclosed by $y=f(x)$, the $x$-axis, and the vertical lines $x=1$ and $x=4$. Suppose we divide the $x$-interval into three strips of width $1$ unit.

## Upper Rectangles

The diagram below shows upper rectangles, which are rectangles with top edges at the maximum value of the curve on that interval.

The area of the upper rectangles,
\begin{align} \displaystyle A_{upper} &= 1 \cdot f(2) + 1 \cdot f(3) + 1 \cdot f(4) \\ &= 1 \cdot 6 + 1 \cdot 11 + 1 \cdot 18 \\ &= 6 + 11 + 18 \\ &= 35 \end{align}

### Example 1

Find $A_{upper}$ enclosed by $f(x)=x^3$, the $x$-axis and the the vertical lines $x=1$ and $x=5$, using $4$ subintervals.

$$\begin{array}{|c|c|c|c|c|}\hline x & 2 & 3 & 4 & 5 \\ \hline f(x) & 8 & 27 & 64 & 125 \\ \hline \end{array}$$
\begin{align} \displaystyle A_{upper} &= 1 \cdot f(2) + 1 \cdot f(3) + 1 \cdot f(4) + 1 \cdot f(5) \\ &= 1 \cdot 8 + 1 \cdot 27 + 1 \cdot 64 + 1 \cdot 125 \\ &= 224 \end{align}

## Lower Rectangles

The next diagram below shows lower rectangles, which are rectangles with top edges at the minimum value of the curve on that interval.

The area of the lower rectangles,
\begin{align} \displaystyle A_{lower} &= 1 \cdot f(1) + 1 \cdot f(2) + 1 \cdot f(3) \\ &= 1 \cdot 3 + 1 \cdot 6 + 1 \cdot 11 \\ &= 3 + 6 + 11 \\ &= 20 \end{align}
It shows clearly $A_{lower} \lt Area \lt A_{upper}$, so the required area lies between $20$ and $35$.

### Example 2

Find $A_{lower}$ enclosed by $f(x)=x^3$, the $x$-axis and the the vertical lines $x=1$ and $x=5$, using $4$ subintervals.

$$\begin{array}{|c|c|c|c|c|} \hline x & 1 & 2 & 3 & 4 \\ \hline f(x) & 1 & 8 & 27 & 64 \\ \hline \end{array}$$
\begin{align} \displaystyle A_{lower} &= 1 \cdot f(1) + 1 \cdot f(2) + 1 \cdot f(3) + 1 \cdot f(4) \\ &= 1 \cdot 1 + 1 \cdot 8 + 1 \cdot 27 + 1 \cdot 64 \\ &= 100 \end{align} If the interval $1 \le x \le 4$ is divided into $6$ equal subintervals, each of length $0.5$, then
\begin{align} \displaystyle A_{upper} &= 0.5 f(1.5) + 0.5 f(2) + 0.5 f(2.5) + 0.5 f(3) + 0.5 f(3.5) + 0.5 f(4) \\ &= 0.5 \cdot 4.25 + 0.5 \cdot 6 + 0.5 \cdot 8.25 + 0.5 \cdot 11 + 0.5 \cdot 14.25 + 0.5 \cdot 18 \\ &= 2.125 + 3 + 4.125 + 5.5 + 7.125 + 9 \\ &= 30.875 \\ A_{lower} &= 0.5 f(1) + 0.5 f(1.5) + 0.5 f(2) + 0.5 f(2.5) + 0.5 f(3) + 0.5 f(3.5) \\ &= 0.5 \cot 3 + 0.5 \cdot 4.25 + 0.5 \cdot 6 + 0.5 \cdot 8.25 + 0.5 \cdot 11 + 0.5 \cdot 14.25 \\ &= 1.5 + 2.125 + 3 + 4.125 + 5.5 + 7.125 \\ &= 23.375 \end{align}

From this refinement, we conclude that the required area lies between $23.375$ and $30.875$.
As we divide into more rectangles, the estimates $A_{lower}$ and $A_{upper}$ become more accurate. As the subdivision width is further reduced, both $A_{lower}$ and $A_{upper}$ will converge to the actual area.

### Example 3

Find $A_{upper}$ enclosed by $f(x)=x^3$, the $x$-axis and the the vertical lines $x=1$ and $x=5$, using 8 subintervals.

$$\begin{array}{|c|c|c|c|c|c|} \hline x & 1 & 1.5 & 2 & 2.5 & 3 & 3.5 & 4 & 4.5 & 5 \\ \hline f(x) & 1 & 3.375 & 8 & 15.625 & 27 & 42.875 & 64 & 91.125 & 125 \\ \hline \end{array}$$
\begin{align} \displaystyle A_{upper} &= 0.5 f(1.5) + 0.5 f(2) + 0.5 f(2.5) + 0.5 f(3) + 0.5 f(3.5) + 0.5 f(4) + 0.5 f(4.5) + 0.5 f(5) \\ &= 0.5 \cdot 3.375 + 0.5 \cdot 8 + 0.5 \cdot 15.625 + 0.5 \cdot 27 + 0.5 \cdot 42.875 + 0.5 \cdot 64 + 0.5 \cdot 91.125 + 0.5 \cdot 125 \\ &= 188.5 \end{align}

### Example 4

Find $A_{lower}$ enclosed by $f(x)=x^3$, the $x$-axis and the the vertical lines $x=1$ and $x=5$, using 8 subintervals.

$$\begin{array}{|c|c|c|c|c|c|} \hline x & 1 & 1.5 & 2 & 2.5 & 3 & 3.5 & 4 & 4.5 & 5 \\ \hline f(x) & 1 & 3.375 & 8 & 15.625 & 27 & 42.875 & 64 & 91.125 & 125 \\ \hline \end{array}$$
\begin{align} \displaystyle A_{lower} &= 0.5 f(1) + 0.5 f(1.5) + 0.5 f(2) + 0.5 f(2.5) + 0.5 f(3) + 0.5 f(3.5) + 0.5 f(4) + 0.5 f(4.5) \\ &= 0.5 \cdot 1 + 0.5 \cdot 3.375 + 0.5 \cdot 8 + 0.5 \cdot 15.625 + 0.5 \cdot 27 + 0.5 \cdot 42.875 + 0.5 \cdot 64 + 0.5 \cdot 91.125 \\ &= 126.5 \end{align}

## The Definite Integral

Consider the lower and upper rectangle sums for a function that is positive and increasing on the interval $[a,b]$.
The interval $[a,b]$ is now deivided into $n$ subdivisions of width $\delta x= \dfrac{b-a}{n}$.
Note that there are $n+1$ coordinates in $n$ subintervals.
$$x_0,x_1,x_2,\cdots,x_{n-1},x_n$$
Since the function is increasing,
\begin{align} \displaystyle A_{lower} &= \delta x f(x_0) + \delta x f(x_1) + \delta x f(x_2) + \cdots + \delta x f(x_{n-2}) + \delta x f(x_{n-1}) \\ &= \sum^{n-1}_{i=0}\delta f(x_i) \\ A_{upper} &= \delta x f(x_1) + \delta x f(x_2) + \delta x f(x_3) + \cdots + \delta x f(x_{n-1}) + \delta x f(x_{n}) \\ &= \sum^{n}_{i=1}\delta x f(x_i) \\ A_{upper} – A_{lower} &= \delta x \big[f(x_n) – f(x_0)\big] \\ &= \dfrac{b-a}{n}\big[f(b) – f(a)\big] \\ \lim_{n \rightarrow \infty} (A_{upper} – A_{lower}) &= \lim_{n \rightarrow \infty} \dfrac{b-a}{n}\big[f(b) – f(a)\big] \\ &= 0 \\ \lim_{n \rightarrow \infty} A_{lower} &= \lim_{n \rightarrow \infty} A_{upper} \\ A_{lower} &\lt A \lt A_{upper} \\ \therefore \lim_{n \rightarrow \infty} A_{lower} &= A = \lim_{n \rightarrow \infty} A_{upper} \end{align}