Now, we want to find out what happens to functions that don't live above the x-axis. What happens to function, if it's not strictly positive. It's the same idea, that even if I have a function that goes up and down and does something like this, then I can still approximate it with rectangles. But something is going to happen when I get to this negative part where the rectangles get below. This is going to get to the idea, how does this area of rectangle contribute to the overall sum, total accumulation. The idea is you can't have something like negative area, you can't have negative distance, but you can the difference between total distance and net distance. For example, if I turn two miles north and I turn around and run two miles south, I've run a total of four miles, but I'm in the same exact location. My net distance traveled is zero. This play an important role when working out how much work or something like in physics terms, what the difference is and you need both. We're going to try to capture this notion and we'll do it through an example. But this is done in what's called the definite integral when we allow for any function f and we don't require it to be strictly positive so we can have this notion. Will say f is a function. If f is a function defined on a closed interval from a to b then, and here's the new definition, the word of the day, the definite integral of the function, so f on the interval, so all these pieces are important is the number and this is important to realize. I'm going to write down some big crazy expression, but it's just a number. The integral from a to b, I'll talk about that sign in a second of the function dx. This is going to equal the limit as n goes to infinity of the sum from i equals one to n of f of x_i Delta x. Remember from our formulas from before, Delta x is b minus a over n, right endpoint minus the left point over n. Your sample points, you can pick whatever you want. For the cases we've been doing, we've been picking a plus i Delta x. That is the right endpoint for those. Nothing wrong with picking the left-hand point or even something in the middle. Because as you can imagine, in your head imagine, these rectangles getting smaller and smaller and smaller. As you do, the walls come collapsing in and the right end point becomes the left endpoint in the limits. When you're working with the limit, it doesn't matter. If you're trying to approximate, it starts to matter if you have overestimates or underestimates based on if you're doing right endpoints or left endpoints of function. A couple things to point out in this definition one is the limit. Some limits don't exist. It is possible to have a function that's not integrable. If the limit exists, we say that f is integrable, good word for you. Integrable. It's possible to have function, it's not integrable. Think of something like, infinite area or some asymptote that does misbehaves or something like that. It is a limit, although most of the stuff we'll see in this class will exist. The variable x is a dummy variable. X is a dummy variable. There's nothing wrong with using t or Theta, especially if it's time you want to use t when you get trig functions, angles, Theta tends to be the variable of choice. You can definitely see this written as f of t, dt, something like that, or Thetas, whatever. Then I guess we should talk about this new symbol. This is a elongated s. This is our integral sign. This is like a long s, and it comes from the fact that we're summing things. They say this is the integral sign. Notice you read it from low to high, so a to b. We say the integral from a to b of f and last but not least is this bookend the dx. At the end, the variable always has to match. Notice if we use t becomes dt, if we did Theta, it becomes d theta. We'll talk more about what this is in this course and future courses. For now, just think of it as like the closing piece of bread to your delicious definite integral sandwich. If you have an integral sign, you have to have the dx. It's like two bookends. If when you integrate, like when you're actually work this thing out, notice it goes away. When the integral sign goes away, the dx goes away as well. This is our formula. As a math formula is best done that with an example, so let's go through one. For a function that is not strictly positive and will try to see how or what the integral actually captures. The example I want to study is the definite integral from minus one to five of one plus 3x. I need the dx over here, dx. Let's regraph this. This is a line and purposely picking a easy-ish example so we can see how this works. Let's plot some points here. When x is 0, we have a nice y-intercept of one. When we're going from minus one over here. If you can check, if you set it all equal to 0, you're going through the x-axis at minus one-third, and I'm only going, let's draw a picture to five. You plug in 5 you get 15 plus 1 is 16, way up here. It's not drawn to scale, but you get the idea. You have this triangle, that hits something like that, comes down at minus a third. So you have this big triangle here, where the function is positive and then there's this little baby triangle that happens over by negative 1 to a third that's underneath here. It's like a line before we have two triangles, we have the first triangle, call it A1, and we have a second triangle call it A2. So if I wanted to find the area of these two piece, I know how to find the area of triangles, one half base times height. In our case over here it's one half. Now the base of this little baby triangle, it's negative 1 third, there's where the x intercept is, so this is two-thirds. The height comes from the function, so the line goes all the way down. If I plug in negative one, which is where I'm stopping the domain f of negative one. What do I get? I get 1 minus 1, that's 2, so down here the graphs at minus 2, but of course that just makes the height 2. Put all together, you get one half, two-thirds and 2. The one-half and 2 cancel, and I get that this has an area of two-thirds. Now, the larger triangle, of course the formula is the same one-half base times height has, let's figure this out here. The base of this triangle, it's all five units to the right of the y, and then I get this two-thirds over here. It's like five and a third. So five and a third to write as a mixed number. It's all five up to when the third get into that x-intercept or 16 over three. Then the height comes from the function plugged in at five and that's 16. Put it all together, you can write as a mixed number, you get 42 and two-thirds. The big triangle has area of 42 and two-thirds, the smaller triangle has area of two-thirds. Now let's go through what the limit and the definition of this Riemann sum of this definite integral, and see what we actually get. Let's write the formula first and then we'll get the pieces that we need. Sides the limit as an goes to infinity of i equals 1_n of f of x_i Delta pieces that I need. I need Delta x. Remember this is the right endpoint minus the left-hand point over n. In our case over here it's 5 minus minus minus one, be careful, which is 6 over n. Then we need the sample point x_i which is a plus i Delta x. So that's minus 1 plus and then i times Delta x plus 6i over n. Nothing you could do with that. Then of course, you got to find the function at these values that gets you the height of the rectangle. The function is 1 plus 3x. So I plug in 1 plus 3 minus 1 plus 6i over n. I'm evaluating the function at this expression. Let's clean this up a little bit. You get 1 minus 3, that's good old minus 2. Then bringing the 3 in to both pieces, you get 18i over n. F of x_i is minus 2 plus 18i over n. Go back to our limit definition. The limit every time because I haven't actually taken the limit that Delta x is 6 over n, I can just factor that out. Nothing going on there, there's no i's attached to it. I have the sum from i equals 1_n of, I'll use parentheses here because I don't want to mess this up,18i over n. Our goal at this point, once we have this down is to get rid of the Sigma, swap it out with one of our formulas for known sums. Be careful because I have two expressions on the Sigma, it's going to distribute to both pieces, so just be careful with that. It's 6 over n times the sum from 1 over n of minus 2 plus the sum from i equals 1_n of 18 i over n. We can clean this up as we go. If the first one we can clean up as the sum of a constant term, this says add minus 2 and times. Minus 2 plus minus 2 plus minus 2 blah, blah, blah. Minus two added a bunch times is repeated addition, it goes by a better name that's multiplication. It just becomes minus 2_n multiplied by n. The second term, you can pull out the 18, you can pull out the n, and you get, we've seen this before, the sum of i. One plus 2 plus 3 plus 4, that is the formula, little Gauss story, baby Gauss adding up the numbers 1-100. It becomes, so I loose anything as we go. The formula for that was n, n plus 1 over 2. n times n plus 1 over 2. That's our formula there. Close up all the parentheses. We're getting there. All the Sigma's have gone away. I just have an expression, you can already see some stuff is going to start to cancel. There's n is on the top and bottom that cancel. There's a 9 and a 2 that also cancel, and so now let's distribute the 6 n into both pieces, and you get the limit as n goes to infinity of minus, lost the n here, so this, the n's cancel as you bring this part in. You just get minus 12 for the first time, and then plus, what's left here? Do the constants first 9 times 6, what's that, 54, and then you have n plus 1 is still remaining, and then n downstairs. Put it all together as we take a limit, the limit, the only thing with an n is the second term. The degree of the top and bottom are both 1. The limit is the ratio of the leading terms. You get 54 minus 12 better known as 40. That's the right answer. The question is, what does that mean in terms of this function that goes both above and below the x-axis. Go back to our picture. We had the first triangle was 42 and two-thirds, and the second triangle is two-thirds. It's nice because you can hopefully see what's happening here. The second smaller triangle the little baby triangle that's underneath the x-axis. This little triangle that's there is being subtracted from the bigger triangle. It's not calculating the total area, I have to add these things up and I get 43 and change to do this if I were calculating total area. But instead what's happening is I'm collecting all the area that's above the x-axis, and subtracting it from what's below the x-axis. You can think of this, I know this is, in terms of areas, it might not make a lot of sense but we have distances. It does. This is the net area. Net area under the curve. This is what's above the x-axis, [inaudible] , and then we subtract below. This is the net area, so it doesn't capture the total area, that's a big takeaway here. If you have some area below the x-axis, you must subtract it off. That's the interpretation of this number. Now let's do one more example just to see, and we'll keep this one short since this was run a little long here. Let's do one of these and I want to show you what's nice about these things. Once you know what these are, then sometimes they get easier to do. Here's an example, and we're going to use our pre-calc knowledge here. Here's an example that is really, really hard to do using limits, this definite integrals. This is the definite integral from 0 to 1 of the square root of 1 minus x squared dx. Really hard if you try to go through this, the limit definition, and I'd love to know like what this number is equal to. But because I understand that definite integrals are the area under a curve, maybe I can use that to my knowledge. What is this graph, what graph is this. I'm trying to graph y equals the square root of 1 minus x squared. Maybe you know this graph, maybe you don't, but if we square both sides, you get 1 minus x squared, and move the x over, you get x squared, plus y squared, is 1. That might be the more familiar form of this graph. I only want from 0 to 1, so I only want to hang out in quadrant one, just go for zero. This is the unit circle and I'm only hanging out where y is positive. So y is going to be positive or it is greater than equals 0, and I'm in where x is between 0 and 1. I only want like the quarter of the circle. Maybe you can recognize that, maybe you can figure that out. But the point is if I'm trying to figure out what a function is, one of the techniques that we can use instead of doing the limit definition is we can think of it as the area under graph. Now the whole area is above the x-axis, so whatever number this is, is just positive, I don't have to subtract anything off. This is the area under the curve and this is a quarter circle. Now we know what that is. It's one-fourth the area of a circle, Pi r-squared, of course, is our circle, and we're going to evaluate this. What's the radius of the circle? The unit circle has radius 1, and so plug-in 1, 1 squared times Pi is just Pi and say Pi over 4. This is a nice little way, it doesn't call it too often where the shape of the graph is something we know. But it's good to know when it does and the circles and is a nice one to do this. But so Pi over 4 for this one and the other one, of course, we could have gotten using triangles, but I wanted to show you how the limit definition captures the net area under the curve. We'll start with these two examples, but we'll see some more for the homework, practice problems, and other stuff in the course. But keep these two in mind as you go along. See you next time.