# Ideal gas law problem : part 3

1. Jan 16, 2009

### pentazoid

1. The problem statement, all variables and given/known data

Assuming that the temperature of the atmosphere is independent of height, solve the barometric equation to obtain the pressure as a function of height: P(z)=P(0)exp(-mgz/kT)
Show that the density obeys a similar equation.
2. Relevant equations
dP/dz=-mgP/kT

rho*g=dP/dz?
3. The attempt at a solution

First part it is

dP/P=-mgdz/kT ==>P=P(0)exp(-mgz/kT)

rho=m/V, V=nkT/P => rho= m*P/nkT

From the first part of this problem , rho=m*(P(0)exp(-mgz/kT))/nkT. now I can diffentiate rho with respect to z?

2. Jan 16, 2009

### Thaakisfox

The ideal gas law says:

$$\frac{p}{\rho}=\frac{RT}{M}$$

Where M is the molar mass. Hence p and rho are proportional.

Now try to express rho with p ;)

3. Jan 18, 2009

### pentazoid

I thought the ideal gas law says that :

nkT=PV or PV=nRT==> PV/n=RT

It just makes sense to me now to differentiate P with respect to z. rho=m*(P(0)exp(-mgz/kT))/nkT, P being P(0)exp(-mgz/kT).