Rajkumar asks: “accelaration due to gravity decrease on depth of earth with the relation of g’=g(1-2h/R). but with relation of g=GM/(R*R) g increase.
When the object is on the surface or above it, the entire mass of the earth attracts it. But when it is inside, the net attraction towards CENTRE is provided only by the mass of earth below it.
ie; if it is at a depth d below the surface, then it is attracted to the centre by a sphere of radius R-d only. The forces due to the rest of the mass of earth cancel out. (On one side there is a little mass and on the other side greater amount of mass but distributed faraway and both contribute equally towards force and cancel out.)