Saturday, July 27, 2013

Exact Sines and Cosines

Civilization has fallen. Every computer has ceased to function. All libraries are rubble. Worse, every copy of Abramowitz and Stegun has been burnt.

Your barbarian captor tells you that you have one day to calculate the sine of 12° or he will feed you to his pack of feral Vietnamese Pot-Bellied Pigs.

Watcha gonna do?


Way, way back in high school geometry Mr. Wye taught me to draw triangles like these:

Which makes it easy to calculate the sines and cosines of 30°, 45°, and 60°:

     sin 30° = cos 60° = ½   (1)
     sin 45° = cos 45° = 1/√2   (2)
     cos 60° = sin 30° = ½ √3   (3)

From that you can use the half-angle formulas

     sin θ = [ 1 − cos 2 θ ]½   (4)  and
     cos θ = [ 1 + cos 2 θ ]½ .   (5)

to give you, e.g.,

     sin 15° = (√3 − 1)/√8   (6)   and
     cos 15° = (√3 + 1)/√8    .   (7)

And then you can go on to the values for 7.5°, 3.75°, 1.875°, … . You could then use the addition formulas

     sin x+y = sin x cos y + cos x sin y   (8)   and

     cos x+y = cos cos y − sin x sin y   (9)

to compute

     sin (15° − 3.75°) = sin 11.25°

and so on, eventually getting really, really close to sin 12°.

Of course you'll never quite get there, and that means you'll be sleeping with the piggies.

But wait! We don't have to use pictures to compute sines and cosines. In addition to all of the formulas above, we we've got a large number of trigonometric relations that we can draw on:

      sin 0 = 0   ,  (10)
      cos 0 = 1   ,  (11)
      sin 90° = 1   ,  (12)
      cos 90° = 0   ,  (13)
      sin2 x + cos2 y = 1   ,  (14)
      sin (90° − x) = cos x   ,  (15)
      sin (−x) = − sin x  ,  (16)
      cos (−x) = cos x  ,  (17)   and
      cos (x + 360°) = cos x , sin (x + 360°) = sin x (18)
      sin x > 0 , cos x > 0 , 0 < x < 90°   .  (19)

So, for example, by using (15) with x = 45° we find

      sin 45° = cos 45°   (20)  .

Combine this with the Pythagorean Theorem (14) and we get

      2 sin2 45° =1  ,  (21)   or

      sin 45° = cos 45° = 1/√2   .  (22)

For 30/60°, repeated application of (8) and (9) gives

      cos 3 x = 4 cos3 x −3 cos x   .  (23)

if we set 3 x = 90°, then the left hand side of (23) must vanish and, using (19)

      cos 30° = ½ √3  .  (24)

and by (14)

      sin 30° = ½  .  (25)

We can get the values for 60° using (15).

That's nice, but it doesn't get us any closer to sin 12°. But wait! If (23) involves cos 3 x, what about another integer? Say

      cos 5 x = 5 cos x − 20 cos3 x + 16 cos5 x   .  (26)

This is a fifth-order polynomial in cos x, so if we set cos 5 x = 0, we'll get five solutions. Let's think about those a bit.

The function cos 5 x has zeros whenever 5 x = 90° + N 180°, for any integer N. If we take N = 0, 1, 2, 3, 4, we get x = 18°, 54°, 90°, 126° and 162°, respectively. Equation (26) has one zero root, which is obviously cos 90°. That leaves

      16 cos4 x − 20 cos2 x + 5 = 0   ,  (26)

which has the solutions

     cos x = ± [ (5 ± √5)/8]½  .  (27)

Since cos x is decreasing as x goes from 0 to 90° we can match the smaller positive value in (27) to cos 54° and the larger to cos 18°. The negative solutions are cos 126° = − cos 54° and cos 162° = − cos 18°.

So we have cos 18° and cos 54°. Then we can use (14) to give us the sines of those angles. Even better, using (15) we can get the sines and cosines of 36° and 72°. And guess what! From the values for 18° and 15° we can get sin 3° and cos 3°, and using those and the values for 15° we can get sine 12° and cos 12°. You're not going to be pig supper!!!


