Work done to fill up a spherical tank 
A spherical tank of radius $12$ feet is $40$ feet above the ground. How much work is done in pumping water into the tank until it is full? 

I obtained
$$
w= \int_{16}^{40}[12^2-(40-y)^2y] \, dy.
$$
Is this correct? I've been trying to figure this out for the last 2 hours. 
Thank you!
 A: You have nothing to indicate the density of the water nor the acceleration of gravity.  It looks like you are assuming that the top of the tank is 40 feet above the ground.  The center of the tank is then $28$ feet above the ground.  We can consider the water between height $y$ and $y+ \Delta y$ to be a disk of radius $r$, so of volume $\pi r^2 \Delta y$  We have $r^2=12^2-(28-y)^2$ so the work done to lift the water in the disk is $\pi (12^2-(28-y)^2)y g\rho$, where $g$ is the acceleraion of gravity and $\rho$ is the density of water.  The integral becomes $$\int_{16}^{40}\pi(12^2-(28-y)^2)yg\rho\ dy$$

A: The way to do this is think about the work needed to move just one horizontal slice (with thickness $dy$ up to height $y$ from ground height (assuming that the pump is at ground level).  I will assume also that the height of the top of the tank is $40$ feet up, as that seems to be what your solution suggests.
Then the tank has $y$-values fro $16$ to $40$.  The radius of a horizontal slice at height $y$ is $\sqrt{12^2-(y-28)^2}$.  Therefore the volume of the slice is $\pi\left(\sqrt{12^2-(y-28)^2}\right)^2dy$.  Work equals force times distance.  The force acting on this water is the mass of the water (which equals $\pi\left(\sqrt{12^2-(y-28)^2}\right)^2dy$ times $\delta$, the density of water) times the acceleration due to gravity (denoted $g$).  The distance needed to move the water is the height of the slice (or $y$).  Thus the integral should read
$\displaystyle\int_{y=16}^{40}\delta*y*g*\pi\left(\sqrt{12^2-(y-28)^2}\right)^2dy$.
A: To check your answer, consider an arbitrarily small "cell" of water
inside the tank after it is filled.
If the water in that cell has mass $\mathrm d m$ and is at height $y$
above the ground, the amount of energy you have to expend to raise it from the
ground to its final position is $y\;\mathrm d m.$
For each such cell of water above the level of the center of the tank,
there is an equal-volume cell of water inside the tank that is the 
mirror-image reflection of the first cell through the
horizontal plane in which the center of the tank lies.
And vice versa, for each cell below that plane there is a mirror image 
of that "cell" in the tank above the plane.
The entire tank can be partitioned into pairs of tiny "cells"
reflected through that central plane.
Let $h$ be the height of the center of the tank above the ground, and
consider a pair of cells of which the upper cell is at height $h + \Delta y.$
The other cell is at height $h - \Delta y.$
The total potential energy you must invest in those two cells is
$$ (h + \Delta y)\,\mathrm d m + (h + \Delta y)\,\mathrm d m = 2h\;\mathrm d m.$$ 
That is, the energy invested in those two cells (of combined mass $2\,\mathrm d m$)
is the same as the energy required to lift a mass $2\,\mathrm d m$
to a height $h$ from the ground.
We can therefore simplify the calculation by replacing every such pair of cells with
one such mass, that is, we take the entire mass of water inside the sphere and
substitute an exactly equal mass at a height of exactly $h.$
Your answer will be correct if it equals $mh,$ where $m$ is the mass of water in the tank.
I suspect your instructor did not intend you to use this method, so I recommend to
either keep this as a mere check on the result you get by the intended methods,
or at most show it as an alternative method after deriving the result by those
other methods.
