 The definite integral is our lesson for today. We are going to relate how we work with those RAM, rectangular approximation method of finding the area under a curve to a new formula, which is the integral formula. And I have put both up here. So the integral formula is read as the integral from a to b of f of x dx, and that is equal to the limit as n approaches infinity of the sum of i equals 1 to n of f of x sub i delta x sub i over the interval a b. Now as you look at the right hand side of this, the f of x delta x, these are the areas of all the rectangles that you make as the area under the curve. What we are doing here is summing all of those. Remember you had in the last lesson, we were working with these or fs as you did your homework, and you were summing all those little areas together. Well this is each height and each width. The width can vary with each rectangle. When we do them by hand, we don't normally vary them, but sometimes that can happen. So what we are saying if we get enough of these rectangles together and stack them all together and add them up, we will get the area under the curve, the true area under the curve. And that's why we use the limit as n approaches infinity because i equal 1 to whatever number means each individual rectangle that we are going to sum up, we're going to sum up to the number n, but we're saying n is approaching infinity. So now we have an infinite number of rectangles here. And that's going to be equal to our integral. And again we see that little s symbol, there's our f of x, and there is our dx, which is the area of the rectangles, only these rectangles are very very tiny, and we're summing them from a to b. Let's go through this concept a little bit more to make sure we have it nailed. If we draw three graphs of sine x from 0 to pi over 2 and with four subintervals, we have that. Then we want to sketch l-ram, r-ram and m-ram. For this one, l-ram starts here, and since that's 0 and we're doing the area, that area from here to here is 0, and then we'll do this one with that height, and then the next one with that height, and then the last one with that height. And we will see that one of these has an area of 0, so this will give us an underestimate. If we do r-ram, we'll start with the first segment and use that as the height, and we'll get that for the first rectangle, this one for the second rectangle, this height for the third rectangle, and this one for the fourth one. Again this one will give us an overestimate because we can see that the rectangles are greater than the curve. For m-ram, we'll get something in the middle, and we can see as we even draw these rectangles, they become a little bit more like the curve itself, and we'll get a better estimate of the answer. So in determining the actual areas of these, you can use your calculator because we do have a graph, or a function that we can use, and we do have the A and B interval, and we will find for each of these that the l-ram is 0.791, the r is 1.183, and the m-ram is 1.006. It's a compromise of course between the l and the m, the one that's too high and the one that's too low. Now suppose we extend this little further and say, well, let's make sketches of the three graphs again and divide it into ten subintervals, and do the r-ram, l-ram, and m-ram for all of these. Well, again, we'll start 0 here, and then the increments, you can see this one's all 0, the increments are smaller, the second one is the r-ram, we'll start at the first increment, and of course this will still be a little bit higher, but the m-ram will be in the middle. The question is, are you getting closer to the actual area? Well, when we put this into our calculator, we find that the l-ram gives us 0.919, the r-ram gives us 1.076, and the m-ram gives us 1.001, and you notice they're all getting closer together, so as we put in more subintervals, the numbers for l, m, and r are getting closer and closer together. So what happens if we continue this further and go to 50 subintervals? Well, from your calculator again, we would never calculate this by hand, we get the l to be 0.984, the m to be 1.000, and r to be 1.016, again, closer and closer to 1. Well, let's even extend this one more time, l for 250 is 0.996, getting closer to 1, m, the m-ram is already at 1, and r is 1.003, again, all three are getting closer to 1, so the answer for the area under the curve of sine x between 0 and pi over 2 must be approximately 1. Now the question is, is your answer more accurate? Yes, it is, because the l, m, and r are becoming the same number. How do you know? Because with the number of subintervals increasing, it doesn't matter whether you do left hand, right hand, or m, the mid, the answer is pretty much the same. Well, what is the formula for all of these areas? Keep thinking, we're summing lots and lots of rectangles together, so we have lots and lots and lots of these little rectangles, and we're getting to an infinite number of these rectangles that we're finding the areas for and adding together. So we will sum sigma, the area of our rectangles, and the area of each rectangle, remember, is f of x sub i delta x sub i, and we are going to sum them from i equals 1 to n. Now you might say that, well, this is all the right hand limits, yes, but it doesn't matter at this point whether they're right hand, left hand, or mid, because once we put the limit as n approaches infinity here, we have an infinite number of rectangular areas that we are summing together. And then we say in calculus that this is equal to the integral from a to b of f of x dx. And remember, the delta x here is a very, very tiny difference. Here it can be any size we want it to be, but this delta x is very, very tiny, and of course, again, this is the area of each rectangle. And normally when we write this on that side, we put the integral from a to b. This is called a Riemann sum. When we are adding all these rectangles together and making them into an integral, this is called a Riemann sum. Let's go over again one more time what all this means, how we write this mathematically. We write the limit as n approaches infinity of i equals 1 to n. We're meaning we're summing up all the areas of our rectangles of f of x of i delta x of i over the interval a, b, and we have the summation sign. We have the subdivisions where n approaches infinity, which makes many, many, many subdivisions. f of x sub i is the value of the height of the particular rectangle that we are finding the area of, and delta x is the width of the particular rectangle. And then for the integral portion of this, this little symbol here is an integral, and it stands for sum. And you go from a to b. This is the lower number. This is the upper. Okay, this is smaller. This is larger. This is very important. And you say from a to b, from 2 to 3. And then the f of x, again, is the height of the rectangle. And the dx is the width of the rectangle. But again, the width is very, very small. And this, again, is how we represent our area under a curve using calculus with our integral here. This remount sum summation tells us where we are coming from, but this is what we use. So in conclusion, the area under a positive curve is the sum of many rectangles. But this sum is equal to the integral from a to b of f of x dx. Well, let's have an example of this. You've used your RAM program to find the area under the curve of f of x is equal to sine x from 0 to pi over 2. Well, now we're going to use the integral key on our calculator. So in my calculator, I will put sine x. Now there are a couple of ways to do this. We can actually graph first. So let's do the new window, 0, 2, and y go from negative 2 to 2. We can graph that. So one way we do this is to actually use the second trace. And you'll see number seven is the integral of f of x dx. So we'll press 7. The lower limit for us will be 0. The upper limit will be pi over 2. And in this case, you'll see a nice blackening in of all the little rectangles and a final answer of the integral of f of x dx is equal to 1. So that's one way we can do this on our calculator. The other way to do it is to just go to the home screen and do math. And then I'll toggle down, but you could just do math 9, which is finint, we call it, function integral. And put in the function we're going to put in. And this time I'm just going to put it in under the vars. And then comma x. And we always have to put in the independent variable. And then we put the interval in next. So we go from 0 to pi over 2. And this will just do the calculation for us and give us the answer 1. So we have actually two ways to do this on our calculators. So what about functions that lie below the x-axis? What are we going to do with those? Well, remember, everything we have devised so far is for functions above the x-axis. Well, very simply, these functions that lie below the x-axis have negative areas. And we have to take that into account if, indeed, we are determining the area under a curve rather than just an integral. For example, we have a function here. f of x is equal to the absolute value of x plus 4 minus 4. Use geometry. In this case, we can use our calculator, but we can also use geometry to determine the area from x equals negative 8 to x is equal to 4. Well, let's look at the graph of this. So we're going from negative 8 to positive 4. And we see the vertex of our absolute value function is 4 to the left and 4 down. So we go 4 to the left and 4 down and make the vertex point. We have 0s when x is equal to 0 and when x is equal to negative 8. And then the other point we have to consider when x is equal to 4, y is equal to 4. So we make that point. So we have our v sitting here and an extents up to that point. And we see, in order to find this area, we have to add two areas together. We have to add the area below the x-axis to the area above the x-axis. So in finding the area below the x-axis, we see that it's a triangle. So triangle area is 1 half base. So the base is 8 and the height is 4. Of course, it's a negative 4. So how we can do that is we can put the negative 4 in an absolute value it. That way, this will come out as a positive. Plus, we're going to add the area above the x-axis, which is 1 half of 4, which is the base, times the height, which is 4. And in doing all of that, we will get, this is 1 half of 8 times 4, which is 16. And we're going to add 8 to it. And we will get 24 as an answer. Well, are there other ways? Well, I did say there was another way to do this. We can actually do this on our calculator. Again, we will have to put into our calculator the absolute value of the integral of the negative piece. Well, that goes from negative 8 to 0. And then we'll put in the absolute value of x plus 4 minus 4. And I'm going to put the dx on that. And then we're going to add to that the positive piece from 0 to 4 of the absolute value of x plus 4 minus 4 dx. And I'm not going to do it with the graph, but just the function itself. So in my y1, I'm going to put absolute value. So math num gives you your absolute value of x plus 4, then minus 4. And then we're going to quit that and just do our math 9. And we have to take it in pieces on this one. So we're going to do it from negative 8 to 0 for the first one. And get that answer, which in this case is negative 16. We're going to absolute value that. You can set it up as an absolute value originally or not. And we're going to add it to the other side. And there are many ways to do this. You don't have to do it exactly like I do it. But you have a shorter way to do all of that. And you get the answer 24 again. So on your calculator, it's done that way. But the integral that becomes negative has to be changed to a positive if indeed you want to find the actual area. If you just want the integral itself, you will have what we call a net area. Well, how do we work this Riemann sum backwards and forwards? Suppose we're given the integral and we want to write it as a summation. Or suppose we're given the summation and we want to write it in an integral. Here's an example. Express the limit as a definite integral. And we have the limit as n approaches infinity of i equals 1 to n of cosine x sub i delta x sub i from 0 to pi. So this integral is written. We know what a and b are, 0 pi. Always lower to upper. Remember, smaller to greater. Our function is cosine x. We just put the sub i on it to note what rectangle we're on. And our delta x sub i becomes dx. And that's the answer. Very simply done. The intervals in there, the functions in there, the dx is in there. Express the limit as a definite integral. Well, this one's slightly different. This one isn't a sine or a cosine or a tangent. This one is actually a power function. Again, we look for the interval first, which is negative 3 to 1, negative 3 to 1. Our function lies all in here with the 3 sitting in front of it. We don't put x sub i in. We just put x. And then we put the delta x, the dx. And that is how we write the limit as an integral. We have done limits to integrals. Now let's go backwards and do it the other way. Express an integral as a limit. So this one says, express the definite integral as a limit. The integral is negative 1 to 5 of x squared plus 1 over 3 dx. And we need our sigma. And we'll go from i equals 1 to n. And of course, we need our limit as n approaches infinity. We need what number we're heading towards. This time it's infinite. And wherever we see an x on our integral, we're going to do x sub i. So that's x sub i squared plus 1 over 3. And our dx becomes delta x sub i. And the only other piece we need is our interval negative 1 to 5. This concludes our lesson on the definite integral.