Earlier in this course, we learned how to find the area underneath the curve of a function by setting up an integral. And in doing that, we were really taking our two-dimensional area and breaking it up into a bunch of small rectangles. We are then adding the area of all of those rectangles together to get that total area. But what if instead we were asked to find the volume of a three-dimensional solid? That's exactly what we're going to dive into in this video.
And just like working with our two-dimensional area where we cut this up into a bunch of small rectangles, we're going to take our three-dimensional solid and cut it up into a bunch of thin slices. Now let's not waste any time here and jump right into our example. We're asked to set up an integral for the volume of a solid that has a base formed by the function f(x) = 4 - x² on the interval from zero to two, and we're told that this solid has square cross sections. So let's start here by coming down to our graph and taking a look at our function. We have our function here 4 - x² on the interval from zero to two.
So this shaded area represents the base of our solid. So how does this then become three-dimensional? Well, if we take our two-dimensional xy plane that we know and love and tilt it backwards, then extending that area upwards, we have this three-dimensional solid. Then just like our area being cut up into a bunch of rectangles, we can cut our solid into a bunch of slices. If we then just focus on one slice out of our solid, we have this sort of prism shape.
If we then take this prism and face it towards us, we see this square cross section as was told to us in our problem. So now that we have a better idea of what this solid actually looks like, how can we then find its volume? When working with our two-dimensional area, we were able to cut one rectangle out of there and find its area by multiplying its height times its width. Now that we're working with a three-dimensional solid, we're going to take one slice out of our solid and focus on finding its volume. Now in order to find the volume of just a single slice out of my solid here, we want to take the area of that slice's cross section and multiply it by its width.
Now just as a reminder, a cross section is a two-dimensional shape that we get from cutting into a three-dimensional solid. So if I had something like a block of cheese and I were to slice up that block of cheese and slap one of those slices onto my sandwich, I would see that it's shaped like a square because it has square cross sections. Now, in this particular problem, we are also working with these square cross sections. So coming back down to our slice here, in order to find the volume of this single slice, we want to take our area function, which we're going to call here a(x), and multiply it by the width of our slice. Here, the width of our slice is dx because we're taking these infinitely thin slices along our x-axis.
So with that width in mind, we just need to figure out what that area function is. Because we're working with squares here, I have my front-facing cross section of my square with these particular side lengths. Now coming back over here to our three-dimensional shape, if I look at the base of this slice, I can see that it's bounded by my function f(x). So that's exactly what that bottom side length is. It's f(x).
So because this is a square, if that one side length is f(x), all of my side lengths are f(x). So this will now allow me to find my area function, a(x). So in this case, a(x) is going to be equal to f(x) times f(x), which is just f(x)². Now we know exactly what f(x) is. It's 4 - x², so that makes this area function (4 - x²)².
So now that we have our area function, we can go ahead and actually find the volume of this slice by taking our area function and multiplying it by that width. So taking (4 - x²)² and multiplying it by our width here of dx. This gives me the volume of a single slice, so just this one slice out of my solid. But remember, we want to find the volume of this whole entire solid. So we can do this by taking what we have here and integrating it on our interval from zero to two to account for all of those thin slices.
So this integral ultimately gives us the volume of this three-dimensional solid that we have on our graph here. So when we were working with finding the area underneath the curve of a function, we were able to integrate on our interval from a to b our function f(x) dx. Now when working with finding the volume of a three-dimensional solid, we're still integrating on that interval from a to b, but of our cross-sectional area function a(x), whether that's for a square like it was here or whatever other shape we're working with. Then, of course, multiplying by dx. Now, when working with these sorts of problems, we always want to sketch the solid that we're working with as well as a front-facing cross section.
Having these two things will really help you to visualize what's going on in your problem and avoid making any mistakes. Now we're going to continue getting practice with these volume problems coming up in the next couple of videos. For now, you should finish evaluating this integral on your own to get your numerical answer for the volume of this solid. You can check your answer with me in the next video. I'll see you there.