Calculus calculating work/energy 
Above is a picture of the diagram I was given. I was told to find the amount of energy produced when the basin is filled. I believe that work is $W = fd$ where $f$ is weight. (please correct me on anything I got wrong, I am struggling to learn this). I then got the integral of $\frac{x^2}{40000}$ and from $x = 0$ to $x = 1000$ and multiplied that by $500$. I believe that this number is $f$ correct? My problem is finding $d$. I don't really know what it means by distance. I noticed most textbooks change the function into a function of $y$. Why is that? Any help would be greatly appreciated.
I just looked at the question again and I believe the only thing I missed is that the density is 64kg/cubic ft

In following figure, that is basin which is full of water (assumption), consider cross section of it, and we want to find the volume of water, in layer of height $y$ (red area). This $y$ is determined with a $\dfrac{x}{40000}$, that's the length of the pool.
Let $\Delta y$ be the height of this layer, we choose it so thin that the slope of curve (bottom of basin), could be ignore. In this case the volume of water in this red part is
$$\Delta V=500ft.x.\Delta y=500.\sqrt{(4\times10^4.y)}.\Delta y$$
This volume of water has amount the potential energy
$$\Delta W=f.d=(\Delta M.g)y=\rho.\Delta V.g.y$$
The total work of water in the pool can be done is
$$W=\int_0^{25}10^5\rho.g.y^{\frac32}dy$$

