Why is the half of the total height taken as effective height in case of certain mathematics regarding gravitational potential energy? A problem gives the depth and diameter of a well full of water, states that a pump can empty the well within a certain given time, and asks to find out the power of that pump. In the solution, while figuring out the work done by the pump, they took half the depth of the well as the effective height, stating that that is the vertical displacement of the centre of mass. Why is only the displacement of the centre of mass taken, and why does it equal half of the total height?
The actual problem for anyone interested:
(I am learning physics by myself, so explaining elaborately will be much appreciated).
 A: The center of mass along the vertical axis of a certain region is defined as
$$x_\mathrm{COM}\equiv\frac{1}{m}\int_V\rho x\,dV,$$
where $m$ is the mass, $V$ is the volume, $\rho$ is the density, and $x$ is a distance in the vertical direction. If the density and cross-sectional area $A$ are constant, then we have
$$x_\mathrm{COM}=\frac{1}{\rho V}\int_V\rho x\,dV=\frac{1}{V}\int_V A x\,dx=\frac{1}{h}\left[\frac{x^2}{2}\right]_0^h=\frac{h}{2},$$
where $h$ is the height. This is where the factor of two comes in. Thus, the vertical center of mass of an upright cylinder (i.e., a well filled with water) is half its height/depth.
Now, if I want to bring a small volume $dV$ water at depth $x$ up to the surface, then I have to provide it with gravitational energy $\rho g x\,dV$. The total energy is thus $\int_V\rho g x\,dV$. But this is just the center of mass definition multiplied by $\rho g V=mg$. So I can write the energy as $mgx_\mathrm{COM}$, which in this case is $\frac{mgh}{2}$, which is exactly what the solution shows. Does this make sense?
A: To take water from near the top of the well out (e.g. 5cm down), the pump has to only to lift it 5cm.  To take water near the bottom out, the pump must lift it the full 12m.
So on average the water gets lifted by 6m.
