I'm having trouble obtaining this physics formula. Since it's mostly about geometry, I hope it isn't out of place here.
I'll paste the text from the book:
Considering the curvature of the Earth (R is the Earth radius) and a nonvertical direction (zenith angle θ), the relation between h and path length L in the atmosphere is:
$$h = L \cos θ + \frac12\frac{L^2}{R} \sin^2 θ$$
h is the atmosphere's height.
I understand the first term (which due to the inclination) but I can't find a way to get the second term (which is introduced by considering the "roundness" of the Earth)
Any help would be greatly appreciated
On the triangle formed by the point of entry of the light ray into the atmosphere (we assume the atmosphere is a sphere of finite radius), the point of observation and the Earth's center we can apply the law of cosines to find that
$$h=\sqrt{R^2+L^2+2LR\cos\theta}-R$$
We can Taylor expand this function in powers of $L/R$ assuming that $L\ll R$ (which means the Earth is very big compared to it's atmosphere so it's approximately flat). Keeping terms up to quadratic order we find
$$h=L\cos\theta+\frac{L^2}{2R}\sin^2\theta+\mathcal{O}\left(\frac{L^3}{R^2}\right)$$