# Thread: Finding missing angles of a right triangle without inverse operators

1. ## Finding missing angles of a right triangle without inverse operators

I'm working on a little project with a basic programming language and I would like to find the missing angles of a right triangle but I don't have access to ArcSin, ArcCos, ArcTan.

I do know the lengths of all legs of the triangle and I do have access to some math functions such as sin, cos, tan, sqrt, pi, and powers.

So, given access to these functions but not to the inverse trig functions, is there a way I can use the information that I have to calculate the remaining angles in degrees?

2. ## Re: Finding missing angles of a right triangle without inverse operators

You should use the Taylor series for these functions.

3. ## Re: Finding missing angles of a right triangle without inverse operators

Given $q$, find $\theta \in (0, \pi)$ such that $\cos(\theta) = q$:

1. Newton's Method: $f(\theta) = \cos(\theta) - q$, so find $\theta$ such that find $f(\theta) = 0$.

2. $\theta = \cos^{-1}(q) = \int_q^1 \frac{1}{\sqrt{1-x^2}} dx$. Then use Trapezoid or Simpson's Method to do the integral.

3. Power series for $\theta = \cos^{-1}(q)$, based at a nearby point where you know the answer.

4. Zero in on it: If $q = 0.25$, then $\cos(1) = .54, \cos(1.5) = .07$, so $\theta$ between 1 and 1.5. Try 1.25:

$\cos(1.25) = .31$, so $\theta$ between 1.25 and 1.5. Try 1.37:

$\cos(1.37) = .20$, so $\theta$ between 1.25 and 1.37. Try 1.31:

$\cos(1.31) = .258$, so $\theta$ between 1.31 and 1.37. Etc...

5. Depending on how many decimal points you want, you could build a table of cosine values, and then look it up (binary search). You could then do a linear interpolation between the successive table entries (or better, see #6).

6. If you have a good guess at a point where you know the inverse trig function's value, you can estimate it's value at a nearby point by using the linear approximation to the inverse-trig function at that point. This could be combined with several of the other approaches. Moreover, yo could make this a quadartic approximation, or a cubic approximation, which will give an even better approximation for small changes.