p(h):pressure n(h):number of particles in unit volume F(h):force applied to the each particle U(h):potential energy of the particle From equation of state, we obtain: \begin{equation} \label{eq:state} p(h)V=NRT \rightarrow p(h)=n(h)k_bT\tag{1} \end{equation} Considering equilibrium of forces in the gas between h and h+dh, we obtain: \begin{equation} Sp(h+dh)+n(h)F(h)Sdh=p(h)S\\ \rightarrow p(h+dh)+n(h)F(h)dh=p(h)\\ \rightarrow \frac{p(h+dh)-p(h)}{dh}=-n(h)F(h)\\ \rightarrow \frac{dp}{dh}=-n(h)F(h)\tag{2} \end{equation} By substituting (1) to (2),we can derive differential equation (3). \begin{equation} k_bT\frac{dn}{dh}=-n(h)F(h)\tag{3} \end{equation} ODE (3) can be solved by dividing both sides by n. \begin{equation} \frac{1}{n}\frac{dn}{dh}=-\frac{F(h)}{k_bT} \end{equation} Integrating both sides by h results in following. \begin{equation} \int \frac{1}{n}dn=-\frac{1}{k_bT} \int F(h) dh \end{equation} \begin{equation} \leftrightarrow \int \frac{1}{n}dn=-\frac{1}{k_b