 Hello and welcome to this screencast on finding the volume of a solid using slicing. Today we're going to look at this problem. A square pyramid has a base with sides of length four and a height of four feet. Use the definite integral to calculate its volume. The technique that we're going to use to do this is fundamental to all of our calculations in this section, which is to take something that we're interested in, in this case a square pyramid, and slice it into very thin pieces that have some sort of a shape that we understand already. Then we'll add all of those up using a definite integral. So here's a diagram of this with everything labeled, the square base and the height all of size four. Let's take a look at some steps to help us solve this problem. First, we should draw a picture of everything we can think of with regards to this. So we have a three-dimensional picture, but we should also draw a two-dimensional cross-section. This would run from the square base right up through the tip, running from left to right on the screen. Here's my drawing of that cross-section. I've put it on some xy axes. You can see that along the x-axis, the height of the pyramid is four, and along the y-axis, the base of the pyramid runs from negative two to two. I've made an arbitrary choice to put it at the origin like this, but this turns out to be very useful for us later on. Next we're going to draw a representative slice on both pictures. By a representative slice, I mean an example of what a slice running straight through the three-dimensional object would look like, and also what it would look like in the two-dimensional view. So here I've drawn what I mean by this. Focusing on the left, when we cut straight into the screen, parallel to the square base of this pyramid, we get another square. It's a little square slab. It has a very thin thickness to it, and we'll call that thickness delta x. I've redrawn that slab in between the pictures, just so we can refer to it. And finally on the right, if I was only looking at this two-dimensional cross-section, I would see that square looking as if it were a very thin rectangle, since I'm viewing it edge on. That's thickness delta x as well, because I've decided to run this cross-section along the x-axis. It's always very useful to look at your cross-sections and look at your slices, both on a three-dimensional diagram and as a two-dimensional diagram. We're always going to try and go back and forth between these pictures to understand what's going on in the three-dimensional case. So next, let's find a formula for the height of this slice. By the height of the slice, I mean this entire distance right here in red. In order to do that, I'm actually going to focus on this height right here, the distance from the x-axis up to this line that represents the edge of the pyramid. The reason I'm interested in that is because I believe I can find a formula for this line, and that would tell me half of the height of that box. So let's focus on this top line for a bit. I know two points that this line goes through. This point zero two, and this point four zero. Using that, I can tell that this line has a slope of negative one half. Make sure you know why I know that. It also has a y-intercept of two, and so I've just found a formula for that line, and as a direct consequence, I've also found a formula for the height of the box from the x-axis on up. But since this is a symmetric shape, that means that I know a formula for the height of the entire box, and that would be height being two times negative one half x plus two, or in simplified terms negative x plus four. Make sure you know why I ended up multiplying by two to get the entire height there. Next, let's find a volume of the representative slice. We already found the height of this box, which I'll write in again right here, but that was really just a step on our way to figuring out the volume of one of these square slabs. So if this is our height, and if the width is delta x, that corresponds on the left three-dimensional picture to this square having this side of length negative x plus four, but because it's a square, each of its sides is length x plus four, and its thickness is delta x. Well, that's all of the dimensions that I need in order to find the volume of one of these representative slices. And so I can say the volume of a slice is one of the sides times the other side times its thickness delta x. And that simplifies down nicely to negative x plus four quantity squared times delta x. Now that we know the volume of one of these slices, we want to imagine adding up the volumes of all of the slices from the bottom of the pyramid all the way up to the top. So next we're going to write a definite integral that sums up the volumes of all of those thin slices across the full horizontal span of the pyramid. In order to do that, we need to know what are the x values of each of these slices. And to do that, we're going to look at what the leftmost and rightmost values of the slices can be. The leftmost slice would be all the way to the base of the pyramid, and that would be at x equals zero on this picture, whereas the rightmost slice would be all the way to the right at the tip of this pyramid, and that would be at x equals four. And at every x value in between, we have one of these slices. A definite integral adds up all of those as their thickness goes towards zero. So in order to write the full volume, we're going to write an integral from x equals zero up to x equals four of the volume of one slab, which is negative x plus four quantity squared, and the delta x becomes the dx in the definition of the integral. So here we've turned this question about volume into an integral that we know how to evaluate. Here's that integral again. Now let's find the exact volume of this pyramid. That really just means to evaluate this integral. So here's the integral. Take a moment and think how you would evaluate it, and then do evaluate it. I'll show you one way next. I noticed that this is a polynomial, so I'm going to expand it out because I know how to evaluate polynomials without having to use any other techniques. A substitution would also work if you want to. When I evaluate this, I get 64 third cubic feet is the volume of the pyramid. I can also check this using the formula for the volume of a pyramid with a square base. I didn't remember this formula until I looked it up for this video, and it's not necessary to memorize it because now you know a technique that will always work to find the volume of a pyramid. In this case, we can double check and get the same answer.