The density P of a spherical ball of diameter d and mass m is given…