In recent videos, we've been spending a lot of time becoming familiar with the definite integral. We've talked about what the definite integral represents and how we can solve basic problems with this integral. Now in this video, we're going to see one of many different uses and applications when it comes to the definite integral. Specifically, we're gonna talk about finding the average value of a function. It turns out with what we've already learned from Riemann sums and the process of taking a definite integral, you can solve these types of problems.
So let's take a look at what this is all about. Now recall that we can take the limit as n approaches infinity for a Riemann sum, and n represents the number of subintervals, or basically rectangles, we would fill underneath the function. This will give us the true area under the curve of a function, which we call the definite integral. Now what we can do is use this definite integral to find the average value of a function f(x) on some interval a to b. So basically, you can imagine that we have this kind of function on a graph where we have an x and y graph, and the function is gonna be some curve.
Now what we're going to imagine is that we're looking at this curve from some value of a to another value of b. This right here would be the interval that we're looking at. And what we want to do is find the average value of that function, which basically means the average output that we're going to get from every possible input between this interval. Now this would be pretty complicated to do because what we would have to do is take every possible input or x value and plug it in to our function f(x). Doing this would give us a bunch of different outputs to our function, and what we would need to do is add up all those possible outputs and then divide it by the number of things that we have to get the average of those function outputs.
Now the reason why this would be quite tedious is because it's impossible to take every single x value that we have within here and plug every single one into our function because there's an endless amount of x values we could have inside our function, meaning there's an endless amount of outputs that we could get. But what I can do is set this up in a more compact way. I can take this n that's in the denominator here and bring it out front. So this is gonna give us one over n, and then I'm going to write this entire thing, all of these function outputs being added together as the sum from k equals one to n, the number of subintervals we have, and then that's going to be f(xk*). So this here just represents all possible x values that we can get.
Now from here, what I want to do is I want to make this equation something that we're more familiar with. So I'm going to take this n that I see here, and I'm going to rearrange this equation, which is the width of a subinterval. So notice that the width Δx of the subinterval is (b - a)/n and rearranging this, I could solve for n to get the n is equal to (b - a)/Δx. Now from here, I can take this n value and plug it in there. And since we have one over n right here, that means that on the outside, we're going to end up having Δx/(b - a).
I just need to take this fraction here and flip it since we have one over n that we're plugging into. So this is what we get out front of our summation. And keep in mind, this entire process that we're doing right here is just a way to derive an equation. Once we get the equation for the average value of a function, solving problems is gonna become pretty straightforward. But we need to understand where this equation comes from, and that's what we're doing.
So what I'm gonna do next here is take this Δx and bring it out front to the summation. So we're going to have one over (b - a) in front of the sum right here. And then we're gonna have f(xk*), and it's gonna be multiplied by Δx since we took this Δx and brought it out there. Now there's a reason that I did this. Notice this is starting to look more like a Riemann sum because notice that we have the sum of every f(x) value, every function value, which would be like the height of a rectangle that we were looking at inside of a function.
And then we have Δx, which would be like the width of our rectangle. So that's the reason why I'm writing it like this is because I'm trying to get it to look familiar to us. Now if you actually pay close attention here, what we can think about what this n actually is. This n is the number of possible subintervals we would have inside here. And since there's an infinite amount of x values that we can plug into our function, we can say that this value of n is approaching infinity.
And there's something that we should recall when we see n approaching infinity for a Riemann sum like this. This would mean that we have the true area underneath the curve of a function, which would also be the definite integral from a to b. So what I can do is take this entire portion that we have right here for the limit as n approaches infinity for this Riemann sum, and I can just write this as the integral. Notice that we do that, and now we get our equation for the average value of a function. So this right here will allow us to calculate the average value of any function that we have on an interval from a to b.
So let's go ahead and see if we can solve some problems using this equation. Now here, in this example, we're asked to find the average value of this function, f(x) = x + 2. We're on the interval from zero to four. Now to solve this problem, I'm just gonna go ahead and use this equation. So we're going to have that our average value is going to be equal to the average value of our function is gonna be one over (b - a).
And in this case, b is gonna be this high value, a will be this low value. So we have b, which is four minus a, which is zero. That's gonna be multiplied by the integral from zero to four of our function, which is x + 2. Then it's going to be multiplied by dx. And that's just telling us that we need to integrate this whole thing with respect to x.
I can go ahead and simplify the outside here. It's gonna be one over four. And then what I'm gonna do is do this integral. And since we have the integral of x + 2, we can treat this as the integral of x plus the integral of two since we've seen that sum or difference rule. So what it's going to give us is the antiderivative of x, which is x²/2.
We'll use the part two of the fundamental theorem of calculus here. And then we're going to add this to the antiderivative of two, which is 2x. Then all of this is going to be bounded from zero to four. So this is the function we get. Now from here, what I can do is I can take four, my high bound, and plug it in for x.
Then I can take zero, my low bound, and plug it in for x and subtract the two results. So first, we're going to have one fourth, and it's going to be multiplied by plugging four in. We're going to have four squared over two plus, and we'll have two times four. Then this whole thing is going to be minus, and then we're gonna have one fourth, and that's going to be zero plugged in everywhere that we see x. But notice when I plug zero into here, the whole thing is just gonna become zero, because zero over two plus two times zero is also gonna be zero times one fourth of zero.
So this whole thing is just gonna be minus zero. So this really is the result that we get, which means we only need to focus on the four that we plugged in here because that zero is just gonna go away. So this would give us the result for our function, and you can go ahead and crunch these numbers right here. If you multiply and add everything out, you should get the result of four as the final answer for the average value of this function. So this is how you can find the average values of a function.
As you can see, once we have the equation derived, solving problems is pretty straightforward. And go ahead and check out the examples and practice after this video to really make sure we have these types of problems down where we need to utilize this equation and find the average values of functions. Hope you found this video helpful. See you in the next one.