Exact Trigonometric Values

From testwiki
Jump to navigation Jump to search

Exact trigonometric values are those values of cosx, sinx and tanx that can be calculated exactly.

The calculations of these values vary from very simple to somewhat complicated.

Imagine a right triangle in which base and hypotenuse are equal and height is 0. Then

x in radians x in degrees sin(x) cos(x) tan(x)
0 0 0 1 0

Imagine a right triangle in which height and hypotenuse are equal and base is 0. Then

x in radians x in degrees sin(x) cos(x) tan(x)
π2 90 1 0 10

From the right isosceles triangle:

x in radians x in degrees sin(x) cos(x) tan(x)
π4 45 22 22 1

From the equilateral triangle:

x in radians x in degrees sin(x) cos(x) tan(x)
π6 30 12 32 33
π3 60 32 12 3

For derivation of sin18, see Sine of 18°.

x in radians x in degrees sin(x) cos(x) tan(x)
π10 18 514
2π5 72 514

The derivation of sin18 also produces the value 514 which is in fact sin54. therefore:

x in radians x in degrees sin(x) cos(x) tan(x)
π5 36 5+14
3π10 54 5+14

Derivation of cos 18°

Template:RoundBoxTop Let cos18=x. Then:

sin54=cos36=cos(218)=2x21.

cos54=cos(318)=4x33x.

cos254+sin254=1. Therefore:

(4x33x)2+(2x21)2=1.

Simplify and result is:

16x420x2+5=0 or:

16X220X+5=0 where X=x2 or x=X.

X=5±58

sin72=cos18=5+58

sin36=cos54=558 Template:RoundBoxBottom

Derivation of cos 36°

Template:RoundBoxTop Let cos36=x.

Then cos72=cos(236)=2x21 and

cos108=cos(336)=4x33x.

cos108=cos72.

Therefore:

4x33x=(2x21) or

4x3+2x23x1=0.

This cubic equation contains the root x=cos180=1.

Remove factor (x+1) and remaining quadratic is:

4x22x1=0.

Solutions of this quadratic are: 1±54.

cos36=1+54.

cos108=154.

sin18=cos72=cos108=1+54. Template:RoundBoxBottom

Calculation of tan 18°

Template:RoundBoxTop tan18=sin18cos18 =51485+5

tan218=51451485+5 =5255

tan18=5255 =5552555 =251055 Template:RoundBoxBottom

Values for 18° and 36°

x in radians x in degrees sin(x) cos(x) tan(x)
π10 18 514 10+254 251055
π5 36 10254 5+14 525

Calculation of cos 9°

Template:RoundBoxTop

Using half-angle formula

Template:RoundBoxTop cos29=1+cos182 =1+5+582 =1+25+10162 =1+25+1042 =4+25+108

cos9=4+25+108 Template:RoundBoxBottom

Using difference formula

Template:RoundBoxTop

Radians Degrees Template:Math Template:Math
Template:Math Template:Math 10254 1+54
Template:Math Template:Math 22 22

cos(AB)=cosAcosB+sinAsinB

cos9=cos(4536) =cos45cos36+sin45sin36 =221+54+2210254 =2(1+5)8+554 Template:RoundBoxBottom Although the two calculated values of cos9 are expressed differently, it can be shown that the two values 4+25+108 and 2(1+5)8+554 are equal.


By using similar techniques many exact values can be calculated. Template:RoundBoxBottom

Exact Values for Common Angles

Radians Degrees Template:Math Template:Math Template:Math
0 Template:Math 0 1 0
Template:Math Template:Math 83(5+1)10254 8+3(5+1)+10254 83(5+1)10258+3(5+1)+1025
Template:Math Template:Math 3065518 3(5+1)+10258 525(5+1)+3(15)2
Template:Math Template:Math 410+258 4+10+258 11+45(3+5)10+25
Template:Math Template:Math 7530654 9+5+30654 92405+(6514)30652
Template:Math Template:Math 624 6+24 23
Template:Math Template:Math 514 10+254 251055
Template:Math Template:Math 47+306558 4+7+306558 47+306554+7+30655
Template:Math Template:Math 222 2+22 21
Template:Math Template:Math 15+310258 1+5+30658 (35+7)525(5+3)32
Template:Math Template:Math 410258 4+10258 1145+(53)1025
Template:Math Template:Math 12 32 33
Template:Math Template:Math 8153+10254 8+15+310254 8153+10258+15+31025
Template:Math Template:Math 10254 1+54 525
Template:Math Template:Math 827530654 8+27530654 827530658+2753065
Template:Math Template:Math 93065+54 7+306554 93065+57+30655
Template:Math Template:Math 22 22 1

Other Expressions of Exact Values

Template:RoundBoxTop Depending on how the value is calculated, exact trigonometric values can be expressed in different ways. For example:

tan9=1+5(5+2)(525)

This value of tan9 contains calculation of 2 square roots. Value shown in table above contains calculation of 3 square roots.

tan27=51525

tan33=(2(23)(3+5))  (2+2(55))4

This value of tan33 contains calculation of 3 square roots. Value shown in table above contains calculation of 4 square roots. Template:RoundBoxBottom

Create a Dictionary

If you would like to create a dictionary containing the above values, the following python code has been tested on a Mac: Template:RoundBoxTop

# python code
# Constants.py

import decimal

D = decimal.Decimal

decimal.getcontext().prec = 50

L1 = []

L1 += [('Angle in Degrees', ('Sine', 'Cosine', 'Tangent'))]

L1 += [(0, (0, 1, 0))]

