# Finding missing angles of a right triangle without inverse operators

• Oct 4th 2012, 04:17 AM
JGross
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?
• Oct 4th 2012, 04:38 AM
Prove It
Re: Finding missing angles of a right triangle without inverse operators
You should use the Taylor series for these functions.
• Oct 4th 2012, 04:48 AM
johnsomeone
Re: Finding missing angles of a right triangle without inverse operators
Given $\displaystyle q$, find $\displaystyle \theta \in (0, \pi)$ such that $\displaystyle \cos(\theta) = q$:

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

2. $\displaystyle \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 $\displaystyle \theta = \cos^{-1}(q)$, based at a nearby point where you know the answer.

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

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

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

$\displaystyle \cos(1.31) = .258$, so $\displaystyle \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.