# Pump water from half-full cylindrical tank from a spigot at height higher than top of tank

I looked at this question, however, it pumps water of a full tank out from the top of the tank. My question is a bit different, but mostly similar.

There is a cylindrical tank with a radius of 3ft, height of 15ft. It is partially filled with water (4ft deep). We want to pump the water out of a spigot that is 20ft off the floor. The water weighs 62.4 pounds per cubic foot.

How can I set up the integral to represent the work done in pumping out that water? I'll evaluate it on my own.

If the tank was full, and we weren't pumping the water from a spigot 20 ft off the floor, I know the integral representation of the work required would be

$$\int_0^{15} 62.4(9\pi)(15-h)dh$$

Which, cleaned up, is:

$$516.6\pi\int_0^{15}(15-h)dh$$

But I'm unsure of how to set up the integral when the tank isn't full of water, and when the water is being pumped from a height higher than the top of the tank. Can anyone steer me in the right direction?

To draw the problem in a coordinate system, choose a positive $x$ axis in the downward direction since the motion is vertical. Take the spigot at $x = 0$, the top of the tank at $x = 5$, the surface of the water at $x = 16$ and the floor at $x = 20$. The partition of water is therefore the closed interval $[16,20]$ on the $x$ axis.
Take an element of volume as a circular disk having thickness $\Delta_i x$ and radius $3$, the volume is $\Delta_i V = 9 \pi \Delta_i x$. Then take $62.4$ as the weight in pounds per cubic foot, the force required to pump an element is $\Delta_i F = 561.6 \pi \Delta_i x$.
If $\Delta_i x$ is close to $0$, then the distance through which an element moves is approximately $x_i$. Thus the work done pumping an element to the top of the tank is $\Delta_i W = 561.6 \pi x_i \Delta_i x$ and the integral is:
$$W = 561.6 \pi \int_{16}^{20} \! x \, \textrm{d}x$$
You would make the $(15-y)$ in to $(20-y)$, because that's the height the water has to go to. Also, you would take the bounds and set it to the bottom of the water to the height of the water level. In this case, it would be from 0 to 4.
$62.4(9π)∫(20−h)dh$,bounds go from 0 to 4