r5 = D(5).sqrt()
r3 = D(3).sqrt()
r2 = D(2).sqrt()
root1 = (10 - 2*r5).sqrt()
sval = (8 - r3*(r5+1) - root1).sqrt()
cval = (8 + r3*(r5+1) + root1).sqrt()

L1 += [(3, (
    sval/4,
    cval/4,
    sval/cval )
)]

L1 += [(6, (
    ((30 - 6*r5).sqrt() - r5 - 1) / 8,
    ( r3*(r5 + 1) + root1 ) / 8,
    ( (r5+1)*(5 - 2*r5).sqrt() + r3*(1 - r5) ) / 2 )
)]

v = (10 + 2*r5).sqrt()
sval = 4 - v
cval = 4 + v
r = (5 - 2*r5).sqrt()
L1 += [(
    9, (
    (sval/8).sqrt(),
    (cval/8).sqrt(),
    ( 11 + 4*r5 - (3+r5)*v ).sqrt() )
#    (+ 1 + r5 - r*(r5 + 2)) )
)]

v = (30-6*r5).sqrt()
L1 += [(
    12, (
    (7 - r5 - v).sqrt() / 4,
    (9 + r5 + v).sqrt() / 4,
    (92 - 40*r5 + (6*r5-14)*v ).sqrt() / 2 )
)]

L1 += [(
    15, (
    (r2*r3 - r2)/4,
    (r2*r3 + r2)/4,
    2 - r3 )
)]

L1 += [(
    18, (
    (r5-1)/4,
    ((10 + 2*r5).sqrt())/4,
    (25 - 10*r5).sqrt()/5 )
)]

v = (7 + (30 - 6*r5).sqrt() - r5).sqrt()
sval = ((4 - v)/8).sqrt()
cval = ((4 + v)/8).sqrt()
L1 += [(
    21, (
    sval,
    cval,
    sval/cval )
)]

L1 += [(
    22.5, (
    (2 - r2).sqrt()/2,
    (2 + r2).sqrt()/2,
    r2 - 1 )
)]

L1 += [(
    24, (
    ( r3*r5 + r3 - root1 ) / 8,
    (1 + r5 + (30 - 6*r5).sqrt()) / 8,
    ( (3*r5+7)*(5-2*r5).sqrt() - r3*(r5+3) ) / 2 )
)]

v = root1
L1 += [(
    27, (
    ((4 - v)/8).sqrt(),
    ((4 + v)/8).sqrt(),
    ( 11 - 4*r5 + (r5-3)*v ).sqrt() )
)]

L1 += [(
    30, (
    D('0.5'),
    r3/2,
    r3/3 )
)]

sval = 8 - r3*r5 - r3 + root1
sval = sval.sqrt()
cval = 8 + r3*r5 + r3 - root1
cval = cval.sqrt()

L1 += [(
    33, (
    sval/4,
    cval/4,
    sval/cval )
)]

L1 += [(
    36, (
    (10-2*r5).sqrt()/4,
    (1+r5)/4,
    (5 - 2*r5).sqrt() )
)]


v1 = (30 - 6*r5).sqrt()
v2 = 2*(7 - r5 - v1).sqrt()
sval = (8 - v2).sqrt()
cval = (8 + v2).sqrt()
L1 += [(
    39, (
    sval/4,
    cval/4,
    sval/cval )
)]


v = (30 - 6*r5).sqrt()
sval = (9 - v + r5).sqrt()/4
cval = (7 + v - r5).sqrt()/4
L1 += [(
    42, (
    sval,
    cval,
    sval/cval )
)]

L1 += [(
    45, (
    r2/2,
    r2/2,
    D(1) )
)]

dict1 = dict(L1)

Template:RoundBoxBottom

Check the Dictionary

The following python code is used to check the contents of the dictionary and to verify that there are no obvious errors. Template:RoundBoxTop

almostZero = D('1e-' + str(decimal.getcontext().prec - 2));

print ()
print ('Checking each entry.')
# Basic check of each entry.
for angle in dict1 :
    if isinstance (angle, str) : continue
    sine, cosine, tangent = dict1[angle]
    print ()
    print (angle)
    print ('   ', sine)
    print ('   ', cosine)
    print ('   ', tangent)
    diff = abs(1 -(sine*sine + cosine*cosine))
    if diff > almostZero :
        print ('error1:', diff)
    diff = abs (sine/cosine - tangent)
    if diff > almostZero :
        print ('error2:', diff)

def getData (angle) :
# sin,cos = getData(angle)
    if 135 >= angle >= 0 : pass
    else :
        print ('error3: angle =', angle)

    if angle > 90 :
        s1,c1,t1 = dict1[angle-90]
        return (c1, -s1)

    if angle > 45 :
        s1,c1,t1 = dict1[90-angle]
        return (c1,s1)

    s1,c1,t1 = dict1[angle]
    return (s1,c1)
    
print ()
print ('Checking doubles and triples.')
for angle1 in dict1 :
    if isinstance (angle1, str) : continue
    s1,c1,t1 = dict1[angle1]

    angle2 = 2*angle1
    s2,c2 = getData(angle2)
    s2_ = 2*s1*c1
    diff = abs (s2_ - s2)
    if diff > almostZero :
        print ('error4:', diff)

    angle3 = 3*angle1
    s3,c3 = getData(angle3)
    c3_ = 4*c1*c1*c1 - 3*c1
    diff = abs (c3_ - c3)
    if diff > almostZero :
        print ('error5:', diff)

Template:RoundBoxBottom

Links to related Topics

Angle sum and difference identities

Angle sum identities

Double-angle formulae

Half-angle formulae

Simple algebraic values

Common angles

Using fifth roots of unity to calculate Cosine of 72°.

Calculating π

Testing taylor series for arctanx