In some reading I came across this equation P/P1=(T/T1)^-g/aR which can apparently be derived from dp/P=(-g/RT)dh when T=T1 + a(h-h1). I don't really understand how they could have taken the a out of the integral in order for it to be part of the exponent once you get rid the the ln on both sides. It should end up as -g/aR * (integral of dt/T) before you integrate both sides and then get rid of the ln on both sides, correct? I guess I am mostly confused about the fact that both temperature t is changing based on height h, but both are changing. If I just substituted T as T1+a(h-h1) I have no idea how to proceed from there. Does this require any more advanced types of integrals or am I just missing something obvious? Sorry about my lack of LaTeX, I am going to learn that soon but for now I hope you don't mind this mess I presented. Thanks in advance.