 Welcome back, everyone. In this video, I want to introduce the so-called integral test for series. And as I mentioned before, series and integrals are very closely related to each other. The notion of the definite integral that we've talked about before could probably be called a continuous integral. And the notion of series that we're talking about now could be called a discrete integral. The two things are related to each other. It kind of means there's gaps between points in the function, for while continuous means you have this continuum of points here. And so I want to make some comparisons here. Suppose we have a function f, which has the following three properties. It's positive. That means its entire graph will be above the x-axis. We want this function to be decreasing. That is, it gets from bigger to smaller as you go from left to right. And we also want this to be continuous. That is, there are no gaps in the function whatsoever. So imagine we have a positive decrease in continuous function called f. And we're going to require these assumptions on the domain 1 to infinity. It could be much bigger than that. But specifically on the interval 1 to infinity, we want our function positive decrease in continuous. So if we were interested in calculating the area under the curve, because if we took the integral from 1 to infinity of f of x dx, this would equal the area under the curve as you go from 1 to infinity, area under the curve. Now, if we wanted to approximate the area under the curve, maybe the function f is difficult to find its antiderivative. If we wanted to approximate it, one way of approximating it would be to use the right hand rule, which is you take your interval here. So you have your first x value slash slash slash. I mean, this is an improper integral. So you're actually going off towards infinity here. But we could still subdivide the entire infinite, the entire infinite line into smaller pieces. And then we're going to pick the right endpoint to determine the height of the rectangle. So for the first interval, as you go from one to the next number, you're going to pick the number on the right. And then for the next one, says you go from x x one to x two, you pick the height at x two. And for the next one for the third interval, you're going to pick the height at x three. And you keep on going like that. So this is an illustration of the right hand rule that you see on the screen right now. Now, because the function is positive and decreasing, this is this is where this is really critical right here. The fact that the function is positive and decreasing positive means it'll be above the x axis decreasing means that it'll get smaller as you go to the right from right to the left. So in particular, if you look at like the left end point versus the midpoint versus the right point, the right point is going to be the smallest one here. And as such, the right hand rule is going to underestimate the area into the curve. Notice the gap that we see here, the gap, the gap, there is pieces that's missing. And so therefore, the right hand rule will be less than or equal to the integral from one to be. Now be here, we're just taking some finite locations. So like we just terminate this at some location B, we'll worry about going towards infinity in just a moment. But the right hand rule will be less than or equal to the integral from one to be. Now, to make the connection to series, we're going to choose N so that it's B minus one. Our motives are intentional here. Why do we want to choose B minus one? Many steps there. We're assuming B is a positive integer in this consideration. Well, the reason is the following. If you calculate delta X, you're going to take B minus A, but the A values one here and you're going to stick this over N and N is equal to B minus one by selection. Okay, your delta X is going to equal one right here. And so the gap between the gap between any two markers on the X axis, you'll be exactly one. That's one step, two step, three step, four step like so. And the reason we chose this is that these steps will also coincide with the sequence. Like if we look at the sequence of these points, something like this, this would be our first N equals one, K equals one, I should say. Then we're going to get two and three and four and five. So these marks on the graph coincide with the sequence. So we have a function and we have a sequence for which our function is the continuous expansion of such a thing. All right. And so then if we consider the right hand rule in this situation because delta X equals one, we're going to get the right hand rule is going to be this Riemann sum. We take the sum where I equals one to N and we're going to get F of A plus I delta X times delta X. This is just the general formula for the right hand rule. But if we plug in the specifics for this function here, A is a one. Take this sum. So we're going to get F of one. And then we're going to add to it delta X, I delta X is itself just one as well. So we're going to go one plus I there were times I delta X, which is just one. So we get the sum. We get the sum of F of one plus I. And this is happening as I still goes from one to N, which of course we could just replace that with a B minus one right there. And so to make life a little bit easier, we're going to do a index shift. So we just want to relabel the index here. So instead of starting at one, we're actually going to go from K equals two to B. And then we get F of K. So that's the connection we want to make here. These two, these two sums give us exactly the same thing here. And so this is the right hand approximation of that. And so like we saw above, this thing will be bounded above by the integral from one to B of F of X DX. So now what I want you to see here is a connection. We've connected a finite sum with an integral of finite length right here. So the sum from K from two to B of F of X is going to be less than the integral from one to B of F of X there. And so we see that same thing illustrated right here on the screen. All right, now take the limit, right? Because we stopped at after in steps, right? If we send in to infinity, what's going to happen here is that our K equals two to infinity, A sub K, because that's what our sequence is, right? We define this sequence, define this sequence A sub K, which is equals F of K right here. So taking the sum as K equals two to infinity of A sub K, well, that just means we're just taking the limit as B goes to infinity of the sum K equals two to B, A K. Well, applying the inequality from above, this is the same thing as the limit as B approaches infinity of one over or the integral from one to B of F of X DX, which gives us the improper integral. And so this is the takeaway we want to get from this explanation we're doing so far here. We want to take the sum as K, as K ranges from two to infinity, A sub K, that will be less than or equal to the integral from one to infinity of F of X DX, where again, the sequence A is given by the function F there. If we flip directions a little bit, if we focus now on the left hand rule, right, how's the left hand rule affect things? Well, because again, the function is decreasing, it's decreasing right here. The left hand rule is going to pick the point on the left. And since the function is decreasing, this is actually going to give us the biggest value in this range. And so what we see here is that our rectangles are going to overestimate the area under the curve. See all this stuff that we're getting above the X axis, above the function I mean. And so we see in this situation that the left hand rule will overestimate the integral. So the integral from one to B of F of X DX is less than or equal to L sub N. So again, if we choose N to be B minus one, then we see that there's supposed to be a gap right here for me to write this thing out here, but I'll just do it to the side. The left hand rule by its basic formula, we take the sum, right, the sum where I range is from one to N. We're going to get F of in this case, one plus I minus one delta X times that by delta X. But then if we plug in the specific values, whoops, this should be A plus I minus one delta X got a little ahead of myself there. Because in this situation, F, keep that around A is a one I minus one, we're going to get I minus one right here. Delta X is a one, so it just disappears from consideration. I equals one to N here. And then again, using the idea that our sequence A sub K is equal to F of K, or in this case, F of I, the ones are going to cancel. And so we end up with this is just the sum where K ranges from one to N of A sub K. And so we see that, we see that happening here. But now remember B, B is supposed to be B minus, sorry, N is supposed to be B minus one, B minus one. And so we get the following inequality right here. Take the integral from one to B of F of X, DX is going to be less than or equal to the integral from the sum K equals one to B minus one of A sub K there. Again, taking the limit, if we take the limit as N goes to infinity, that'll force B minus one to likewise go infinity. And so what we see is the following the left hand side, the left hand side of this becomes an improper integral, the integral from one to infinity of F of X DX and improper intervals means you're taking the limit as B goes to infinity of this expression right here. This will be less than or equal to the limit as B goes to infinity of the sum K equals one to B minus one of A sub K there. And that by definition is a series right here. So what we can see from this or take away from this situation is that the integral from one to infinity of F of X DX, this is going to be less than or equal to the sum where K equals one to infinity of A sub K. So we have that this integral is less than or equal to the series that starts at one and goes to infinity. But if we compare on the previous slide, what did we end up with here? We have that the series that starts at two is less than or equal to the integral from one to infinity. So putting those things together, we get the following. I'm gonna hide this part just for one moment. If we put those things together, the integral from one to infinity of F of X DX, it'll be less than the series that starts at one, but it'll be bigger than the series that starts at two. And so we now see that the integral from one to infinity of F of X DX is sandwiched between two series, two infinite series. And this is useful because this then allows us to do some type of squeeze type of argument like what we've done with the squeeze theorem before. This will have some consequences about convergence. Because if our series on the top, if it's convergent, if it's convergent here, then we've now seen that our integral is less than a convergent series. So the convergent series has to be less than infinity at that moment. Therefore, the series would likewise, sorry, if the series is convergent, it's less than infinity, then the integral would be less than infinity as well, then it has to be convergent. And so the convergence of the series implies convergence of the integral. But I also want to go back a little bit. What if this series turns out to be divergent? What if the bigger series is divergent? Well, if the bigger series is divergent, that means it's equal to infinity. Well, if you're less than or equal to infinity, that really doesn't tell you much. You could be infinite or you could be finite. So we can't necessarily infer that the bigger one being divergent implies the smaller one's divergent. But this is the nice thing here. If the series that starts at one is divergent, that actually means the series that starts at two will likewise be divergent, because the starting location doesn't have any bearing on the convergence or divergence. So the smaller ones divergent and if the smaller ones divergent, that means it's equal to infinity. Well, if you're greater than or equal to infinity, likewise would mean you're infinite, you're infinite. And so the integral will have to be divergent as well. So when the series is convergent, it implies the integral is convergent. But when the series is divergent implies the integral is divergent. But it turns out we can go the other direction as well. Right? Remember this, this guy on the end, I'm now going to erase this one right here. Now our perspective is different. Look at the series. The series is likewise sandwiched between two improper integrals. One integral that starts at one and one integral that starts at two. And the same argument now plays. If the integral is convergent, then the smaller one has to likewise be convergent. Because if it's convergent, this thing is strictly less than infinity, it's finite. So we're therefore the series likewise has to be finite. But on the other hand, if it's not convergent, if the integral was instead divergent, that implies, so this is the series that the integral that starts at one, if the integral that starts at one is divergent, that implies that the integral starting at two must be divergent, which as all of the functions positive, that would imply that this integral is equal to infinity. Well, if something's greater than equal to infinity, it must itself be infinite, which with us imply the divergence of the series, right? That's sort of playing a game of cat and mouse here. But what we see here is that the convergence of the series implies the convergence of the integral and vice versa. What we get here is that this integral and this series, they either are both convergent or both divergent. And so this gives us the so called integral test, that if a function is continuous, positive and decreasing, and you take a sub n to be the discrete sequence associated to this continuous function, then the series associated to that sequence will be convergent if and only if the improper integral associated to that continuous function is convergent, the convergence will be the same. They're either both convergent or both divergent. And the reason this is going to be advantageous to us is typically the following. Determine the convergence of a series is often difficult. Determine the convergence of an integral is oftentimes much easier, because with the integral, we have the fundamental theorem of calculus for the series, we don't have it. The series only, the fundamental theorem of calculus applies to continuous functions, not discrete sequences. But because the integral test, which actually connects these two, we can sort of use the fundamental theorem of calculus to help us determine the convergence of a series.