Note: this article makes use of MathML, the standard XML markup for math formulas. Sadly, this is not properly supported on some allegedly ‘modern’ and ‘feature-rich’ browsers. If the formulas don't make sense in your browser, consider reporting the issue to the respective developers and/or switching to a standard-compliant browser.

You are standing on the beach of a great lake, and realize that the other side is far enough to not be visible. You'd have to get to a higher place. But how much higher?

To simplify things a little bit, let us assume that the Earth is spherical, so that the geodetic (shortest path on the surface) connecting any two points on the surface is the arc of a great circle, and let as denote the radius of this sphere by $r$ (which is something less of 6,400 km).

Let us denote by $d$ the distance (along the geodetic) between the place $P$ where we are and the place $S$ we want to see. Let $h$ be the distance above the Earth surface our eyes have to be to be able to see $S$ due to the curvature of the Earth.

Observe that the center of the earth $C$, the place $S$ we want to see and the place $H$ we have to be at to see it represent a right triangle with hypothenuse $CH$ and legs $CS$ and $SH$. We also have $CH=CP+PH=r+h$, $CS=r$ and the arc $PS=d$.

By definition of radian, the angle $PCS$ has amplitude $\alpha =\frac{d}{r}$ (radians). As a side note, we remark that this whole construction only makes sense if $\alpha <\frac{\pi}{2}$, or $2d<\pi r$ (we will discuss this more later).

We also have that $cos\alpha =\frac{CS}{CH}$, and thus $CH=\frac{CS}{cos\alpha}$, that is $r+h=\frac{r}{cos\alpha}$ and finally:

$$h=r(\frac{1}{cos\alpha}-1)$$

or

$$h=r\frac{1-cos\alpha}{cos\alpha}.$$

## Approximation

To proceed further, let us assume that $d$ is very small compared to $r$, so that the cosine of the angle is very close to 1. We can then make use of the small-angle approximation $cosx=1-\frac{{x}^{2}}{2}$, which brings us to

$$h=r\frac{\frac{{\alpha}^{2}}{2}}{1-\frac{{\alpha}^{2}}{2}}$$

or

$$h=r\frac{{\alpha}^{2}}{2-{\alpha}^{2}}$$

and rememering that $\alpha =\frac{d}{r}$,

$$h=r\frac{{d}^{2}}{2{r}^{2}-{d}^{2}}.$$

Taking advantage of the fact that $\frac{r}{d}$ is probably easier to compute than $\frac{d}{r}$ for us, we can rewrite the previous expression as

$$h=\frac{r}{2{\left(\frac{r}{d}\right)}^{2}-1}.$$

## A different formula

Let's go back to

$$h=r(\frac{1}{cos\alpha}-1)$$

and remember that, with $t=tan\left(\frac{\alpha}{2}\right)$, we can write $cos\alpha =\frac{1-{t}^{2}}{1+{t}^{2}}$, so:

$$h=r(\frac{1+{t}^{2}}{1-{t}^{2}}-1)$$

or

$$h=r\frac{1+{t}^{2}-1+{t}^{2}}{1-{t}^{2}}$$

simplifying to

$$h=r\frac{2{t}^{2}}{1-{t}^{2}}$$

or still again, dividing numerator and denomitator by ${t}^{2}$,

$$h=\frac{2r}{\frac{1}{{t}^{2}}-1}$$

For small $\alpha $ we can approximate $t=\frac{d}{2r}$ and $\frac{1}{t}=2\frac{r}{d}$. This gives us

$$h=\frac{2r}{4{\left(\frac{r}{d}\right)}^{2}-1}=\frac{r}{2{\left(\frac{r}{d}\right)}^{2}-\frac{1}{2}}$$

The only difference is that we're subtracting $\frac{1}{2}$ instead of 1 at the denominator. In fact, in most cases (small $d$) we can completely disregard the subtracting costant.

## A historical note

When computers were not as common as they are today, and time-consuming accurate computations were optimized by the use of look-up tables, several derived trigonometric functions were in common usage. The one we care about is the exterior secant (exsec for short), that represents exactly the ratio of the length we are interested in to the radius of the circle:

$$h=rexsec\alpha .$$

The interesting thing about $exsec$ is that you can express it in terms of the tangent simply as

$$exsec\alpha =tan\alpha tan\left(\frac{\alpha}{2}\right).$$

The first terms of the Taylor expansion around 0 for this function are:

