# A Cautionary Tale of Compute Inverse Trigonometric Functions

From $\arcsin(x)$‘s definition:

$\{(x, y) | \sin(y) = x, -\frac{\pi}{2} \le y \le \frac{\pi}{2}\},$

we have

$\arcsin(0) = 0, \arcsin(\frac{1}{2})= \frac{\pi}{6},\arcsin(\frac{\sqrt{3}}{2}) = \frac{\pi}{3}, \arcsin(1) = \frac{\pi}{2}$

and,

$\arcsin(-\frac{1}{2})= -\frac{\pi}{6},\arcsin(-\frac{\sqrt{3}}{2}) = -\frac{\pi}{3}, \arcsin(-1) = -\frac{\pi}{2}.$

To obtain other values of $\arcsin(x)$, we may simply solve

$\sin(y) - x = 0$

for $y$ where $-1 \le x \le 1.$

For example (see Fig. 1), solving $\sin(y) = \frac{1}{\sqrt{2}}$ for $y$ gives $y \approx \frac{\pi}{4}.$ It is in agreement with the fact that $\arcsin(\frac{1}{\sqrt{2}})= \frac{\pi}{4}.$

Fig. 1

In Fig. 2, we compute $\arcsin(x)$ from repeatedly solving $\sin(y) = x$ for $y$ where

$x=-1+i \cdot\frac{1-(-1)}{n}, i=1,2,...n.$

Fig. 2

Since $\sin(y)$ is a periodic function, $\sin(y) = x$ has infinitely many solutions. It is possible that the solution obtained by Newton’s method lies outside of $[-\frac{\pi}{2}, \frac{\pi}{2}]$, the range of $\arcsin(x)$ by its definition. Such solution cannot be considered the value of $\arcsin(x).$

Fig. 3

Exercise-1 Compute $\arccos(x)$ by solving $\cos(y) = x$ for $y.$

Exercise-2 Explain Fig. 3.