We know that the gravitational field strength varies according to the variation of the distance of an object from the centre of the earth.
So, gravitational field strength inside the earth varies as,
g=R3GMr if 0≤r≤R.
So, g∝r.
At the surface, it is maximum, g=R2GM.
Outside the earth, it varies as, g∝r21 for (r≥R).
So, this is the possible graph,




