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.
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