"Water pours into the tank here at the rate of 4 cubic ft/min. The tank's cross-sections are 4-ft diameter semicircles. One end of the tank is movable, but moving it to increase the volume compresses a spring. The spring constant is $ k = 100 $ lb/ft. If the end of the tank moves 5 ft against the spring, the water will drain out of a safety hole in the bottom at the rate of 5 cubic ft/min. Will the movable end reach the end before the tank overflows?"
We know that, according to Hooke's Law,
$ F_{spring} = kz $
where $ z = $ distance compression of the spring. We also know that
$ F_{fluid} = F_{spring} $
Therefore
$ z = \frac{F_{fluid}}{k} $
We can calculate the force of the water, and therefore z, as a function of the distance d between the top of the container and the surface of the water:
$ F_{fluid} = \delta \int_{-2}^d (width)(depth) dy = 62.4 \int_{-2}^d -2y\sqrt{4-y^2}dy=41.6(4-d^2)^\frac{3}{2} $
$ z(d) = \frac{41.6(4-d^2)^\frac{3}{2}}{100}=.416(4-d^2)^\frac{3}{2} $
Now, solving for $ z $ when $ d=0 $
$ z(0) = 3.328 $
Therefore, the tank will overflow, because when the tank is full (d = 0), the spring will have only compressed 3.328 ft.