Let’s say for some reason that you know and , for some angle , and you need to figure out what is. Let’s say, furthermore, that you live in some benighted age which doesn’t have calculators or even trigonometric tables.
There are a few approaches to this. One is what I did in my “Pythagoras goes linear” post. We can fit a linear model to the points
where the $\theta_i$ range over an arithmetic sequence with endpoints 0 and $\latex \pi/2$, namely
The model you get out is quite simple:
This is actually just a few lines of R.
n = 10^6
theta = (c(0:n))*pi/(2*n);
x = cos(theta); y = sin(theta);
I’ll save you the output, but be impressed: r2 = 0.9992$, and the mean square error is 0.0126 radians or 0.72 degrees. So we can write , in radians. In degrees this is .
For example, say you have an angle with — the smaller angle of a 5-12-13 right triangle. Then we get . In fact — we’re not off by much! And the error is never more than a couple degrees, as you can see in the plot below.
This was inspired by a post by Jordan Ellenberg that I came across recently: How to compute arctangent if you live in the 18th century, which refers back to my Pythagoras goes linear. A better approximation, although nonlinear, is
where . This is essentially a simplification of the rule that Ellenberg’s source (Hugh Worthington’s 1780 textbook, The Resolution of Triangles) gives, which can be translated into our notation as
Applying this to our test angle with , we get radians, while in truth .
This formula is so nice that I can’t help but suspect there’s a simple derivation. Any takers?