1. The problem statement, all variables and given/known data If air has a density of ρ0 on the surface, calculate its density as a function of the height y for two scenarios: (a) the temperature is constant at T0; (b) the temperature decreases linearly T(y) = T0 − ay. Express your results using the given variables together the gravitational acceleration g, gas constant R and air molar mass M. I think I am making an incorrect assumption or just going about this incorrectly. Let me know if you guys see the mistake. I am just focusing on part a as of now. 2. Relevant equations 1) F = ma 2) pV = nRT = (m/M)RT 3. The attempt at a solution 1) First, using the ideal gas law, we know: ρ=(pM)/(RT) 2) Since M, R, and T are constant if we can figure out how pressure is changing with respect to height (y) then we can find how density is as well. 3) Assuming a "slab" of air with a height of dy and a cross-sectional area of A at surface level we can apply Newton's second law: Fp_up - Fp_down - mg = ma 4) Fp_up = pressure acting up on slab Fp_down = pressure acting down on slab and a = 0. This gives: Fp_up = Fp_down + mg 5) Since p = (F/A) ⇒ F = pA: pA = (p + dp)A + ρ(Ady)g 6) I think this is where my mistake is but since we're considering a slab at surface level ρ in the above equation would be equal to ρ0 7) Form here I was able to solve the differential equation in step #5 and get: p(y) = P0-ρ0gy 8) I then substituted this in for p in the equation in step #1 and in turn got ρ as a function of y.