 Hello, and welcome to this screencast. In this screencast, we will calculate the center of mass for an object with variable density. A three-foot-long metal bar that has its left end at x equals zero has the density given by delta x equals five plus two x pounds per foot. We want to find the center of mass of this bar, or the place where it would balance. And to the right, we have the formula for x bar, the center of mass. First, we'll draw a graph of the density function. The bar is three feet long. When x equals zero, the density is five pounds per foot. When x equals three, the density is five plus two times three, which is 11 pounds per foot, so we can put that on the graph. Since the bar is three feet long and the left end is at x equals zero, our limits of integration are from a equals zero to b equals three. Our graph doesn't really give us a picture of this bar itself, but it does show us that the density of the bar increases from five pounds per foot to 11 pounds per foot as we move from the left end of the bar to the right end of the bar. If the metal bar had a constant density, then we would expect the center of mass, the point where the bar would balance, to be right at the middle of the bar at x equals 1.5 feet. But since the bar is denser at the right end to the left, if we tried to balance it at x equals 1.5, we would expect it to tip to the right because it's heavier at that end of the bar. And so we would expect the center of mass, or that balancing point, to be a little bit further to the right end. So here we can make a prediction that after our calculations, the center of mass will be greater than 1.5 feet. To calculate x-bar, we will first evaluate the integral in the numerator of this formula. We use the integral from zero to three of x, multiplied by delta x, which is five plus two x, and then dx. We can simplify the integrand to 5x plus x squared, and then we can integrate it. The anti-derivative of this function is five-halves x squared plus two-thirds x cubed. And we're going to evaluate at the limits, x equals zero, x equals three, and then subtract. So when we evaluate at x equals three, we get five-halves times three-squared or nine, plus two-thirds times three-cubed, which is 27. And when we evaluate the anti-derivative at x equals zero, the result is simply zero. This simplifies to 22.5 plus 18, which is equal to 40.5. This will be the numerator of our result. Next we're going to evaluate the integral that's in the denominator of the formula. We have the integral from zero to three of five plus two x dx. So the integrand this time is just our density function, delta x. The anti-derivative of five plus two x is five x plus x squared. And again, we're going to evaluate it at three and at zero and subtract. When we evaluate at x equals three, we get five times three and then plus nine. And when we evaluate at x equals zero, we get zero. This simplifies to 15 plus nine and that's equal to 24. And so that result is going to be used in the denominator of our final calculation. So to calculate x bar, the center of mass of the bar, we take our numerator, 40.5 and we divide it by 24 and this is equal to 1.6875. The units on this result are feet and this is calculated from the left end of the bar. Our result is larger than 1.5 feet and so that matches our early prediction that it would be to the left, that it would be to the right of the center of the bar. So thanks for watching.