Find an integral expression for the volume of a pyramid with height 9 and a square base with side-length 6. Use h as the variable of integration, where h measures the distance from the base of the pyramid to a slice.
Answer
This is very similar to the example. We slice the pyramid horizontally and get a slice that's a square:

We cut the pyramid in half from top to bottom to see the similar triangles. Since h is the distance from the base of the pyramid to the slice, h no longer the height of the smaller triangle. The height of the smaller triangle is now
(9 – h). If we let x be the length of the side of the slice, we get

so

The area of the square is

so the volume of the slice is

The volume of the entire pyramid is
