As the density of the liquid is constant, whole of the mass of liquid in the capillary is supposed to be concentrated at the h/2. So, the potential energy of the liquid in capillary is U =
mgh
2
or, The mass of the liquid in a column between x and x + dx is dm = πr2ρdx Therefore, the potential energy of the liquid in a column of height h is