Do we take gravity = 9.8 m/s² for all heights when solving problems? Why or why not?

Do we take gravity = 9.8 m/s² for all heights when solving problems?

-

No, the value $9.8\frac{\mathrm{m}}{\mathrm{s}^2}$ is an approximation that is only valid at or near the Earth's surface. You can go a few miles up or down and it'll still be good enough, but once you get any significant distance away from the surface of Earth, you would need to use a different value for gravitational acceleration. You can calculate the value from Newton's law of gravitation, $F = Gm_1m_2/r^2$, and you'll get

$$g = \frac{GM}{r^2}$$

where $m$ is the mass of the Earth and $r$ is the distance from the Earth's center to the point for which you are doing the calculation.

-

To expand a little on David's point assume we move from the nominal "surface" where $g$ is $9.8\text{ m}/\text{s}^2$ to another point at radius $r + \Delta r$. How much does the acceleration of gravity change? $$g = \frac{GM}{(r+\Delta r)^2} = \frac{GM}{r^2(1 + \Delta r/r)^2}$$ and as long as $\Delta r$ is small compared to $r$ we can reasonably approximate this as $$g \approx \frac{GM}{r^2}(1 - 2\frac{\Delta r}{r}) .$$ Well, the radius of the Earth is about $6000 \text{ km}$ so the approximation is good at less than 1% error for around $30\text{ km}$ up or down from the nominal surface, which is all the land and sea floor, and a bit up and down from there.

It is also worth noticing that due to variations in the local mass density of the Earth the measured value of $g$ even at the surface can vary by several tenth of a percent.

-
In fact, the measured variations in $g$ are very useful to geophysicists, oil prospectors, etc. –  Ted Bunn Feb 28 '11 at 14:56

$g$ becomes $g \approx 9.7 \frac{m}{s^2}$ at a height of about 35km, so it would be ok to use the value $9.81$ for "down to earth" problems.

The relevant wikipedia article has lots of useful information, like for example the following approximation formula for different heights: $$g_h=g_0\left(\frac{r_e}{r_e+h}\right)^2$$ Where $g_h$, is the gravity measure at height $h$ above sea level; $r_e$, is the Earth's mean radius and $g_0$, is the standard gravity.

-
that's not an approximation, it's exact (as long as you assume earth as a point mass...) –  Tobias Kienzler Feb 28 '11 at 8:50
@Tobias: It's an approximation in the sense that it treats earth 1) as a point or a perfect sphere 2) not rotating, etc... –  Eelvex Feb 28 '11 at 9:51

It might also be worth mentioning that $g$ isn't even constant over the earth's surface at sea level. Depending on the mass distribution and the shape (not perfectly spherical!) of the earth, different parts of the world have different $g$.

-