Calculate the work required to pump all the water out
Calculate the work required to pump all the water out of a cylindrical barrel with base radius $R$ and height $H$, filled to the top.
Explanation of Method
Slice the water into thin horizontal disks; each disk of water at height $y$ must be lifted the remaining distance $(H-y)$ to reach the top of the barrel, and the total work is the integral of these elementary works over the whole height.
Step 1: Mass of a thin horizontal slice
A slice at height $y$ (measured from the base) with thickness $dy$ has volume $dV=\pi R^2\,dy$ and mass $dm=\rho\pi R^2\,dy$, where $\rho$ is water's density.
Step 2: Work to lift the slice
It must rise a distance $(H-y)$ to reach the rim, so $dW=(dm)g(H-y)=\rho\pi R^2g(H-y)\,dy$.
Step 3: Integrate over the barrel
\[W=\rho\pi R^2g\int_0^H(H-y)\,dy=\rho\pi R^2g\left[Hy-\frac{y^2}{2}\right]_0^H=\rho\pi R^2g\cdot\frac{H^2}{2}.\]
\[\boxed{W=\frac{\rho\pi R^2gH^2}{2}}\]
Step 4: Interpretation via the center of mass
The total mass is $M=\rho\pi R^2H$, and the water's center of mass sits at height $H/2$ (by symmetry), a distance $H/2$ below the rim, so $W=Mg\cdot(H/2)$, matching Step 3 exactly — pumping out the barrel does exactly the work of lifting all the water's mass through the height of its own center of mass.
Result
Final answer:
\[\boxed{W=\frac{\rho\pi R^2gH^2}{2}=\frac{MgH}{2}}\]