The magnitudes of the gravitational field at distances r1 and r2 from the centre of a uniform sphere of radius R and mass M are E1 and E2 respectively. Then:
If r≤R, then E=GMR3(r)⟹E∝r
⟹E1E2=r1r2 if r1<R and r2<R
If r≥R, then E=GMr2⟹E∝1r2
⟹E1E2=r22r21 if r1>R and r2>R