Take as the bottom of the pool with measured positive upward, to the rim of the pool is at , and the top of the water is initially at . Let be the radius of the pool. Let be the density of water and the acceleration due to gravity.

Consider a layer of thickness , at a height above the bottom of the pool. The work needed to pump this out is the change in potential energy when the layer is lifted form to which is:

So the total work is the sum of the work for all the layers of thickness and proceeding to the limit we get:

CB