On a recent episode of everyone’s second-favourite maths podcast, Taking Maths Further, @stecks and @peterrowlett asked:

You want to calculate the height of a tall building. You set up a device for measuring angles, on a 1m high tripod, which is 200m away from the building. The angle above horizontal, when looking at the top edge of the building, is 15 degrees. What is the height of the building in metres?

I heard this question while out on my Sunday morning run and - rather than contemplate the cold, or the blisters, or the nagging hip injury, I thought I’d do better to try to do the puzzle in my head.

(Had I had a calculator, of course, it would have been a standard GCSE question: drawing a triangle with its right-angle at the base of the building gives you something you can solve - using SOH CAH TOA, you get $h = 1+200 \tan(15º)$, which your calculator will spit out as 54.6m or so.)

My only calculating device was snugly in my armband serving up podcasts, so it was time to use my head. Finding $\tan(15º)$ is the main difficulty here - I knew it was about a quarter (for smallish angles, you can get a decent approximation for $\tan(xº)$ by working out $\frac{x}{60}$), but I also knew I could do better. Fifteen, after all, is the difference between 60 and 45 - and I have those etched into my soul: $\tan(60º)=\sqrt{3}$, and $\tan(45º)= 1$.

So, I can use a trigonometric identity: $\tan(A-B) \equiv \frac{\tan(A) - \tan(B)}{1+\tan(A)\tan(B)}$, with $A=60º$ and $B=45º$. That gives me $\tan(15º) = \frac{ \sqrt{3} - 1}{1 + \sqrt{3}}$.

A younger, naiver me would have said “$\sqrt{3} \approx 1.732$, so I’ve got $\frac{0.732}{2.732}$, which is… I dunno. I am older and wiser now; I know that $\sqrt{3} \approx \frac{52}{30}$.

That makes the fraction nicer to deal with: it’s $\frac{\frac{52}{30}-1}{\frac{52}{30}+1} = \frac{52-30}{52+30} = \frac{11}{41}$.

Great! I’ve improved my estimate of $\tan(15º)$ marginally. Now all I need to do is multiply it by 200, which gives me $\frac{2200}{41}$. That’s not especially easy, but I know it’s at least 50 (because $41 \times 50 = 2050$), then I have 150 left over; $3\times 41=123$, so I estimated 53.6, and added one to make it 54.6. Correct, to three significant figures!

Two things here: I was slightly out on that last bit - $\frac{2200}{41}$ is closer to 53.7 than 53.6, but my mistake worked in my favour! I love it when that hapens.

The other thing is, I missed a trick! Had I rationalised the denominator, I’d have ended up with $\tan(15º)=2-\sqrt{3}$, which I can do with decimals! I actually know $\sqrt{3}$ to many decimal places - it’s 1.73205081, give or take. Using the complement trick for taking decimals away from whole numbers, I’d get 0.26794919 as my estimate for $\tan(15º)$ (which is correct to 8 sig fig) and - assuming I can remember all of that, double it and move the decimal point to get 53.589838m, so the building would be 54.589838 metres tall, assuming the measurements given were all sufficiently precise.