 In this example, I want to show us how do we find the center of gravity, the so-called centroid, if the region R is actually determined as the region between two curves. We've seen some examples of finding the center under a curve. What if you have two, if you're between two curves? Well, if we mimic the technique that we did before, right, we have two functions this time. We have some F maybe, we have some function in G, like so. And then we have our x-axis for which we're going to subdivide that into teeny tiny little pieces, right? Well, in that situation, you're going to get these rectangles that look something like the following. Again, using the center of mass here, the centroids to do these things, you'll get something like this for which the center, the center of these guys is going to correspond to xi bar. And then you're going to have, for the height of this thing, you're going to get 1 half times F of xi bar, subtract G of xi bar. So that's how things are going to change for the centers. The area question for the area, well, the area is just going to be length times width in which case you get F of xi bar minus G of xi bar. And then you'll multiply that by delta x. And so there are some changes to the area we use, which the area represents the mass of the rectangle. And then we did change up the y-coordinate, the y-bar for individual rectangles. And so when you take the limit of these things, there are a few changes. So you'll notice that for x-bar, we get 1 over the area, the integral of x times F of x minus G of x. And this is a consequence of taking, you take the location of x, and this right here was the area, which changed. For y-bar, things look a little bit different. You get 1 over a. You're going to get 1 half F of x squared minus G of x squared. Where did that thing come from? Well, the idea is F of x squared minus G of x squared factors as F of x minus G of x times F of x plus G of x, like so. And so where do those things come from? Well, you're going to get that the area is this part right here. And actually, I mis-wrote it. I wrote it correctly earlier. But the midpoint with the y-axis should be 1 half F of x plus G of x. Because you're just calculating the midpoint of F of x i-bar on top and the midpoint of F of G of x i-bar on the bottom. Sorry about that. So you get an F plus G from the centroid there. You get an F minus G. How did that become a plus right there? Whoops-a-daisy. That should be a minus. And the other one should be a plus. So you get a minus here. You get a plus right here. And so when you multiply those together, you get this difference of squares. And so with all that, we have some more diverse versions of these centroid formulas. If you're looking for the area of the centroid between two curves. Now, before we put these actually into practice, I do want to point out an interesting remark here. If you take this formula right here for x-bar, if you times both sides by 2 pi a, you're going to get that 2 pi a x-bar equals 2 pi, the integral from a to b, of x times F of x minus G of x dx. And if this formula over here looks familiar at all, that's because this formula is none other than the shell method that we had learned about previously. And so you'll notice here that if you take together 2 pi x-bar, which is the circumference of the circle form by rotating the centroid around an axis. And then if you times this by the area of the region, that the distance traveled by the centroid times by the area is equal to the volume of the solid revolution, this is none other than the theorem of Papis that we had talked about before. And this is actually a subtle proof of that. It really just comes from the fact that the formula for the shell method is so similar to the formula for the centroid that the two things actually can measure the same thing basically. OK, that gives you the shell method. Well, what if we do the same thing for y-bar right here? If you take 2 pi y-bar a, this is going to look like 2 pi times the integral from a to b, 1 half F of x squared minus G of x squared dx. You'll notice that the 1 half cancels with the 2. And so now we get something that looks like the washer method. And so I point this out for two reasons. One, this actually gives us a justification of the theorem of Papis we had seen previously, but also gives you a mnemonic device to try to remember the centroid formulas for x and y. Because if we know the shell method and washer method, and if you've been following this series, you've done that already, we hopefully know those methods, and therefore, these are not new formulas. They're just slight tweaks of formulas we've already done. And so there's two reasons to support that connection. Whoops, I don't want any of this on the screen. OK, it's gone. Now let's get to a specific example. Let's find the centroid of the region bounded by the line y equals x and the parabola y equals x squared. So we see the parabola and green in the illustration below, and the line y equals x is illustrated in yellow right there. Let's find the centroid of this thing. So to begin with, we want to find the area. We have to always do that. The area between the curves, we're going to go from 0 to where these points intersect to intersect when x squared equals x. That is, x squared minus x equals 0x times x minus 1. You're going to get x equals 0 and 1 as our points of intersection. So we're going to integrate from 0 to 1. We take the bigger function, which is x minus the smaller function, which is x squared. This integral is not so bad. We get x squared over 2 minus x cubed over 3 from 0 to 1. We get 1 half minus 1 third, which is 1 sixth. That's going to be the area of this region. And therefore, notice 1 over a is going to equal 6. We're going to use that in our calculation. Now next, to do x bar, we have to do 1 over a. The integral from 0 to 1, x times, what did our formula say? It said f of x minus g of x. So again, take the bigger function, x minus x squared dx. This is very similar to what we just did, although we do need to distribute things here. So we're going to get 6 times the integral from 0 to 1 of x squared minus x cubed. And so integrating that thing, we end up with 6 times. We're going to get x cubed over 3 minus x to the 4th over 4 as we go from 0 to 1. Plug it in 0, make everything disappear. Plug it in 1. We're going to get 6 times a third minus a fourth. If you distribute the 6 through, you end up with 2 minus 3 halves. So we're going to write this as 4 halves. And so we get a 1 half when we're done. So that's going to be the x-coordinate of the center, which we can see in the diagram like so. Now for y bar, y bar, remember, is going to equal 1 over a times the integral from a to b of 1. I'm just going to plug in the specific values there. 1 over a was a 6. We're going to go from 0 to 1. We get 1 half. Now we get a difference of squares just like the Washer method. So we're going to get x squared, which we're squaring x, which is the upper function, minus x to the 4th, which is x squared squared dx. So notice this is a difference of squares right here. 1 half times that by 6, that's going to give us a 3. Anti-derivatives, the anti-derivative of x squared is x cubed over 3. Anti-derivative of x to the 4th will be x to the 5th plug it in 0 and 1. Again, when you plug in 0, everything will vanish. When you plug in 1, whoops, sorry about that. When you plug in 1, you get 1 3rd minus 1 5th. I'm going to distribute the 3 so we get 1 minus 3 5ths, which of course is 5 over 5 minus 3 5ths. And we end up with a 2 5ths, which agrees with the calculation we had up right here. And so we can actually adapt the centroid formula, not just for a region bounded below a curve, but the region between two curves. And we've also seen that this mimics the shell method and washer methods we've seen before. That's justifying the theorem of Papis that we had seen before. And so that's going to bring us to the end of lecture 23. We've seen how centroids can be useful with the theorem of Papis and other things related to that. In the next lecture, we're going to talk about what integration has to do with probability. And this idea of centroid will also come up again, because the centroid of a random variable is going to be the expected value, a.k.a. the average value. So take a look for that video. In the meanwhile, if you have any questions while you're watching these videos, feel free to post your comments below. I'll be happy to answer them. And I hope to see you next time, everyone. Bye.