the work done if the change in height y is small, U
=Mgy, where M is the physical mass corrected for buoyancy
and g is acceleration due to gravity. The distance traveled
during one period is approximately 4A, so the average
work done is 4AF and by conservation of energy