In today's video, we formalize the methods that we have been using in earlier videos where we estimated areas using rectangular approximations. This leads to the method of Riemann sums which involves partitioning the interval of interest into tiny subintervals over which rectangles are formed reaching up to the curve. As the partitions get finer and finer as the distances along the x-axis between successive points tend to zero, the Riemann sums approach a limit which we think of as the area under the curve. This area is called the definite integral, denoted by a stylized S called an integration symbol, which you can think of a some kind of continuous sum. The symbolism is all due to Leibnitz, the great visionary from the 17th century. It wasn't until the 19th century that the mathematics had evolved sufficiently to be regarded as having secure and rigorous foundations. We describe the method of Riemann sums attributed to the famous 19th century mathematician Bernhard Riemann. Though in fact the method and proofs were the combination of combined efforts in mathematically evolution by many mathematicians spanning the 17th, 18th, and 19th centuries. We consider a curve y equals f of x, drawn here for x between a and b, where a is less than b. We find the area denoted by capital A between the curve and the x-axis over this interval, by forming approximations and then taking some kind of limit. The method proceeds in four steps. In the first step, we break the integral up into smaller pieces called subintervals. By choosing numbers, say t1, t2 up to t n minus one, in-between a and b, where n is some positive integer, which you can think of as being large, and its continuance called a t zero and b tn. We call the sequence of numbers a partition of the interval from a to b. In the second step, we use the partition to form rectangles that reach out to the curve, and then put all of the areas together with the aim of approximating the area under the curve. In this drawing, the rectangles all sit beneath the curve, but in fact, one has complete freedom to create rectangles that use any points at all within the subintervals. If we focus on the ith subinterval, for typical i between one and n, we can choose any xi between ti minus one and ti. Move up to the curve and form a rectangle of height f of xi, which has an area that we can calculate easily. It's width, we call delta xi, which is just the difference ti minus ti minus one. The area becomes the height f of xi multiplied by this width delta xi. The third step is to add up all of these areas. Our area capital A under the curve will be approximately the area of the first rectangle when i equals one that is f of x one times delta x one, plus the area of the second rectangle when i equals two, that is f of x two times delta x two, all the way up to the area of the last rectangle when i equals n, that is f of xn times delta xn. This huge sum can be written concisely using sigma notation with Greek letter capital sigma S for sum is an abbreviation for adding up all of these areas, with typical expression f of xi times delta xi as i ranges from one up to n. This expression which will have many terms if n is large is called a Riemann sum. Now, we can stop at this step if we wish to get a very good approximation to the area A if we've chosen n large enough, and we'll come back in a moment to illustrate this with an example. But there's an important fourth step, which is to see what happens to the Riemann sum in the limit as n gets arbitrarily large. If all the conditions are right, such the curve being continuous and we followed the previous steps carefully, then the approximation to the area A turns into an equality. We reach the actual area A by taking the limit of the Riemann sums. We have a special notation for this using a stylized S called an integral symbol, with a few features I'll mention in a moment. The overall expression is called a definite integral. There's also something called an indefinite integral which we'll come to in a later video. Notice how a differential dx appears replacing the delta xi. F of x replaces f of xi. The jagged sigma symbol is replaced by the nice smooth integral symbol, and we have Leibnitz to thank for that, and the limit notation has disappeared. The i ranging from one to n is replaced with a and b, the endpoints of our interval, with i as a subscript and b as a superscript. To aid our intuition, it can be helpful to think of the expression f of x times dx as the area of an infinitely thin rectangle of width dx and height f of x. Here's the curve again with x ranging between a and b. You can imagine forming this infinitely thin rectangle from x up to the curve, almost like a single line segment with height f of x and width, the infinitesimal differential dx. So, that when we form the definite integral, it's as though we're taking a continuous sum of all these infinitesimal areas f of x times dx as x ranges from a to b. That's certainly how Leibnitz thought of it. The Riemann sum is a discrete quantity involving finitely many terms representing an approximation which you can think of when we take the limit as becoming a continuous process that finds the actual exact area under the curve, the definite integral also called the Riemann integral. It's a very important theorem proved carefully in the 19th century, that if y equals f of x is a continuous function for x between a and b, then the limit of the Riemann sums exists as n goes to infinity, provided the width of the subintervals in the partition of the interval denoted by delta xi for each i tends towards zero. To guarantee existence to this limit, we have to make sure the partition gets finer and finer, so that the width of the rectangles goes towards zero as n gets arbitrarily large. This result is very subtle and difficult to prove. The value of the limit is independent of the choices you make in the first step when forming the partition of the interval, and you don't even need the widths of the subintervals to be the same size. Also in the second step, when you have complete freedom to choose your xi from anywhere within the ith subinterval. There are doubly infinitely many different choices as you perform these steps and incredibly they all produce the same limit as n gets arbitrarily large. Here are the main features of the definite integral. We have the differential dx at the right, the terminals a and b reminding you of the endpoints of the interval, and the rule for the function f of x sandwiched in the middle referred to as the integrand. Let's use a Riemann sum to estimate the area under the curve representing the unit circle as x ranges from zero to one. The equation of the circle is x squared plus y squared equals one. So, rearranging this, y is the positive square root of one minus x squared. The area is the definite integral using root one minus x squared is the integrand and zero and one as the terminals. But, this represents the area of one quarter of the unit circle, which you can see is just Pi on four. So, in fact, we're going to use the Riemann sums to approximate Pi on four. In this illustration, we'll use 10 sub-intervals, all of width 0.1. We're going to produce two approximations using rectangles that sit beneath the curve to get a lower bound for the true area, and rectangles that sit above the curve to get an upper bound. We first create what is called a lowest sum by moving up to the curve, making sure all the rectangle sit beneath the curve. Then, take the areas colored green, which we add up to form what we call capital L for lower sum. Each of the rectangles has a common width of 0.1 units, which comes out as a common factor, and heights the y values. The square root of one minus x squared for the discrete inputs x equal to 0.1, 0.2, 0.3, all the way up to one. You can check this evaluates to approximately 0.72613, and this becomes our lower estimate for the area Pi on four. We can repeat this process, but now forming what we call an upper sum by moving up to the curve, and using rectangles that sit above the curve, and obtain the areas by topping up the green areas already in the diagram with this extra blue areas. We can then add up all the areas to get what we call U for upper sum. Noting that again, the interval widths are all 0.1 coming out as common factor. Now, the heights of the rectangles are the y values as x goes from zero, 0.1, 0.2, all the way up to 0.9, which you can evaluate to get approximately 0.82613. If you're astute, you'll notice from the diagram that in this case, the upper sum is just the lowest sum shifted to the right 0.1 units plus the area of the very first rectangle, which is 0.1. Then, we can get u by adding 0.1 to L. In any case, we have a lower bound L and an upper boundary for the area of one-quarter of the circle. The true area is somewhere in between, so we take the average, which turns out to be about 0.776. You can compare this with the true value of Pi on four, and see that they almost agree to two decimal places. Now our approximation is an underestimate. This is to be expected as the curve is concave down, and taking averages in this way corresponds to approximating the curve using trapezoids as explained in an earlier video. Trapezoids sit just slightly below the curve when it's concave down. If we use more subdivisions of the interval, then we'd expect getting a more accurate estimates of pi on four. We have some further technical definitions involving definite integrals. Preceding discussion assumed throughout, we were finding areas over an interval ab, where a is less than b. What if the terminals a and b are the same? It's as though we're integrating over degenerate infinitely thin interval with zero area. So, it makes sense to define the definite integral from a to a to be zero. There's also a rule that says that we can swap the positions of the terminals. But, then, we have to multiply the definite integral by negative one. This makes perfectly good sense. Consider again the interval from a to b, where a as usual is less than b. If we decide to change direction by putting the car into reverse, and move instead from b backwards towards a, then we'd be reversing the direction that we're traveling along that same interval, which has the effect of creating negative bases, and hence negative areas of rectangles. If you look carefully inside the expression for the Riemann sum, the term Delta x_i the, difference in the x values, will become negative instead of positive as you move from right to left instead of from left to right. The signed area of the rectangle inside the sum gets multiplied by the negative base Delta x_i. Now, in all the diagrams we've used so far, the curve, y = f(x), has been sitting above the x-axis, so all the y values used to build the rectangles in the Riemann sum have been positive. If the curve goes below the x-axis, then the y values become negative. Used as heights of rectangles in the Riemann sum formula, that will contribute a negative sign to the areas. Thus, areas under curves as we go from a to b, where a is less than b, are negative. For example, consider the curve, y = cos x, x moving from zero to Pi. For x from zero to Pi on two, the curve is above the x-axis, and the area is positive, colored green. But, the x from Pi on two to Pi, the curve is below the x-axis, and the area is negative, colored pink. By symmetry, the magnitudes of the areas, ignoring the signs, are the same. So, the indefinite integral from zero all the way to Pi must evaluate to zero as a positive and negative areas exactly cancel out. We can actually split the integral into two pieces. The integral from zero to Pi on two, giving the green area, plus the integral from Pi on two to Pi, adding on the pink area, giving a combined total of zero. This is an example of a general fact that definite integrals might be broken up into pieces. If we want to integrate over a long interval, say from a to c with b somewhere in the middle, we can split the definite integral into two pieces. The integral from a to b, and then from b to c, and combine them by addition. This makes good sense as we are creating one large area by adding together the small areas in succession. There are other important properties. The definite integral is additive, describing another way of splitting an integral into pieces, which means the integral of a sum is the sum of the integrals. This means that you can split the integrand up into pieces, integrate them separately, and then combine the answers using addition. As usual, constants come out the front. Both of these properties follow from corresponding properties about limits of sums and limits of constant multiples, and the fact that definite integrals are themselves limits of Riemann sums. Let's apply these principles to an example. Recall from last time that the area under the parabola y equals x-squared as x goes from zero to one is one-third, which says that the definite integral evaluates to exactly one-third. Even easier is the area under the constant function y equals one as x goes from zero to one, which of course is one square unit, which gives us another definite integral. So, we have these two definite integrals and can use them to find the integral of, say 12 x-squared minus five over the same interval. First, split the integrand into two pieces, which we integrate separately, then bring constants out the front, and evaluate using the known values above. The answer turns out to be negative one. By following these rules, we can predict that the net signed area turns out to be negative. You can see the effect by drawing the portion of the parabola for this interval. It doesn't matter that my scales are different for the x and y-axis. Notice that the pink area under the x-axis doesn't date appear to exceed the green area above the x-axis in magnitude. In today's video, we discussed in detail the method of Riemann sums, which uses rectangles to approximate areas under curves. There are four steps. When first partitions the interval forming N sub-intervals, then one builds rectangles that reach up to the curve, then one adds together the areas to form the Riemann sum, and finally one takes to limit of these expressions as N gets arbitrarily large. It's a major theorem that if everything is well-behaved, and length to sub-intervals 10 to zero, then the limit exists. This limit of the Riemann sums is called the definite integral, also called the Riemann integral, and represents the exact area under the curve. We express this symbolically using an integral sign, which is like a stylized S for sum. Important features of this notation include the integrand, which is the value of the function, multiplied by the differential, and the use of terminals, which is just the endpoints of the interval over which we're working. We used the Riemann sum to approximate the area under one-quarter of the unit circle by taking the average of lower and upper bounds. We also mentioned important properties of the definite integral: that areas are multiplied by negative one if one swaps the terminals; that areas beneath the x-axis have a negative sign; that we can split an integral into pieces by integrating along subintervals and joining the areas together using addition; that we can split the integrand into pieces again under addition; and finally that we can bring constants out of the front. Please read the notes. When you're ready, please attempt the exercises. Thank you very much for watching and I look forward to seeing you again soon.