Neglecting the effect of the Earth's rotation, find how the…
Neglecting the effect of the Earth's rotation, find how the gravitational force of the Earth on a body depends on the body's distance $r$ from the Earth's centre.
Explanation of Method
Gravitational force against distance from the centre.
Step 1: Idea
We treat the Earth as a uniform sphere of mass $M$ and radius $R$, and use two results about spherical shells (Newton's shell theorems): (1) a uniform shell attracts an outside body as if all its mass were at its centre; (2) a uniform shell exerts no net force on a body inside it. The problem therefore splits into two regions.
Step 2: Outside the Earth ($r \ge R$)
The whole Earth is a set of shells, all of which the body is outside. So the whole mass acts from the centre: $F = \gamma\frac{Mm}{r^2}$.
Using $\gamma M = gR^2$ (from the surface value $mg = \gamma Mm/R^2$), this can be written as $F = mg\,R^2/r^2$.
Step 3: Inside the Earth ($r \le R$)
All shells outside radius $r$ pull in every direction equally and cancel out. Only the sphere of radius $r$ below the body attracts it. For a uniform Earth, its mass is proportional to its volume:
\[ M(r) = M\frac{r^3}{R^3}, \]
\[ F = \gamma\frac{M(r)\,m}{r^2} = \gamma\frac{Mm}{R^3}\,r. \]
Again with $\gamma M = gR^2$: $F = mg\,r/R$.
\[F(r) = \begin{cases} mg\,r/R, & r \le R \\ mg\,R^2/r^2, & r \ge R \end{cases}\]
The force grows linearly from zero at the centre to its maximum $mg$ at the surface, and then falls off as $1/r^2$.
Check
Both expressions give $mg$ at $r = R$, so the curve is continuous $\checkmark$
$F(0) = 0$: at the centre the pulls from all sides cancel by symmetry $\checkmark$
Result
\[\boxed{\,F(r) = \begin{cases} mg\,r/R, & r \le R \\ mg\,R^2/r^2, & r \ge R \end{cases}\,}\]
Remark
Note. The linear law inside holds for a uniform Earth. The real Earth has a very dense core, so in reality $g$ stays almost constant (even rises slightly) through the mantle before falling to zero at the centre.