The derivation in this article is not strictly correct mathematically, unless one imagines that the space that is occupied by the solid is replaced by fluid of the same density as the surrounding fluid. Otherwise, the divergence theorem could not be applied inside the solid, which has a different density. The state of stress inside an elastic solid would be different from that of a liquid filling the space, and the elastic solid would have to deform (slightly) and develop stress in order to match the pressure distribution at its surface. In the end, consideration of the stress distribution within the solid would deliver the same result that we obtain if we assume that the space is filled with the original fluid, but it would not be as straightforward as this derivation suggests.