2

I know:

$$\sin(x) = \frac{\text{opposite}}{\text{hypotenuse}}$$

$$\cos(x) = \frac{\text{adjacent}}{\text{hypotenuse}}$$

$$\tan(x) = \frac{\text{opposite}}{\text{adjacent}}$$

but how do you calculate $\sin(x)$, $\cos(x)$, and $\tan(x)$ without knowing any of the side's lengths?

I have looked at this question but none of the answers helped much, as I am trying to calculate accurately (i.e. $\sin(0.243)$ or $\cos(0.669)$).

1 Answers1

5

Jumping past a lot of other calculus stuff, there are some formulas to use.

$$\begin{align} \sin(x) & = x - \frac{x^3}{3!} + \frac{x^5}{5!} \dots &&= \sum_{i=0}^{\infty} (-1)^i \frac{x^{2i+1}}{(2i+1)!}\\ \cos(x) & = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} \dots &&= \sum_{i=0}^{\infty} (-1)^i \frac{x^{2i}}{(2i)!} \end{align}$$

Both series go on forever, but before too long the terms get so tiny that they don't matter anymore. The factorial in the denominator grows faster than the exponential. Still, using these formulas for large inputs will be problematic. For big values you probably want to just subtract some multiple of $2\pi$ from the parameter to get it reasonable small.

$\tan$ is a badly behaved function. The easiest way to calculate it would probably be to just calculate the $\sin$ and $\cos$ and just divide.

NovaDenizen
  • 4,216
  • 15
  • 23
  • 2
    You can derive those without calc (or rigor, to be perfectly honest). You just need De Moivre and the fact that $\sin\epsilon\approx\epsilon,\cos\epsilon\approx1$ for $\epsilon$ small. (That last fact just has to do with the fact that circles look like straight lines when you zoom in on them.) – Akiva Weinberger Oct 05 '14 at 05:10
  • With all of these, you probably want to reduce the number of polynomial terms you calculate; if you can get your angle values to within $\pi/4 \le \theta \le \pi/4$ (using complements and other angle-equivalence work) you can use fewer terms and still remain relatively accurate. This is helpful for tangent especially: the tangent of an angle is the reciprocal of the tangent of that angle's complement. – Dan Uznanski Oct 05 '14 at 05:47