Given,The mass of the particle be m,
Initilly it is on the centre of the earth, so
The work done in moving a particle from center of earth to its surface W=∫R0Fdr=∫R0(−G(ρ43πr3)mr2)dr
=∫R0(−4Gρπmr3)dr
=GMm2R,we know that F=GMmR2=mg
=12mgR
(Since g=GMR2)
So, The work done in shifting a particle of mass from the centre of the earth to the surface of the earth is =mgR2.