In fact, you can calculate the sine and cosine at every 3 degrees. I've attached a table of these values below. Save it for future reference, just in case your barbarian captor doesn't give you a full 24 hours to do the calculations:

Values of the trigonometric functions at special angles

θ θ sinθ = cosϕ ϕ ϕ
(Radians) (degrees) (θ+ ϕ = π/2) (Radians) (degrees)
0 0 0 π/2 90
π/60 3 (1/4) √{8−√3 (√5+1) −√{2(5−√5)}} 29π/60 87
π/30 6 (1/4) √{9−√5−√{6 (5+√5)}} 7π/15 84
π/20 9 (1/2)  √{2 − √{(5+√5)/2}} 9π/20 81
π/15 12 (1/4) √{7−√5−√{6 (5−√5)}} 13π/30 78
π/12 15 (√3−1)/(2√2) 5π/12 75
π/10 18 (1/4)  (√5 − 1) 2π/5 72
7π/60 21 (1/4) √{8 −√3(√5−1)−√{2(5+√5)}} 23π/60 69
2π/15 24 (1/4)√{7+√5−√{6(5+√5)}} 11π/30 66
3π/20 27 (1/2)  √{2 − √{(5−√5)/2}} 7π/20 63
π/6 30 1/2 π/3 60
11π/60 33 (1/4) √{8−√3 (√5+1) + √{2 (5−√5)}} 19 π/60 57
π/5 36 (1/2)  √{(5−√5)/2} 3π/10 54
13π/60 39 (1/4) √{8 + √3 (√5−1) − √{2 (5+√5)}} 17π/60 51
7π/30 42 (1/4) √{9+√5−√{6 (5−√5)}} 4π/15 48
π/4 45 1/√2 π/4 45
4π/15 48 (1/4) √{7−√5+√{6(5−√5)}} 7π/30 42
17π/60 51 (1/4) √{8−√3(√5−1) + √{2(5+√5)}} 13π/60 39
3π/10 54 (1/4)  (√5 + 1) π/5 36
19π/60 57 (1/4) √{8+√3 (√5+1) − √{2(5−√5)}} 11π/60 33
π/3 60 (1/2)  √3 π/6 30
7π/20 63 (1/2)  √{2 + √{(5−√5)/2}} 3π/20 27
11π/30 66 (1/4) √{9 − √5 + √{6 (5 + √5)}} 2π/15 24
23π/60 69 (1/4) √{8 +√3(√5−1)+√{2(5+√5)}} 7π/60 21
2π/5 72 (1/2)  √{(5+√5)/2} π/10 18
5π/12 75 (√3+1)/(2√2) π/12 15
13π/30 78 (1/4)√{9+√5+√{6(5−√5)}} π/15 12
9π/20 81 (1/2) √{2 + √{(5+√5)/2}} π/20 9
7π/15 84 (1/4) √{7+√5+√{6 (5+√5)}} π/30 6
29π/60 87 (1/4) √{8+√3 (√5+1) +√{2 (5−√5)}} π/60 3
π/2 90 1 0 0

File translated from TEX by TTH, version 4.03.
On 2 Aug 2013, 14:50.

A few notes:

  • Note that you read the sines from the top down, and the cosines from the bottom up.
  • I haven't used radians here, because your captor won't know them from arc seconds, but what we've done is compute the sine and cosine for any value N π/60 radians.
  • I've checked all the formulas by plugging them into a calculator and then comparing the values to the calculator's value for the sine. Several times. So I'm pretty sure they are all correct.
  • Hopefully this is sufficiently readable. There isn't a good way of translating LaTeX to HTML on Blogger. TTH is rather old, but still workable. If you'd like a PDF (or the original LaTeX source), shoot me an email and I'll send it to you.
  • You might think we can use cos 9 x = 0 to compute cos 10°, which means we could compute cos 1° = cos(10°-9°), and have an analytic expression for the sine and cosine at every degree. We'll explore why that doesn't work next time.

No comments:

Post a Comment