The magnitude of the gravitational force at distance r1 and r2 from the centre of a uniform sphere of radius R and mass M are F1 and F2 respectively. Then,
F1F2=r1r2 if r1<R and r2<R
F1F2=r21r22 if r1>R and r2>R
F1F2=r1r2 if r1>R and r2>R
F1F2=r22r21 if r1<R and r2<R
F1F2=r21r22 if r1>R and r2>R
g=43πρGr ∴∝r if r<R