$$\frac{{\alpha}^{2}}{2}+5\frac{{\alpha}^{4}}{24}+61\frac{{\alpha}^{6}}{720}+\cdots $$

as usual with $\alpha =\frac{d}{r}$.

If we stop at the first term (the same we would get from our knowledge of the first-order approximation of the tangent), we get an approximation of $h$ as

$$h=\frac{r}{2}{\left(\frac{d}{r}\right)}^{2}=\frac{{d}^{2}}{2r}$$

which, while written differently, is in fact the same expression that we've seen already, but with a null constant —as anticipated.

Knowing additional terms allows us to write higher order approximation (if we would ever need it):

$$h=r(\frac{1}{2}{\left(\frac{d}{r}\right)}^{2}+\frac{5}{24}{\left(\frac{d}{r}\right)}^{4})=\frac{{d}^{2}}{2r}(1+\frac{5}{12}{\left(\frac{d}{r}\right)}^{2}).$$

If we wanted to express this in terms of the easier-to-compute-and-square $q=\frac{r}{d}$, we would get:

$$h=\frac{r}{2}(\frac{1}{{q}^{2}}+\frac{5}{12{q}^{4}})=\frac{r}{2{q}^{2}}(1+\frac{5}{6\cdot 2{q}^{2}}).$$

Finally, since we know the next term in the series, let's do that (and
stop there, since coefficients start becoming *very* large
afterwards): expanding $\alpha $ we get

$$h=r(\frac{1}{2}{\left(\frac{d}{r}\right)}^{2}+\frac{5}{24}{\left(\frac{d}{r}\right)}^{4}+\frac{61}{720}{\left(\frac{d}{r}\right)}^{6})$$

and expressing this in terms of $q$:

$$h=\frac{r}{2}(\frac{1}{{q}^{2}}+\frac{5}{12{q}^{4}}+\frac{61}{360{q}^{6}})=\frac{r}{2{q}^{2}}(1+\frac{1}{6\cdot 2{q}^{2}}(5+\frac{61}{15\cdot 2{q}^{2}})).$$

## TL;DR summary

If you want to know how high you have to go over the surface of a sphere of radius $r$ to see a point which is at distance $d$ along the surface of the sphere, compute $q=\frac{r}{d}$ and then your height can be computed as

$$h=\frac{r}{2{q}^{2}}.$$

For higher-order terms, set $s=2{q}^{2}$. The second term then gives us

$$h=\frac{r}{s}(1+\frac{5}{6s}),$$

and if we want to push it further

$$h=\frac{r}{s}(1+\frac{1}{6s}(5+\frac{61}{15s})).$$

(The formulas are in Horner's form, which makes for quicker computation and express elegantly the “extra contribution” from each new term.)

## An example

As an example, let's say that $d$ is about 160 km, which puts $\frac{r}{d}$ at around 40, squared to 1,600, doubled to 3,200. Disregarding the subtracting constant (i.e. using the exsecant expansion), the final result is $h=\frac{6400}{3200}=2$ km. The correct value would be $2.00052...$, so our approximation is good within half a meter out of 2km, a relative error of about 2.6%.

## Limitations

You can't see further than a quarter circle in each direction, and
that's only at infinite distance from the sphere surface; so we must
have $\frac{d}{r}=\alpha <\frac{\pi}{2}$ or $2d<\pi r$. (Using the approximation
$\pi \approx \frac{22}{7}$, which is a *slight* overestimation, we get the easier
condition $7d<11r$).

On the Earth, this would mean distances up to about 10,000km, which means you wouldn't be able to see Cape Town from Reykjavik (over 11,400km), but you could see Hong Kong from Rome (9,280km).

However, the formulas we presented aren't accurate in the whole domain: the error term for the higher order approximation is of order 6, and in the highest order we presented is of order 8, which is very good as long as your angles are less than 1 radian, but actually gets really bad really fast after that.

(Intuitively, you can tell that the formula doesn't work when the distance approaches its maximum because the exact formula diverges, while the ones we have proposed don't.)

To see this in action, consider the Rome to Hong Kong case. We have $q=1.45$, squared to $2.1025$, doubled to $s=4.205$.

Our lower-order estimate for $h$ is 1,522km. Our higher-order estimate for $h$ is 1,824km. Our highest-order estimate is 2,160km. The correct answer is 46,711km, over 20 times higher!

So, how far can you push the formula? How large can the angle be before the error you commit is too large? What would be a possible workaround? (Aside from the obvious: use the exact formula.)