Algebra help, logarithms, calculus

I'm seriously out of my depth. I have very basic understanding of logarithms and calculus. Please could someone walk me through how to get from: $$\frac{{d}p}{p} = -\frac{g}{R}\cdot \frac{dh}{T_{0}-\lambda h}$$ To: $$\log p = \frac{g}{\lambda R}\log(T_{0}-\lambda h) + constant$$ I'd appreciate terminology of any manipulations done so I can Google them for more information. Thank you!

• If you are having trouble seeing how the answers below "knew" what steps to take, when you know the correct answer it is a useful technique to work backwards to the question, and then examine the steps for patterns to recognize in the future. In this case that means implicitly differentiating both sides of the equation. Mar 1, 2013 at 2:33

This is a first order, non-linear, ordinary differential equation. (For terminology) The dependent variable is $p$, and the independent variable is $h$.

The technique used to solve is called "separation of variables." (more terminology)

Starting with your expression: $$\frac{{d}p}{p} = -\frac{g}{R}\cdot \frac{dh}{T_{0}-\lambda h}$$ $$\int\frac{{d}p}{p} = \int-\frac{g}{R}\cdot \frac{dh}{T_{0}-\lambda h}$$ Recall that $\int\frac{1}{x}dx=\ln |x| + C$. Thus we have: $$\ln|p|+C = \int-\frac{g}{R}\cdot \frac{dh}{T_{0}-\lambda h}$$ Now we perform a $u$-substitution on the RHS, letting $u=T_0 -\lambda h$. This implies that $du = -\lambda dh$ $$\ln|p|+C = \int-\frac{g}{R(-\lambda)}\cdot \frac{du}{u}$$ Integrating (using the same rule as above): $$\ln|p|+C = \frac{g}{R(\lambda)}\cdot \ln|u|$$

Rearranging, and substituting $u$ back in: $$\ln|p| = \frac{g}{R\lambda}\cdot \ln|T_0 -\lambda h| + C$$

Hint: Integrate both sides; the left with respect to $p$, the right with respect to $h$.
$$\int\frac{dp}{p}= \int\frac{-g}{R}\frac{dh}{T_0-\lambda h}$$ this gives
$$\log(p)+C= -\frac{g}{R(-\lambda)}\int\frac{1}{u}du = \frac{g}{\lambda R}$$ where $u= T_0-\lambda h$, which gives $du = -\lambda dh$ and $C$ is our constant term.
Finally when substituting $u$ back in and combining our constant terms we get
$$\log(p)= \frac{g}{\lambda R}\log(T_0-\lambda h) + C$$