Topics covered: Definite integrals
Instructor: Prof. David Jerison
Lecture Notes (PDF)
The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or to view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.
PROFESSOR: So we're going on to the third unit here. So we're getting started with Unit 3. And this is our intro to integration. It's basically the second half of calculus after differentiation. Today what I'll talk about is what are known as definite integrals. Actually, it looks like, are we missing a bunch of overhead lights? Is there a reason for that? Hmm. Let's see. Aah. All right. OK, that's a little brighter now. All right. So the idea of definite integrals can be presented in a number of ways. But I will be consistent with the rest of the presentation in the course. We're going to start with the geometric point of view. And the geometric point of view is, the problem we want to solve is to find the area under a curve. The other point of view that one can take, and we'll mention that at the end of this lecture, is the idea of a cumulative sum. So keep that in mind that there's a lot going on here. And there are many different interpretations of what the integral is.
Now, so let's draw a picture here. I'll start at a place a and end at a place b. And I have some curve here. And what I have in mind is to find this area here. And, of course, in order to do that, I need more information than just where we start and where we end. I also need the bottom and the top. By convention, the bottom is the x axis and the top is the curve that we've specified, which is y = f(x). And we have a notation for this, which is the notation using calculus for this as opposed to some geometric notation. And that's the following expression. It's called an integral, but now it's going to have what are known as limits on it. It will start at a and end at b. And we write in the function f(x) dx. So this is what's known as a definite integral. And it's interpreted geometrically as the area under the curve. The only difference between this collection of symbols and what we had before with indefinite integrals is that before we didn't specify where it started and where it ended.
Now, in order to understand what to do with this guy, I'm going to just describe very abstractly what we do. And then carry out one example in detail. So, to compute this area, we're going to follow initially three steps. First of all, we're going to divide into rectangles. And unfortunately, because it's impossible to divide a curvy region into rectangles, we're going to cheat. So they're only quote-unquote rectangles. They're almost rectangles. And the second thing we're going to do is to add up the areas. And the third thing we're going to do is to rectify this problem that we didn't actually hit the answer on the nose. That we were missing some pieces or were choosing some extra bits. And the way we'll rectify that is by taking the limit as the rectangles get thin. Infinitesimally thin, very thin.
Pictorially, again, that looks like this. We have a and our b, and we have our guy here, this is our curve. And I'm going to chop it up. First I'm going to chop up the x axis into little increments. And then I'm going to chop things up here. And I'll decide on some rectangle, maybe some staircase pattern here. Like this. Now, I don't care so much. In some cases the rectangles overshoot; in some cases they're underneath. So the new area that I'm adding up is off. It's not quite the same as the area under the curve. It's this region here. But it includes these extra bits here. And then it's missing this little guy here. This little bit there is missing. And, as I say, these little pieces up here, this a little bit up here is extra. So that's why we're not really dividing up the region into rectangles. We're just taking rectangles. And then the idea is that as these get thinner and thinner, the little itty-bitty amounts that we miss by are going to 0. And they're going to be negligible. Already, you can see it's kind of a thin piece of area, so we're not missing by much. And as these get thinner and thinner, the problem goes away and we get the answer on the nose in the limit.
So here's our first example. I'll take the first interesting curve, which is f(x) = x^2. I don't want to do anything more complicated than one example, because this is a real labor here, what we're going to go through. And to make things easier for myself, I'm going to start at a = 0. But in order to see what the pattern is, I'm going to allow b to be arbitrary.
Let's draw the graph and start breaking things up. So here's the parabola, and there's this piece that we want, which is going to stop at this place, b, here. And the first step is to divide into n pieces. That means, well, graphically, I'll just mark the first three. And maybe there are going to be many of them. And then I'll draw some rectangles here, and I'm going to choose to make the rectangles all the way from the right. That is, I'll make us this staircase pattern here, like this. That's my choice. I get to choose whatever level I want, and I'm going to choose the right ends as the shape of the staircase. So I'm overshooting with each rectangle.
And now I have to write down formulas for what these areas are. Now, there's one big advantage that rectangles have. And this is the starting place. Which is that it's easy to find their areas. All you need to know is the base and the height, and you multiply, and you get the area. That's the reason why we can get started with rectangles. And in this case, these distances, I'm assuming that they're all equal, equally spaced, intervals. And I'll always be doing that. And so the spacing, the bases, the base length, is always b/n. All equal intervals. So that's the base length. And next, I need the heights. And in order to keep track of the heights, I'm going to draw a little table here, with x and f(x), and plug in a few values just to see what the pattern is. The first place here, after 0, is b/n. So here's b/n, that's an x-value. And the f(x) value is the height there. And that's just, I evaluate f(x), f(x) is x^2. And that's (b/n)^2. And similarly, the next one is 2b/n. And the value here is (2b/n)^2. That's this. This height here is 2b/n. That's the second rectangle. And I'll write down one more. 3b/n, that's the third one. And the height is (3b/n)^2. And so forth.
Well, my next job is to add up these areas. And I've already prepared that by finding out what the base and the height is. So the total area, or the sum of the areas, let's say, of these rectangles, is-- Well, the first one is (b/n) (b/n)^2. The second one is 2b/n -- I'm sorry, is (b/n) (2b/n)^2. And it just keeps on going. And the last one is (b/n) (nb / n)^2. So it's very important to figure out what the general formula is. And here we have a base. And here we have a height, and here we have the same kind of base, but we have a new height. And so forth. And the pattern is that the coefficient here is 1, then 2, then 3, all the way up to n. The rectangles are getting taller and taller, and this one, the last one is the biggest.
OK, this is a very complicated gadget. and the first thing I want to do is simplify it and then I'm actually going to evaluate it. But actually I'm not going to evaluate it exactly. I'm just going to evaluate the limit. Turns out, limits are always easier. The point about calculus here is that these rectangles are hard. But the limiting value is an easy value. So what we're heading for is the simple formula, as opposed to the complicated one. Alright, so the first thing I'm going to do is factor out all these b/n factors. There's a b/n, here, and there's a (b/n)^2, So all told, we have a (b/n)^3. As a common factor. And then the first term is 1, and the second term, what's left over, is 2^2. 2^2. And then the third term would be 3^2, although I haven't written it. In the last term, there's an extra factor of n^2. In the numerator. OK, is everybody with me here?
Now, what I'd like to do is to eventually take the limit as n goes to infinity here. And the quantity that's hard to understand is this massive quantity here. And there's one change that I'd like to make, but it's a very modest one. Extremely minuscule. Which is that I'm going to write 1, just to see that there's a general pattern here. Going to write 1 as 1^2. And let's put in the 3 here, why not. And now I want to use a trick. This trick is not completely recommended, but I will say a lot more about that when we get through to the end. I want to understand how big this quantity is. So I'm going to use a geometric trick to draw a picture of this quantity. Namely, I'm going to build a pyramid. And the base of the pyramid is going to be n by n blocks. So imagine we're in Egypt and we're building a pyramid. And the next layer is going to be n-1 by n-1. So this next layer in is n-1 by n-1. So the total number of blocks on the bottom is n squared. That's this rightmost term here. But the next term, which I didn't write in but maybe I should, the next-to-the-last term was this one. And that's the second layer that I've put on.
Now, this is, if you like, the top view. But perhaps we should also think in terms of a side view. So here's the same picture, we're starting at n and we build up this layer here. And now we're going to put a layer on top of it, which is a little shorter. So the first layer is of length n. And the second layers is of length n-1, and then on top of that we have something of length n-2, and so forth. And we're going to pile them up. So we pile them up. All the way to the top, which is just one giant block of stone. And that's this last one, 1^2. So we're going backwards in the sum. And so I have to build this whole thing up. And I get all the way up in this staircase pattern to this top block, up there.
So here's the trick that you can use to estimate the size of this, and it's sufficient in the limit as n goes to infinity. The trick is that I can imagine the solid thing underneath the staircase, like this. That's an ordinary pyramid, not a staircase pyramid. Which is inside. And this one is inside. And so, but it's an ordinary pyramid as opposed to a staircase pyramid. And so, we know the formula for the volume of that. Because we know the formula for volumes of cones. And the formula for the volume of this guy, of the inside, is 1/3 base times height. And in that case, the base here-- so that's 1/3, and the base is n by n, right? So the base is n^2. That's the base. And the height, it goes all the way to the top point. So the height is n. And what we've discovered here is that this whole sum is bigger than 1/3 n^3.
Now, I claimed that - this line, by the way has slope 2. So you go 1/2 over each time you go up 1. And that's why you get to the top. On the other hand, I can trap it on the outside, too, by drawing a parallel line out here. And this will go down 1/2 more on this side and 1/2 more on the other side. So the base will be n+1 by n+1 of this bigger pyramid. And it'll go up 1 higher. So on the other end, we get that this is less than 1/3 (n+1)^3. Again, (n+1)^2 times n+1, again, this is a base times a height. Of this bigger pyramid. Yes, question.
STUDENT: [INAUDIBLE] and then equating it to volume.
PROFESSOR: The question is, it seems as if I'm adding up areas and equating it to volume. But I'm actually creating volumes by making these honest increments here. That is, the base is n but the height is 1. Thank you for pointing that out. Each one of these little staircases here has exactly height 1. So I'm honestly sticking blocks there. They're sort of square blocks, and I'm lining them up. And I'm thinking of n by n cubes, if you like. Honest cubes, there. And the height is 1. And the base is n^2.
Alright, so I claim that I've trapped this guy in between two quantities here. And now I'm ready to take the limit. If you look at what our goal is, we want to have an expression like this. And I'm going to-- This was the massive expression that we had. And actually, I'm going to write it differently. I'll write it as b^3 times 1^2 plus 2^2 plus... plus n^2, divided by n^3. I'm going to combine all the n's together. Alright, so the right thing to do is to divide what I had up there. Divide by n^3 in this set of inequalities there. And what I get here is 1/3 is less than 1 plus 2^2 plus 3^2 plus... plus n^2 divided by n^3 is less than 1/3 (n+1)^3 / n^3. And that's 1/3 + (1 + 1/n)^3.
And now, I claim we're done. Because this is 1/3, and the limit, as n goes to infinity, of this quantity here, is easily seen to be, this is, as n goes to infinity, this goes to 0. So this also goes to 1/3. And so our total here, so our total area, under x^2, which we sometimes might write the integral from 0 to b x^2 dx, is going to be equal to - well, it's this 1/3 that I've got. But then there was also a b^3 there. So there's this extra b cubed here. So it's 1/3 b^3. That's the result from this whole computation. Yes, question.
PROFESSOR: So that was a very good question. The question is, why did we leave the b/n^3 out, for this step. And a part of the answer is malice aforethought. In other words, we know what we're heading for. We know, we understand, this quantity. It's all one thing. This thing is a sum, which is growing larger and larger. It's not what's called a closed form. So, the thing that's not known, or not well understood, is how big is this quantity here. 1^2 + 2^2, the sum of the squares. Whereas, this is something that's quite easy to understand. So we factor it out. And we analyze carefully the piece which we don't know yet, how big it is. And we discovered that it's very, very similar to n^3. But it's more similar to 1/3 n^3. It's almost identical to 1/3 n^3. This extra piece here. So that's what's going on. And then we match that. Since this thing is very similar to 1/3 n^3 we cancel the n^3's and we have our result.
Let me just mention that although this may seem odd, in fact this is what you always do if you analyze these kinds of sum. You always factor out whatever you can. And then you still are faced with a sum like this. So this will happen systematically, every time you're faced with such a sum.
OK, now I want to say one more word about notation. Which is that this notation is an extreme nuisance here. And it's really sort of too large for us to deal with. And so, mathematicians have a shorthand for it. Unfortunately, when you actually do a computation, you're going to end up with this collection of stuff anyway. But I want to just show you this summation notation in order to compress it a little bit.
The idea of summation notation is the following. So this thing tends-- The ideas are the following. I'll illustrate it with an example first. So, the general notation is the sum of a_i, i = 1 to n, is a_1 plus a_2 plus dot dot dot plus a_n. So this is the abbreviation. And this is a capital sigma. And so, this quantity here, for instance, is 1/n^3 times the sum i^2, i = 1 to n. So that's what this thing is equal to. And what we just showed is that that tends to 1/3 as n goes to infinity. So this is the way the summation notation is used. There's a formula for each of these coefficients, each of these entries here, or summands. And then this is just an abbreviation for what the sum is. And this is the reason why I stuck in that 1^2 at the beginning, so that you could see that the pattern worked all the way down to i = 1. It isn't an exception to the rule. It's the same as all of the others.
Now, over here, in this board, we also had one of these extremely long sums. And this one can be written in the following way. And I hope you agree, this is rather hard to scan. But one way of writing it is, it's the sum from i = 1 to n of - now I have to write down the formula for the general term. Which is b/n (ib/n)^2. So that's a way of abbreviating this massive formula into one which is just a lot shorter. And now, the manipulation that I performed with it, which is to factor out this (b/n)^3, is something that I'm perfectly well allowed to do also over here. This is the distributive law. This, if I factor out b^3 / n^3, I'm left with the sum, i = 1 to n, of i^2, right? So these notations make it a little bit more compact. What we're dealing with. The conceptual phenomenon is still the same. And the mess is really still just hiding under the rug. But the notation is-- at least fits with fewer symbols, anyway.
So let's continue here. I've given you one calculation. And now I want to fit it into a pattern. And here's the thing that I'd like to calculate. So, first of all let's try the case-- S I'm going to do two more examples. I'll do two more examples, but they're going to be much, much easier. And then things are going to get much easier from now on. So, the second example is going to be the function f(x) = x. If I draw that, that's this function here, that's the line with slope 1. And here's b. And so this area here is the same as the area of the triangle with base b and height b. So the area is equal to 1/2 b * b, so this is the base. And this is the height. We also know how to find the area of triangles. And so, the formula is 1/2 b^2.
And the third example-- Notice, by the way, I didn't have to do this elaborate summing to do that, because we happen to know this area. The third example is going to be even easier. f(x) = 1. By far the most important example. Remarkably, when you get to 18.02, multivariable calculus, you will forget this calculation. Somehow. And I don't know why, but it happens to everybody. So, the function is just horizontal, like this. Right? It's the constant 1. And if we stop it at b, then the area we're interested in is just this, from 0 to b. And we know that this is height 1, so this is area is base, which is b, times 1. So it's b.
Let's look now at the pattern. We're going to look at the pattern of the function, and it's the area under the curve, which is this-- has this elaborate formula in terms of-- so this is just the area under the curve. Between 0 and b. And we have x^2, which turned out to be b^3 / 3. And we have x, which turned out to be-- well, let me write them over just a bit more to give myself some room. x, which turns out to be b^2 / 2. And then we have 1, which turned out to be b. So this, I claim, is suggestive. If you can figure out the pattern, one way of making it a little clearer is to see that x is x^1. And 1 is x^0. So this is the case, 0, 1 and 2. And b is b^1 / 1. So, if you want to guess what happens when f(x) is x^3, well if it's 0, you do b^1 / 1; if it's 1, you do b^2 / 2; if it's 2, you do b^3 / 3. So it's reasonable to guess that this should be b^4 / 4. That's a reasonable guess, I would say.
Now, the strange thing is that in history, Archimedes figured out the area under a parabola. So that was a long time ago. It was after the pyramids. And he used, actually, a much more complicated method than I just described here. And his method, which is just fantastically amazing, was so brilliant that it may have set back mathematics by 2,000 years. Because people were so-- it was so difficult that people couldn't see this pattern. And couldn't see that, actually, these kinds of calculations are easy. So they couldn't get to the cubic. And even when they got to the cubic, they were struggling with everything else. And it wasn't until calculus fit everything together that people were able to make serious progress on calculating these areas. Even though he was the expert on calculating areas and volumes, for his time. So this is really a great thing that we now can have easy methods of doing it. And the main thing that I want to tell you is that's we will not have to labor to build pyramids to calculate all of these quantities. We will have a way faster way of doing it. This is the slow, laborious way. And we will be able to do it so easily that it will happen as fast as you differentiate. So that's coming up tomorrow. But I want you to know that it's going to be-- However, we're going to go through just a little pain before we do it. And I'll just tell you one more piece of notation here.
So you need to have a little practice just to recognize how much savings we're going to make. But never again will you have to face elaborate geometric arguments like this. So let me just add a little bit of notation for definite integrals. And this goes under the name of Riemann sums. Named after a mathematician from the 1800s. So this is the general procedure for definite integrals. We divide it up into pieces. And how do we do that? Well, so here's our a and here's our b. And what we're going to do is break it up into little pieces. And we're going to give a name to the increment. And we're going to call that delta x.
So we divide up into these. So how many pieces are there? If there are n pieces, then the general formula is always the delta x is 1/n times the total length. So it has to be (b-a) / n. We will always use these equal increments, although you don't absolutely have to do it. We will, for these Riemann sums. And now there's only one bit of flexibility that we will allow ourselves. Which is this. We're going to pick any height of f between-- in the interval, in each interval. So what that means is, let me just show it to you on the picture here. Is, I just pick any value in between, I'll call it c_i, which is in there. And then I go up here. And I have the level, which is f(c_i). And that's the rectangle that I choose. In the case that we did, we always chose the right-hand, which turned out to be the largest one. But I could've chosen some level in between. Or even the left-hand end. Which would have meant that the staircase would've been quite a bit lower. So any of these staircases will work perfectly well. So that means were picking f(c_i), and that's a height. And now we're just going to add them all up. And this is the sum of the areas of the rectangles, because this is the height. And this is the base.
This notation is supposed to be, now, very suggestive of the notation that Leibniz used. Which is that in the limit, this becomes an integral from a to b of f(x) dx. And notice that the delta x gets replaced by a dx. So this is what happens in the limit. As the rectangles get thin. So that's as delta x goes to 0. And these gadgets are called Riemann sums. This is called a Riemann sum. And we already worked out an example. This very complicated guy was an example of a Riemann sum. So that's a notation. And we'll give you a chance to get used to it a little more when we do some numerical work at the end.
Now, the last thing for today is, I promised you an example which was not an area example. I want to be able to show you that integrals can be interpreted as cumulative sums. Integrals as cumulative sums. So this is just an example. And, so here's the way it goes. So we're going to consider a function f, we're going to consider a variable t, which is time. In years. And we'll consider a function f(t), which is in dollars per year. Right, this is a financial example here. That's the unit here, dollars per year. And this is going to be a borrowing rate. Now, the reason why I want to put units in here is to show you that there's a good reason for this strange dx, which we append on these integrals. This notation. It allows us to change variables, it allows this to be consistent with units. And allows us to develop meaningful formulas, which are consistent across the board. And so I want to emphasize the units in this when I set up this modeling problem here.
Now, you're borrowing money, let's say, every day. So that means delta t = 1/365. That's almost 1 / infinity, from the point of view of various purposes. So this is how much you're borrowing. In each time increment you're borrowing. And let's say that you borrow-- your rate varies over the year. I mean, sometimes you need more money sometimes you need less. Certainly any business would be that way. And so here you are, you've got your money. And you're borrowing but the rate is varying. And so how much did you borrow? Well, in day 45, which corresponds to t is 45/365, you borrowed the following amount. Here was your borrowing rate times this quantity. So, dollars per year. And so this is, if you like-- I want to emphasize the scaling that comes about here. You have dollars per year. And this is this number of years. So that comes out to be in dollars. This final amount. This is the amount that you actually borrow. So you borrow this amount. And now, if I want to add up how much you get-- you've borrowed in the entire year. That's this sum. i = 1 to 365 of f of, well, it's (i / 365) delta t. Which I'll just leave as delta t here. This is total amount borrowed.
This is kind of a messy sum. In fact, your bank probably will keep track of it and they know how to do that. But when we're modeling things with strategies, you know, trading strategies, of course, you're really some kind of financial engineer and you want to cleverly optimize how much you borrow. And how much you spend, and how much you invest. This is going to be very, very similar to the integral from 0 to 1 of f(t) dt. At the scale of 1/35, it's probably-- 365, it's probably enough for many purposes. Now, however, there's another thing that you would want to model. Which is equally important. This is how much you borrowed, but there's also how much you owe the back at the end of the year. And the amount that you owe the bank at the end of the year, I'm going to do it in a fancy way. It's, the interest, we'll say, is compounded continuously. So the interest rate, if you start out with P as your principal, then after time t you owe-- So borrow P, after time t, you owe P e^(rt), where r is your interest rate. Say .05 per year.
That would be an example of an interest rate. And so, if you want to understand how much money you actually owe at the end of the year. At the end of the year what you owe is, well, you borrowed these amounts here. But now you owe more at the end of the year. You owe e^r times the amount of time left in the year. So the amount of time left in the year is 1 - i / 365. Or 365 - i days left. So this is 1 - i / 365. And this is what you have to add up, to see how much you owe. And that is essentially the integral from 0 to 1. The delta t comes out. And you have here e^(r(1-t)), so the t is replacing this i / 365, f(t) dt. And so when you start computing and thinking about what's the right strategy, you're faced with integrals of this type. So that's just an example. And see you next time. Remember to think about questions that you'll ask next time.
This is one of over 2,400 courses on OCW. Explore materials for this course in the pages linked along the left.
MIT OpenCourseWare is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.
No enrollment or registration. Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.
Knowledge is your reward. Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.
Made for sharing. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)
Learn more at Get Started with MIT OpenCourseWare