Since the acceleration due to gravity varies with depth from the earths surface, we have to calculate the gravitational force experienced at the center of the sphere.
As shown in figure, let us consider a disc shped earth crust, at a distance h from center. let dh be the thickness of the crust.
gravitational force of this disc is given by
where ρ is uniform density of earth's crust and acceleration due to gravity varies with depth as g×(h/R)
total force due to hemishpere is given by