This post assumes you know what derivatives and limits are, but the post is generally intended for those who are currently learning calculus. Aside from that, you’re good!

So, what is this thing I have heard about called an integral, you ask?

Well, before we get to that, let’s ask another question (also put on your thinking caps!).

**Riemann Sums**

**Let’s say we have a curve. How do we find the area between a curve and the x-axis? **

If this is vague, let’s look at the graph below. Here, we have an arbitrary function f(x), and what I have depicted in red is the area we want to find, namely the area between the curve and the x-axis from the points x = a to x = b. How do you suppose we find this red area?

As Leibniz and Newton were inventing Calculus, they saw this question as a very fundamental one to their work in physics, and as you can imagine, they, too, had trouble solving this problem, but nevertheless they did it. Now you will too!

But before we go on, I think it would be at the core of mathematics if you could try to solve this question somehow (possibly using limits), before you learn what integration is. Think about it. See if you have any ideas, and if you have finally come to peace with your ideas (or you’re banging your head against a wall), keep plunging forward!

Our solution starts now. Let’s consider some horizontal line, as shown in the image below.

When considering the horizontal line do you think you can find the area (I know you can)? What is it? Well, this is simple geometry. **That’s a rectangle!** So I can use the formula Area = Base * Height to find it’s area. In this case, the area will be the length of the base which is b-a times the height of the horizontal line which is f(x). In other words, the area of this rectangle is f(x)(b-a).

Now, how does this help you ask? I mean sure we found the area under a line, but don’t we want to find the area under **curves?**

And to that, I say maybe we can exploit the fact we can find areas under horizontal lines (or more simply rectangles). Think about it, if we are going to find the areas of complex shapes like curves, it makes much more sense to break down our shape, the same way we did in geometry.

We can find this area by breaking it up into a variety of parts, so I won’t go through them, but the idea is by using simple areas, we can find more complex areas.

But you protest and say, we are dealing with curves, and we don’t have easily recognizable rectangles when dealing with functions like y=x^2?

And I say, well, think again. Look at the image below, what if I vertically divide it as such, so that we have vertical rectangles. Let’s just assume our function is y = x^2 and we are trying to find the area from x = 0 to x= 1, just to make our calculations simpler.

Well, I guess that’s possible, right? We can divide the area into green rectangles, but it looks like it doesn’t really map the same area (also notice there are actually 3 rectangles, equally spaced apart, except that the first one has a height of 0, so we can’t see it) Maybe we can try adding more rectangles to see if we can divide the curve better. Below will be a series of pictures with more and more rectangles!

With 4 rectangles, a little better, but still off, right?

How about 8?

Closer, right? How about 50?

Holy Whack a Moly! **It’s really close!** What about **500**?

**It’s almost the same! Wow! **

I think you see my point here. The more rectangle we add, each of smaller width, the more accurate our approximations become. In fact, if we could theoretically have an infinite amount of them, the idea is we would get the exact area. Well call this process of approximating using a finite number of rectangles **a Riemann Sum**, and we generally write the approximation mathematically like this

\sum_{i=1}^{N}f(x_i)\Delta x

Now, I know this might be hard to digest, but first let’s look at f(x_i)\Delta x. This part just says, for each rectangle, find its area by multiplying its height f(x_i) by its width \Delta x. Each rectangles width is simply (b-a)/N, but we just use \Delta x, because its easier to read and comprehend. The summation from i = 1 to N, simply states that we should just add all the areas of all the rectangles.** That’s really it!**

**Cumulative Area**

Notice something. Because the height is written in terms of f(x), if f(x) is negative in certain portions, that means our area will be negative in those portions. You might claim that we should use absolute values, but for now, I will just call it “Cumulative Area”, as in math, it makes more sense to look at area under the x-axis as negative and area above as positive. Technically, area is always positive, but in terms of this problem, we let it be, because it’s more simple to deal with something that doesn’t have absolute values.

**Now we can abuse limits, and find the ACTUAL area by making the number of rectangles, N go to infinity.**

Cumulative Area = \lim_{N \to \infty} \sum_{i=1}^{N}f(x_i)\Delta x

**Definite and Indefinite Integrals**

There, we did it! We solved our problem, and guess what, that cumulative area is actually what an integral does. More formally the integral from x = a to x = b is equal to the cumulative area (as in accounting for direction), bounded between y = f(x) and the x-axis. Here is it formally stated.

\int_{a}^{b} f(x)dx = \lim_{N \to \infty} \sum_{i=1}^{N}f(x_i)\Delta x

This is called a **definite integral**. It evaluates to a number and is often considered as an analog to the normal summation because it is sort of an infinite summation. In the same way, we define derivatives using limits, we define integrals with limits, but there’s one more interesting about integrals. We always integrate with respect to a variable, hence the dx.

We also have **indefinite integrals**, and these integrals come without bounds.

\int f(x)dx = F(x) + C

But you may ask, but how can we find an area without left and right bounds. Well that’s because these integrals return functions, just like a derivative does. In fact, these indefinite integrals return the antiderivative of a function like below.

So if the derivative of x^2 is 2x, we say the integral of 2x is [/latex]x^2 + C[/latex]. Now you must be wondering why do I have the +C, and that’s because it represents any number. Consider the fact that the derivative of x^2 +1 is also 2x, so to account the fact that multiple functions have the same derivative, we add the plus C. **Never forget it!**

Now, you may be wondering what significance does an indefinite integral have, especially in regards to area because these antiderivative and area concepts seem unrelated. Well there is a theorem called the Fundamental Theorem of Calculus and part of it states the following

\int_{a}^{b}f(x)dx = F(b) - F(a)

In other words, these concepts are highly intertwined. The definite integral is simply the indefinite integral of the inside evaluated at b minus the indefinite integral of the inside evaluated at a.

For example, doing one, we see the following. If we want to find the area under y = 2x bounded by the x-axis, x =2, and x=3, we can do the following.

\int_{2}^{3}2xdx = x^2 |_{2}^{3} = (3)^2 - (2)^2 = 9 - 4 = 5

**Tada!** **That’s basically an introduction to integrals. There’s much more, like rules for antiderivatives, the same way there are rules for derivatives**, **and applications of the integrals, and their own forms of product rules and chain rules. Integration is commonly referred to as an art, and to master this art, it takes patience and practice. So I will link tons of practice resources below, and I will leave you with a question to see if you have grasped the basics. See if you can answer it in the comments below. Also if you have suggestions for future blog posts make sure to comment, so I know! I think next up I might talk about hashing and kernels for Support Vector Machines and Fourier Series in Signal Processing. And as always stay safe!**

Practice Problem: Evaluate \int_{0}^{1}x^2dx.

Also, here are some great technology products, I would like to recommend. If you already are planning on buying these products, then buying it here will give me a small commission to keep this blog running at no cost to you! Thanks!:

- Roku Express HD Streaming Media Player 2019
- Echo Dot (3rd Gen) – Smart speaker with clock and Alexa – Sandstone
- Portable Charger Anker PowerCore 20100mAh – Ultra High Capacity Power Bank with 4.8A Output and PowerIQ Technology, External Battery Pack for iPhone, iPad & Samsung Galaxy & More (Black)
- All-New Fire 7 Tablet (7″ display, 16 GB)

byteofmath.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to ("byteofmath.com” (amazon.com)).

**Resources**