We did a simple example in lecture with sea pressure but for this question I'm kinda confused. It goes like this:
We can model the atmosphere as a $\textbf{static fluid}$, with the air a $\textbf{compressible perfect gas}$ acting under a uniform gravitational field in the negative $z$-direction $\underline{g} = -g\underline{\hat{k}}$. That the pressure $p$ satisfies $$\frac{\mathrm{d}p}{\mathrm{d}z} = -\rho g \quad \text{with}\quad p=\rho\mathcal{R}T$$ where $T$ is the tempertature and $\mathcal{R}$ is the gas constant, subject to $$p=p_0,\quad T=T_0,\quad \text{at}\quad z=0$$ Find the solution $p=p(z)$ if we assume
(i) The temperature varies linearly with height $z$, $T(z) = T_0 - \beta(z-z_0)$
(ii) The temperature is isothermal $T = T_0$
I am very new to this so I'm not sure how to use the information I'm given to solve for $p(z)$. I am not even sure of how to think of the situation in a image. Can I have some guidence on how a question like this is to be undertaken?
I think to find $p(z)$ I have to integrate to get
$$p(z) = p_0 - \rho gz = \rho\mathcal{R}T - \rho gz\quad??$$
And do I then use what I am given for $T(z)$ to get
$$p(z) = \rho\mathcal{R}\Big(T(z) + \beta(z - z_0)\Big) - \rho gz$$
But what would I do now?