Tutorials on Advanced Math and Computer Science Concepts

Areas and Distances

The fundamental problem that integral calculus seeks to solve involves area. For many applications, we need to be able to find the area of complex shapes, that do not fall under our typical geometric shapes. Typically, this involves finding the area under or between curves that we can represent as functions. In this section, we will take an example function, and build an intuition on how we might be able to get such an area.

Take for example the function f(x) = 2x. Suppose we wanted to find the area of this function between x = 0 and x = 2.

On this graph, I've marked the two points that we want to get the area of, to make it clear what we want. The hard part of finding this area is the portion of the shape that is curved. One method we could apply to try to estimate this area is to fill it with a shape that we know how to take the area of. For instance, if we fill the shape with rectangles, we can add the areas of the rectangles to get an approximation of the area.

What I've done here is drawn four rectangles, where the left top point of the rectangle touches the curve. You can see that doing this misses a bit of area between each rectangle, however, doing this would still provide us with a fairly good estimate of the area under the curve. What if we drew more rectangles in the area?

From this you can see that are we draw more rectangles, the amount of area missed gets smaller and smaller. From this, one could naturally ask the question, what if we let the number of rectangles drawn under the curve approach infinity? If we do this, we get a very good estimate of the area, and since we know limits, we are able to do exactly that.

First, let's formalize what we are discussing so that we have a formula to calculate the area given a finite number of rectangles. To do this, let's call the first endpoint a and the second endpoint b. In our example above, it would mean that a = 0 and b = 2. Next, we need a way to determine the width of our rectangles. If we want to draw 4 rectangles for example, we would have each an equal width inside the curve. Since we start at 0 and end at 2, we can take $\frac{2-0}{4} = \frac{1}{2}$ and make each rectangle half a unit wide. Doing this evenly splits the area we have.

From this, we can conclude that if we want to draw n rectangles, we need to use a width $\Delta x = \frac{b-a}{n}$. Using this width ensures that each rectangle is an even size. From here, all we need to do is decide where the rectangle touches the curve. If we start at a, then the next point is going to be exactly $\Delta x$ units away. So, $x_0 = a$ and $x_1 = a + \Delta x$. From here, we can keep adding $\Delta x$ to the previous point to get the next point in the list.

This means in general, if we want to calculate the area under a curve using rectangles, we would do something like this:

$A = f(x_1) \Delta x + f(x_2) \Delta x + ... + f(x_n) \Delta x$

When n is the number of rectangles we wish to use, $\Delta x = \frac{b-a}{n}$, and $x_1 = a+\Delta x$, $x_2 = x_1 + \Delta x$, $x_3 = x_2 + \Delta x$ and so on. You can try this formula on our example above and see how it works.

Example: Estimate the area between a = 0 and b = 2 of $f(x) = 2^x$, using 4 rectangles.

First, let's determine what $\Delta x$ is. $\Delta x = \frac{b-a}{n} = \frac{2-0}{4} = \frac{1}{2}$.

Next, let's figure out our x values:

$x_1 = 0 + 0.5 = 0.5$

$x_2 = 0.5 + 0.5 = 1$

$x_3 = 1 + 0.5 = 1.5$

$x_4 = 1.5 + 0.5 = 2$

With these values figured out, we simply plug them into the equation and solve for our area.

$A = f(0.5) * \frac{1}{2} + f(1) * \frac{1}{2} + f(1.5) * \frac{1}{2} + f(2) * \frac{1}{2}$

$= \frac{2^{0.5}}{2} + 1 + \frac{2^{1.5}}{2} + 2 = 5.121313$

So, using this formula, we can find estimates for the area easily, especially if the number of rectangles is small. However, as we discussed, the accuracy of the solution increases as the number of rectangles increases. So, the next question we want to answer is, how can we take the limit as this expression approaches infinity.

To answer this, we need to first introduce some notation. We are going to represent the sum formula that we generated using sigma notation. Sigma notation denotes a lower and upper bound and adds up the value that follows between the two bounds. For example:

$\sum_{i=1}^{4}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$

This gives us a more compact way to write out our summation. We can just add the i index as a placeholder, and the summation tells us to replace it with every number from the lower bound to the upper bound. From this, we can say that the limit to infinity of our expression is:

$\lim_{n \to \infty} \sum_{i=1}^{x} f(x_i) \Delta x$

The focus of integral calculus will be to determine a way to be able to effectively solve this equation and understand how it relates to previous concepts we studied in differential calculus. The next few articles in this series will build up an understanding of how this expression is solved, and then we will look at further techniques and applications to solve these equations