Work done = mgh where h varies from 0 (at the bottom of the pool) to 5 ft (at the sides of the pool).
m= density*volume = 62.5*pi*24^2*d/4 = 9000πd lbs
h = 5-d (the particles at the top of the pool require less work as required to those at the bottom).
Then,
WD (E) = 9000πd*9.81*(5-d) = 88290πd(5-d) = 441450πd-88290πd^2
Integrating from 0-4 with respect to depth of pool, d
Total E = {441450π*d^2/2 - 88290π*d^3/} for d between 0 and 4 ft
E=220725π*d^2 -29430π*d^3
Substituting for d=0 ft and d=4 ft;
= {220725*π*4^2-29430π*4^3} - {220725π*0^2-29430*pi*2*0^3)
=5177596.021 J= 5.17 MJ