Hi, everyone. Welcome to our lecture on average values of a function. Let's recall a couple of things before we get into the average value of an actual function. You've seen averages before. I'm sure you've asked your teacher at some point what is the average on the test but to find the average of a list of numbers and let's just call them x_1, x_2, x_3, x_n, so you have some n list numbers and maybe like n test scores or something. Then the average, which is usually denoted as x bar, is the sum of all the numbers, you add up all the numbers you have, all the way to x_n and then you divide by the total size of your list. This is a super quick example, just so we can put some sense of this formula. If I have three test scores, let's say my list is 75, 32, and 87 and I want the average of these numbers, I add them up. I divide by three, the size of my little set. I get 194 over 3. That of course, is 64.6 repeating. Usually when you have values you care about, you round them. We'll just call this approximately 64.7. Fine, easy. We've seen it, we've done it, not a problem. Now, however, let's go to the task at hand. What if I have a list that is not finite, that not just ends at a certain number, but is actually infinite. What does that mean when we say we have an infinite amount of numbers to take the average of? Well, let's find the average of sum function over an interval. This is going to be on the real line for a less than or equal to x, less than or equal to b. If you think about what this means, I have some interval from a to b, I have some function f of x and I want to know what are the average values that all these numbers take. This is a very different skill than just adding up the numbers and dividing by the size of the list the number of numbers we have. We can't even add them all up because it's infinite. So you say, Well, why would I ever want to do this? What's the point of this thing? Well, you can imagine that the x-axis now is going to represent time. So we have some continuous time interval and I have a function over this interval or I want to know the average of. You use these every day of your life, most likely, for example, when someone tells you what the temperature is going to be. They tell you the temperature, maybe f of x is now t of x, is the temperature over a period of some time. So what's the average temperature for today? Maybe you want to know if you have the time and the population of a certain city or country or region, well, then we can talk about the average population in that city over a period of time, same thing as well for finance and money, if we have a balance of an account or a stock or an investment that is changing over time, we'd like to know what the average monetary value of that particular item is or the balance is over time. So we use these quite often. We're going to define a way to do this and this is called the average value of a continuous function. We'll denote the function by f of x and we're gonna talk about it over an interval and we're going to denote it from a to b, so some a and some b. This definition is going to be denoted, this number as f_ave. This is going to be 1 over b minus a, the integral from a to b of f of x dx. Now let's just talk about this formula for a second. If you're keeping track of all the formulas in this class, you might want to put this one down. What's the point of this? Where does it come from? If you think about this as a product, we have some numerator on top and some denominator on the bottom. If you write this, this is the most common way to write it as 1 over b minus a, but you can think about it as a fraction. The numerator is a definite integral. You can think of this as a Riemann sum of adding all the values, so what a sum is like an infinite sum as an integral. That's trying to capture what the finite cases doing. Then the denominator, b minus a is trying to capture the size, b minus a is the length of the interval from a to b. This length is a way to capture how big the numbers are, how many numbers are the size of this interval. So it's trying to do the same thing and this is the infinite equivalent or we move up to like one-dimensional functions here. One more time, it's one over b minus a, the definite integral from a to b, f of x dx. Let's look at this example here. Find the average value of f of x equals the square root of x for x in the interval from 0-9. Remember x in the interval 0 -9, this is another way to write that 0 is less than x, is less than 9 I'd be comfortable with both ways. We call this first one interval notation, we call the second one inequality notation. So average value, again, it's definition. If you know the definition, you can work this out always. Use the right notation, f sub average. Write everything out. In general, it's one over b minus a. So the formula, one more time for good measure definite integral from a to b of f of x dx. In our particular case here, a is the first number, so 0 and v is the second number over an interval, the right endpoint, so that's nine, and you get 1 over 9 minus 0. Of course, this is going to be nine multiplied by the definite integral from zero to nine of the square root of x. We don't like writing square roots and integrals, so let's write it as x to the 0.5 d-x. This is just a number, this average value to find these things that are only as difficult as the integrals that you're presented with. If you know how to integrate, you can find average values. Let's do that, clean that up. We have one-ninth. Now let's go ahead and integrate. We have x to the 0.5, we're going to use our power rule. I'm going to add one to get x to three over two. I divide by the new exponent, which is the same as multiplying by the reciprocal, and I'm going to evaluate this from zero to nine. Now, I just carefully plugin, or I can grab a calculator and work this out. But if I plug in nine, you get nine to the over two minus 0 to the three over two. Of course, 0 to three over two we'll have your zero and nine to the three over two, remember how to see this, this is like nine. Remember you to see this here, and let's clean up the front here we get two over 27. This is nine to the 0.5 or the square root of nine cubed. Think it is like this. The square root of nine is just three. This is really three cubed, which is again 2, so you have 2 over 27 times three cubed. Three cubed is 27, 27 cancels, and of course, we're left with two. The average value of this function over the interval from zero to nine is just two. How do you interpret this number, what's the point of this number a little bit? Let me show you a graph, use decimals to make a graph here. This is the graph y equals the square root of x, and we're going from zero to nine. Hopefully this a graph you're familiar with. If you think about what two is, let's label the x-axis. Two is trying to capture, I said what's the average height? What number has the most space above and below, what's in the middle of this height? Well, it turns out that the numbers two and two is trying to do that. It's trying to capture this idea of an average height. Now, let's do a word problem and show you how people use these things. On January 1, 1998, the world population was approximately 5.9 billion. This is a billion with a b and growing exponentially at a rate of 1.34 percent annually. Determine the average world population over the next 30 years. Assume the same annual growth rate so assume 1.34 for throughout. They have ways to estimate the world population. They'd like to know these things to determine the allocation of goods and services, agricultural needs. It's a pretty important number to look at. A couple of things going on here. Remember I said that a problem like this is only as difficult as the integration. Well, first off, realize when they're asking for the average value, you will normally see the word average in the problem and there's no function. Why is this one difficult? Well, you have to know, you have to remember, a guess is a precast skill to introduce the exponential function. We're going to write that as P of t is P is zero, E to the r-t. This is one of those known formulas when you have exponential growth, P zero, of course, is our initial population. We are told this is 5.9. We'll leave our units in billions, our growth rate, we are told to leave that for the entire time, that's 1.34 percent. We have everything. I think this is the hardest part here, is just introducing the function. A final reminder of what an exponential growth function looks like in case you forgot. But now we're all set to go ahead and use our formula. The average value of P is going to be one over a number of r, you say what's a, what's b? Where we're going over 30 years. B is going to be 30, a is going to be zero. One over 30, one is 0 times the definite integral from zero to 30 of our function of P of t, d t. Our function is 5.9 e to and b careful here, it's 1.0134 times t, d t. These numbers are going to be gross, are definitely not going to be a pretty number. I leave working this out as an exercise or if you want these application problems for these word problems, get comfortable evaluating these definite integrals with calculator thrown a calculator thrown on the web throw and decimals, know how to evaluate these. The number we care about is more important than perhaps the process here or the setting up the formula. We want seven, turns out to be 7.26 and as always, our computers are really bad at interpreting numbers, but you, the human, have to realize what this number means. This is 7.26 billion people that all the average world population over the next 30 years from 1998. Excellent. We saw an example in the single variable case where we had one just for practice setting up an integral and then one with an actual application. Now let's talk about a multivariable function. If I have multivariable function f of x, y, and to motivate what the average value is going to do, let's draw a quick little sketch. Whenever we have multivariable functions, we draw a x, we draw a y, we draw z. Whenever you have your generic multivariable function, we draw the magic carpet flying off in space and we say, this is our graph of z equals f of x, y. Now what we're going to do, is we're going to fix some region in the x, y plane, we call it D, and we'll focus only on the graph above that region. We're going to keep things over a particular region. The average value, if you think of the last graph that tried to capture how high the graph was, the average height of the graph, that concept still make sense in multidimensions in 2D. Now you can think of this as like, what is the average height of this graph? I know is going to go up at some spots, is going to go down to some spots, but what's the right average height here? Now think yourself like, when would I ever want to know that? When would that ever be useful? Well, again, think of just whether as a simple case, if it snows, a lot of times they always want to know how much snow's coming, what's the average value? If you have a snow, you want to build your little snowman, there's my snowman for you. Then sure, we can talk about the average snowfall. I'm going to show you how they come up with that number. If it's raining, if you have a hurricane or if it's raining, average temperature over a region. When they tell you the average temperature, if you think about what that is, that's an entire region, entire city, how do they come up with that number? The definition that's going to follow for this average value, now it's in the multivariable case though. We have to be careful. It's going to be over some region D in the xy plane. Stepping things up for dimension here is, F_ave, same notation, instead of a single integral, it's going to be a double integral. so double integral over the region D of f of x, y dA. Remember last time we tried to capture how big the area was, the length the interval was, well, same idea. We're going to just try to capture how big D is since D is in the x, y plane is two-dimensional, we're going to divide by the area of D. This is our other formula and it is exactly the same idea, we sum up all these points and we divide by the size of D, now called the area. Sometimes when you see this formula, just want to give you another version of it, the numerator is the same. But if you're in the mood to write lots of double integrals, then you certainly can because remember, the area of a region is given by the double integral of 1dA. These are both equivalent and depending where you look, you can see it either way. But I wanted to mimic the formulas that we have. We're going to keep either form handy. Again, this is another formula. If you have a formula sheet going, please put this down. We're going to refer to al that. Let's do an example. We'll start off in the same way. We'll just do some practice with the formula. I'll give you a multivariable function. How about e to the x plus y? I'm going to give you a region, I want to keep it simple, how about 0 to 2 by 0 to 2? Remember what this means, e to the x, y, I don't know the graph that you can guess at it, but you don't really need to know it. It's some graph over the region on the x, y plane, where x is going from 0 to 2, y is going from 0 to 2, and so your region turns out to be this very nice square. This will be a region D and above it is this graph, I don't know what the graph is, we could use computer to get the real picture but here's our graph of f of x, y. We want to know what is the average height of this function over this particular region. To do that, we're going to find the average. Let's go through the process. One more time, let's write the formula out. We're going to do the double integral over D of our function f of x,y, dA, and we're going to divide by the area of D. This is why I like writing in the area formula because usually that's a nice area that we want to know, square, rectangle, some common shape. The area in this particular case as we go off to the side and just write that down. The area of D here is just a square, side lengths are two, so it's two squared or better known as four. But so the work is going to come in and finding this numerator. Whenever I have multistep problem, I'd like to treat each one separately, so let's go off and find this double integral of this function f x,y dA. Like in the single variable case, these problems are usually only as difficult as the integral themselves if you know how to integrate these won't be difficult. In our particular case here we're going 0 to 2, from 0 to 2, we do it twice same balance. The function is e to the x plus y, and then we have dxdy. Because of the symmetry of the balance, it doesn't matter if we go dxdy or dydx that all ways are nice. Now there's more than one way to do this. I recommend you pause the video and work this out on your own and we can compare the answers at the end. What I would do in this situation is see this as e to the x times e to the y. Now that I have a product with definite balance, so there's no dependence on x and y, I like to pull these things apart and write this as e to the x dx times the integral from o to 2, e to the y dy. There's no dependence, no relation, things are just multiplied together, no composition or any of that. You can split these up into two integrals. Now we just evaluate each one. The idea is if I can integrate it once, I can do it twice. The integral of e to x, it doesn't get much easier than that. It's from zero to two, e to the x and the integral of e to y is once again e to the y going from zero to two. Plug all that in. We get e to the 2 minus e to the 0 times e to the 2 minus e to the 0. Just be careful I've seen students mess this part up, e to the 0, of course, is one and I get e squared, sum number minus 1, it appears twice so I'll just square the whole thing. Great. If you grab a calculator again, usually you use these average values and word problems, so you tend to care more about the decimal values. This will be, let's grab a calculator. You can check me here 40.82 and change and remember all of this gets divided by the area. So the average value, let's bring this home. The average values going to be 40.82 divided by 4, which of course is something around 10.2. Final answer here is 10.2 and no more units in this particular problem of word problem, so we'll just give it as a number. Final answer 10.2. I use GeoGebra to graph this function. This is the graph of f of x, my y is e to the x plus y. You can see from the picture that it definitely has some height here. This graph goes up forever. I tried to isolate the region just between zero and two on the x, y plane, this region D, I did an okay job. I tried to get the best picture I could, but you can imagine what does this number about 10? Well, 10 is trying to capture the average height of this function, is trying to capture about on average how high it is. You can imagine if you had a snowfall or rain where one area had less than the other, the average among the multiple areas was about 10 so this is how to interpret these numbers. Let me give you one more example of a word problem that you might see. This uses a contour map and we're going to approximate the values in this example, this is a pretty common example. The contour map shows the temperature in degrees Fahrenheit at a certain time on February 26 in Colorado. Colorado is a state in the US, it is a very rectangular shape. We like it for these math problems just because it's easier to work with. If your state is not a regular rectangle, imagine it's zooming in on it just a particular rectangle. The state is in the shape of a rectangle that measures 388 miles to the west. Normally what you do is you put the origin on the bottom left and the x-direction you go on 388 and from west to east and then if you're going south to north and north to south, if you go up on the y-axis, it's 276 miles. Pay attention to units here because we're doing a word problem so we've got miles. Use the midpoint rule with m n is two. I'll tell you what that means in a second, to estimate the average temperature. We have a contour map with all the temperatures. How do I read this thing? You pick a point in the state and you look and say, if I go one direction of 44, if I go in another direction of 40, so this temperature here is somewhere between 40 and 44, this is all estimation. There's no right or wrong number here. We pick 42 just to estimate, so m equals n equals two. This says that when you slice this thing, you're going to use two rectangles across and two this way. Let's try to cut this right in the middle and we're going to cut right down. We take our picture. Now, this is a pretty not so great slice. If you wanted a more accurate estimation, you'd add more rectangles, m is the number of rows and n is the number of columns, number of rows and the number of columns. Again, we are estimating this here so answers may vary, but this is the idea. Now how can I use my average to figure this out? Keep this picture in mind, I'm going to go to a blank slide, but we'll come back to this for a second. Let's just get the formula all of setup. Remember our goal, we are trying to find the average temperature on this two-dimensional region. We're going to try to find really we want the double integral of x,y dA over the area of D. This is the formula for our average value. How am I going to do this? I don't have the formula, I don't have the function for the temperature. I can get the area of D. The reason why I pick Colorado, it's a nice rectangle. We can certainly multiply that out. That is not the hard part, but the numerator is going to be the one that we have to approximate. We're going to approximate the numerator, we're going to estimate in this example. How do we do that? Remember today, these are Riemann sums. These are 2-dimensional, 3-dimensional rectangles that we want to approximate. We're going to add from m equals 1 to 2, and then from n equals 1 to 2 of our function. Now they told us what sample point to pick. We're going to pick the midpoint and then we do delta A. This is the formula for approximation. I really should have the approximate sign inside of here. What is Delta A? Delta A is the area of the sub rectangle. We're going to take our big state and chop it into those four smaller ones. We can certainly do that. Remember, we had a rectangle. I'll just quickly draw it here, so we don't go back. But it was 388 by 276. If I slice it in fourths, you can take half. This is half of that distance. You have one-half times 388. That will get you at about halfway through and then halfway down times one-half times 276. We can certainly work that out, but that constant is going to be Delta A. Again, this approximation is going to be pretty far off. It's a big state and we're only using four sub rectangles. If I wanted to get a more accurate number, I would just work this out for more values and expand the process. Here we go. What is this actual value? Delta A is a constant. I'm going to take that constant here. Let's do one-fourth times 388 times 276. I'll get a calculator and work that out in a second. Now here comes the function part. I want to pick, I say, use the midpoint. Inside of each of these sub rectangles, I'm going to pick the midpoint. Again, I can choose different points I want. There's nothing that says I have to use the midpoint for rectangles. But I'm going to use the midpoint to get the temperature at those four points. You can imagine if you're a weather station, you have your sensors are setup somewhere. You have satellite stations. You use your values. We're going to add that together. I have 1, 2, 3, 4. I'm going to add those up 1, 2, 3, 4. Again, I'm going to have to estimate these points based on the graph. But it's just an estimation. We're okay. Let's go get those numbers. We're going to do our best to guesstimate the middle. I'm going to guesstimate the middle is going to be here. Somewhere in the middle. This one is tougher, somewhere in the middle and somewhere in the middle. For no good reason, let's try to guesstimate these numbers here. This is 24, this is 28. Right in the middle, let's call this 26. We said the middle were between 44 and 40. Let's call this 42. This other one here, which is a bit more involved were between 20 and 24. Let's call that 22. Then this one in the middle here, I'm guessing we're on the line of 40. I have my number's 40. Twenty six, 42, 22 and 40. These are complete guesstimates. You can imagine someone might come back and say, well, the middle is a little bit more to the right. Now I look at this top left and I don't love my choice of the middle. Maybe I'll change it here. Let's call this 24 actually, just to get the best we can. Once again our numbers are 24, 42 and 40, and, 22. Those numbers go into our formula here. Twenty four, 42, 40 and 22. That process of picking the middle and adding them up, that is what these double sums and bar notation is all trying to do. It's a crazy notation for a relatively simple process. Now we get out the calculator and we work out one-fourth times 388 times 276. Then we multiply it by the sum, make sure you use parentheses, 24 plus 42 plus 40 plus 22. We hit "Enter" and I get some number, 3,426,816. Now you may say, well, that's a crazy number. How is that going to be our temperature? Well, don't forget that's just the numerator. Now we take this number and we divide by the area. Remember the area of our rectangle is just going to be the whole thing was time. It's 276 times 388. When we get our final number, we take our big numerator 3,426,816 and divide it by the product of 276 times 388. If you can do this in your head, that's impressive. I cannot. I'll do it with a calculator, 276 times 388, I get 32. This makes a little bit more sense in terms of what this actually represents. Remember these are units. This is a number we're trying to actually interpret this value. Remember that we're talking about degrees Fahrenheit. We want 32 degrees Fahrenheit. Then we'd say our estimate, our approximation, for the average temperature across the entire state is 32 degrees Fahrenheit. Go through these formulas, keep them handy as you go through. Good job on these examples. Again, go through it. If you get a number close to 32, you can really see that this example truly is an estimation. Great job on this one. I'll see you next time.