All of the values in your picture can be deduced from two theorems:
- The Pythagorean theorem: If a right triangle has sides $a,b,c$ where $c$ is the hypotenuse, then $a^2+b^2=c^2$
- If a right triangle has an angle of $\frac{\pi}{6} = 30^\circ$, then the length of the side opposite to that angle is half the length of the hypotenuse.
Both can be proven with elementary high school geometry.
Let's see how this works for Quadrant I (angles between $0$ and $90^\circ$), as the rest follows from identities.
- $\sin 0 = 0$; this is clear from the definition.
- $\sin 90^\circ = 1$; less intuitive because it breaks the triangle, but $\sin 90^\circ =\cos0$, and $\cos 0 = 1$ because the adjacent side and the hypotenuse coincide when the angle is $0$.
- $\sin 45^\circ = \frac{1}{\sqrt{2}}$; this corresponds to an isosceles triangle, and if we set the sides to be $1$, then by the Pythagorean theorem, the hypotenuse is $\sqrt{2}$.
- $\sin30^\circ = \frac{1}{2}$; this follows immediately from theorem 2 above.
- $\sin60^\circ = \frac{\sqrt{3}}{2}$; if we take a $30^\circ-60^\circ-90^\circ$ triangle, and set the side opposite to the $30^\circ$ angle to be $1$, then the hypotenuse is $2$ and the side opposite to the $60^\circ$ angle satisfies $x^2 + 1 = 2^2$, so its length is $\sqrt{3}$ - and thus $\sin 60^\circ = \frac{\sqrt{3}}{2}$.
Calculators either use the Taylor Series for $\sin / \cos$ or the CORDIC algorithm. A lot of information is available on Taylor Series, so I'll explain CORDIC instead.
The input required is a number in radians $\theta$, which is between $-\pi / 2$ and $\pi / 2$ (from this, we can get all of the other angles).
First, we must create a table of $\arctan 2^{-k}$ for $k=0,1,2,\ldots, N-1$. This is usually precomputed using the Taylor Series and then included with the calculator. Let $t_i = \arctan 2^{-i}$.
Consider the point in the plane $(1, 0)$. Draw the unit circle. Now if we can somehow get the point to make an angle $\theta$ with the $x$-axis, then the $x$ coordinate is the $\cos \theta$ and the $y$-coordinate is the $\sin \theta$.
Now we need to somehow get the point to have angle $\theta$. Let's do that now.
Consider three sequences $\{ x_i, y_i, z_i \}$. $z_i$ will tell us which way to rotate the point (counter-clockwise or clockwise). $x_i$ and $y_i$ are the coordinates of the point after the $i$th rotation.
Let $z_0 = \theta$, $x_0 = 1/A_{40} \approx 0.607252935008881 $, $y_0 = 0$. $A_{40}$ is a constant, and we use $40$ because we have $40$ iterations, which will give us $10$ decimal digits of accuracy. This constant is also precomputed1.
Now let:
$$ z_{i+1} = z_i - d_i t_i $$
$$ x_{i+1} = x_i - y_i d_i 2^{-i} $$
$$ y_i = y_i + x_i d_i 2^{-i} $$
$$ d_i = \text{1 if } z_i \ge 0 \text{ and -1 otherwise}$$
From this, it can be shown that $x_N$ and $y_N$ eventually become $\cos \theta$ and $\sin \theta$, respectively.
1: $A_N = \displaystyle\prod_{i=0}^{N-1} \sqrt{1+2^{-2i}}$
Best Answer
This is just a briefer restatement of the same rule, which I find easier to remember. I don't think there is a particular reason why it works. (If there were, there would be some nice generalization, which there does not seem to be.)
$\theta \hskip2cm 0^\circ \hskip 1cm 30^\circ \hskip 1cm 45^\circ \hskip1cm 60^\circ \hskip1cm 90^\circ $
$\sin(\theta) \hskip1cm {\sqrt{0} \over 2}\hskip1cm {\sqrt{1}\over 2}\hskip1cm {\sqrt{2}\over 2}\hskip1cm {\sqrt{3}\over 2}\hskip1cm {\sqrt{4}\over 2}$
$\cos(\theta) \hskip1cm {\sqrt{4} \over 2}\hskip1cm {\sqrt{3}\over 2}\hskip1cm {\sqrt{2}\over 2}\hskip1cm {\sqrt{1}\over 2}\hskip1cm {\sqrt{0}\over 2}$
Edit: You might say that these values correspond to looking at triangles where the Pythagorean theorem becomes one of the following: $$4=0+4=1+3=2+2=3+1=4+0$$ and that these triangles happen to have very nice angles.