Find the measure of an angle in degrees/radians from inverse trigonometric functions

trigonometry

OK, so it's relatively quite simple to say that if
$$ \tan \alpha = \frac{3}{4} $$
Then
$$ \alpha = {\tan}^{-1}(3/4) $$
Which of course means $\alpha \approx 37° $ or $36.8698976458°$ to be more precise.

But how do you get there? You can represent a $45°$ angle as $\tan^{-1}(1) $ or $\sin^{-1}(1/\sqrt{2})$and you can have inverse trigonometric functions for all angles. But how do you calculate the measure of an angle (in degrees or radians) from a given inverse trigonometric function?

I mean of course I can just pick up a scientefic calculator and enter $\arctan(\sqrt3)$ to get the value of $60°$ or its radian equivalent $\pi/3$, i.e., $1.0471975512$. But how do you do that manually? I mean the calculators nowadays are usually written all in High Level Languages, but the system does do the required calculation do give the result of $\arctan(\sqrt3)$

I have just begun with inverse trigonometry and I've got intrigued by this problem and would appreciate a simple explanation.

And yes, this question applies to the other way round as well. What are the calculations required to find the trigonometric functions for any given angle?

Sines, cosines, and other trigonometric functions for some common angles like 30°, 45°, 60°, 90° and thus some other values like 75°, 15°, 300°, etc. can easily be derived but how is that done for all angles?

My current mathematical level is of early high school (class 11 CBSE), So it would be heavily appreciated if the explanation is kept simple and detailed. Please let me know if it is beyond my current knowledge (or beyond the level I may be able to grasp) if you feel so.

Best Answer

Calculating trigonometric functions

If you want to code your own trig functions on a computer, here's some math that's useful to know.

(Co)secants and (co)tangents

Of the six commonly-taught trig functions, four of them can be defined in terms of the other two.

$$\sec x = \frac{1}{\cos x}$$ $$\csc x = \frac{1}{\sin x}$$ $$\tan x = \frac{\sin x}{\cos x}$$ $$\cot x = \frac{\cos x}{\sin x}$$

So, if you can code accurate sin and cos functions, you can trivially implement sec, csc, tan, and cot using the above formulas. So from now on, I'm just going to pretend those last functions don't exist and focus on sin and cos.

Argument reduction

sin and cos are periodic, repeating their values every 360° or 2π radians. So if, for example, you ever need to know $\sin(12345°)$, you can calculate it as $\sin(12345° \operatorname{mod} 360°) = \sin 105°$.

There's also a kind of pseudo-periodicity with half and quarter turns.

$$\sin(x \pm 180°) = -\sin x$$ $$\cos(x \pm 180°) = -\cos x$$

$$\sin(x \pm 90°) = \pm \cos x$$ $$\cos(x \pm 90°) = \mp \sin x$$

Using these identities, you can take any angle, no matter how large, and reduce the problem to a “reference angle” in Quadrant 1.

Trig identities

Recall the sum/difference formulas:

$$\sin(x \pm y) = \sin x \cos y \pm \cos x \sin y$$ $$\cos(x \pm y) = \cos x \cos y \mp \sin x \sin y$$

These can help calculate unknown function values in terms of known function values. For example,

$$\sin(15°) = \sin(45° - 30°) = \sin 45° \cos 30° - \cos 45° \sin 30° = \frac{\sqrt 2}{2}\frac{\sqrt 3}{2} - \frac{\sqrt 2}{2}\frac{1}{2} = \frac{\sqrt 6 - \sqrt 2}{4}$$ $$\cos(15°) = \cos(45° - 30°) = \cos 45° \cos 30° + \sin 45° \sin 30° = \frac{\sqrt 2}{2} \frac{\sqrt 3}{2} + \frac{\sqrt 2}{2} \frac{1}{2} = \frac{\sqrt 6 + \sqrt 2}{4}$$

These identities are especially powerful when combined with the half-angle formulas.

$$\sin(\frac{x}{2}) = \sqrt{\frac{1 - \cos(x)}{2}}$$ $$\cos(\frac{x}{2}) = \sqrt{\frac{1 + \cos(x)}{2}}$$

(I'm omitting the ± symbols here because I assume you've already followed the previous section's advice to reduce your angles to Quadrant 1.)

With these, having found the trig function values for 15°, we can repeatedly bisect the angle and find the values for 7.5°, 3.75°, 1.875°, 0.9375°, 0.46875°, 0.234375°, 0.1171875°, etc.

In combination with the sum/difference identities, we can calculate the trig functions for any angle that's a binary fraction of 15°. For example,

$$17.109375° = 15° + \frac{15°}{8} + \frac{15°}{64}$$

Taylor series

There are well-known infinite series for $\sin$ and $\cos$ (when their argument angle is expressed in radians):

$$\sin x = x - \frac{x^3}{6} + \frac{x^5}{120} - \frac{x^7}{5040} + \cdots = \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{(2k+1)!}$$ $$\cos x = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \frac{x^6}{720} + \frac{x^8}{40320} - \cdots = \sum_{k=0}^\infty \frac{(-1)^k x^{2k}}{(2k+1)!}$$

Deriving these formulas is probably too advanced for you at this point, but for now, just note that they exist.

Obviously, you can't actually sum an infinite series by computer, but for small enough $|x|$, you can just take the first few terms and get a pretty nice approximation.

Precomputed tables

If your algorithm for sin and cos is slow (e.g., because you live in the pre-calculator era and are doing all the arithmetic by hand), you can calculate them for a subset of angles (e.g., whole degrees) once, and publish them in a table somewhere.

Interpolation

Suppose that you want to calculate $\sin(17°)$, but all you know is that $\sin(15°) \approx 0.258819$ and $\sin(30°) = 0.5$.

Then just use the formula $y = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1) + y_1$ for a line between two points — in this case $(15, 0.258819)$ and $(30, 0.5)$ — and with a little bit of algebra, you can estimate $\sin(17°) \approx 0.290977$. The true value is approximately $0.292372$, so it's an error of 0.001395, which may or may not be good enough for your needs.

But the narrower you can make the interval on which you need to approximate the function, the better your accuracy gets.

Calculating inverse trig functions

Once you have a good implementation of the trig functions, calculating the inverse trig functions becomes a root-finding problem. For example, let's use the simple bisection method to estimate $\arctan(0.75)$. IOW, find $x$ such that $\tan(x) = 0.75$.

The angle is positive, so $0° \le x \le 90°$.

$\tan 45° = 1$. We know that $\tan$ is increasing on this interval, so $x$ must be lower: $0° \le x \le 45°$

$\tan 22.5° \approx 0.414214$. Go higher ($22.5° \le x \le 45°$).

$\tan 33.75° \approx 0.668179$. Go higher ($33.75° \le x \le 45°$).

$\tan 41.25° \approx 0.876976$. Go lower ($33.75° \le x \le 41.25°$).

With each iteration, the interval where $x$ could lie is cut in half. Once you've got a small-enough interval, return the midpoint of it as the value of arctan.

More efficient algorithms to calculate arctan exist, but this one should be easy to understand.