(N/A) Consider a point mass $m$ at a height $h$ above the surface of the Earth as shown in the figure. This body is placed at point $P$ at a distance $r = R_{E} + h$ from the center of the Earth.
The magnitude of the gravitational force on the body is:
$F(h) = \frac{GM_{E}m}{(R_{E} + h)^{2}}$
Since $F = mg(h)$,the acceleration due to gravity at height $h$ is:
$g(h) = \frac{F(h)}{m} = \frac{GM_{E}}{(R_{E} + h)^{2}} \quad ......(1)$
Acceleration due to gravity on the surface of the Earth $(h = 0)$:
$g = \frac{GM_{E}}{R_{E}^{2}} \quad ......(2)$
Taking the ratio of equation $(1)$ and $(2)$:
$\frac{g(h)}{g} = \frac{GM_{E}}{(R_{E} + h)^{2}} \times \frac{R_{E}^{2}}{GM_{E}} = \frac{R_{E}^{2}}{(R_{E} + h)^{2}}$
$\frac{g(h)}{g} = \frac{R_{E}^{2}}{R_{E}^{2}(1 + \frac{h}{R_{E}})^{2}} = \left(1 + \frac{h}{R_{E}}\right)^{-2}$
$g(h) = g \left(1 + \frac{h}{R_{E}}\right)^{-2} \quad ......(3)$
For small heights $(h \ll R_{E})$,we can use the binomial expansion $(1 + x)^{n} \approx 1 + nx$:
$g(h) \approx g \left(1 - \frac{2h}{R_{E}}\right) \quad ......(4)$
Equation $(3)$ is valid for any height,while equation $(4)$ is an approximation valid only when $h \ll R_{E}$.