In [7]:
#Hide code
from IPython.display import HTML

HTML('''<script>
function code_toggle() {
if (code_shown){
$('div.input').hide('500');$('#toggleButton').val('Show Code')
} else {
$('div.input').show('500');$('#toggleButton').val('Hide Code')
}
code_shown = !code_shown
}

$( document ).ready(function(){ code_shown=false;$('div.input').hide()
});
</script>
<form action="javascript:code_toggle()"><input type="submit" id="toggleButton" value="Show Code"></form>''')

Out[7]:

# An Introduction to Historical Trigonometry¶

Hello and welcome! This set of materials is intended to accompany an introductory lesson on the history of trigonometry, developed by Kailyn Pritchard in January 2019. If you are interested in teaching such a lesson, please feel free to reach out to her at [email protected] for further information, and/or a copy of the lesson plan.

The following table displays the values for the six most common trigonometric functions (sine, cosine, tangent, secant, cosecant, and cotangent) when evaluated for every 15° of argument, between 0° and 90°.

In [8]:
import pandas as pd
import qgrid
import math

import warnings
warnings.filterwarnings("ignore")

functions = ['Sine', 'Cosine', 'Tangent', 'Secant', 'Cosecant', 'Cotangent']
computations = [[round(math.sin(0*math.pi/180),6), round(math.cos(0*math.pi/180),6), round(math.tan(0*math.pi/180),6), round(1/(math.cos(0*math.pi/180)),6), 'Undefined', 'Undefined'],
[round(math.sin(15*math.pi/180),6), round(math.cos(15*math.pi/180),6), round(math.tan(15*math.pi/180),6), round(1/(math.cos(15*math.pi/180)),6), round(1/(math.sin(15*math.pi/180)),6), round(1/(math.tan(15*math.pi/180)),6)],
[round(math.sin(30*math.pi/180),6), round(math.cos(30*math.pi/180),6), round(math.tan(30*math.pi/180),6), round(1/(math.cos(30*math.pi/180)),6), round(1/(math.sin(30*math.pi/180)),6), round(1/(math.tan(30*math.pi/180)),6)],
[round(math.sin(45*math.pi/180),6), round(math.cos(45*math.pi/180),6), round(math.tan(45*math.pi/180),6), round(1/(math.cos(45*math.pi/180)),6), round(1/(math.sin(45*math.pi/180)),6), round(1/(math.tan(45*math.pi/180)),6)],
[round(math.sin(60*math.pi/180),6), round(math.cos(60*math.pi/180),6), round(math.tan(60*math.pi/180),6), round(1/(math.cos(60*math.pi/180)),6), round(1/(math.sin(60*math.pi/180)),6), round(1/(math.tan(60*math.pi/180)),6)],
[round(math.sin(75*math.pi/180),6), round(math.cos(75*math.pi/180),6), round(math.tan(75*math.pi/180),6), round(1/(math.cos(75*math.pi/180)),6), round(1/(math.sin(75*math.pi/180)),6), round(1/(math.tan(75*math.pi/180)),6)],
[round(math.sin(90*math.pi/180),6), round(math.cos(90*math.pi/180),6), 'Undefined', 'Undefined', round(1/(math.sin(90*math.pi/180)),6), round(1/(math.tan(90*math.pi/180)),6)]]
arguments = ["0°" , "15°", "30°", "45°", "60°", "75°", "90°"]

trigTable = pd.DataFrame(data = computations, columns = functions , index = arguments)

display(trigTable)

Sine Cosine Tangent Secant Cosecant Cotangent
0.000000 1.000000 0 1 Undefined Undefined
15° 0.258819 0.965926 0.267949 1.03528 3.8637 3.73205
30° 0.500000 0.866025 0.57735 1.1547 2 1.73205
45° 0.707107 0.707107 1 1.41421 1.41421 1
60° 0.866025 0.500000 1.73205 2 1.1547 0.57735
75° 0.965926 0.258819 3.73205 3.8637 1.03528 0.267949
90° 1.000000 0.000000 Undefined Undefined 1 0

As we discussed in class, historical astronomers did not have access to decimal fractional notation, so instead of using the unit circle, they used circles with radii much larger than 1. We can now choose our own radius, and have the computer program calculate the table for us!

In [9]:
rad = input("What radius would you like to use? ")

What radius would you like to use? 60000

In [10]:
print('Below, we can now see the same table, computed for a circle of radius ' + str(Rad) + '.')

functions2 = ['Sine', 'Cosine', 'Tangent', 'Secant', 'Cosecant', 'Cotangent']

arguments2 = ["0°" , "15°", "30°", "45°", "60°", "75°", "90°"]

trigTable2 = pd.DataFrame(data = computations2, columns = functions2 , index = arguments2)

display(trigTable2)

Below, we can now see the same table, computed for a circle of radius 60000.

Sine Cosine Tangent Secant Cosecant Cotangent
0.0 60000.0 0 60000 Undefined Undefined
15° 15529.0 57956.0 16077 62117 231822 223923
30° 30000.0 51962.0 34641 69282 120000 103923
45° 42426.0 42426.0 60000 84853 84853 60000
60° 51962.0 30000.0 103923 120000 69282 34641
75° 57956.0 15529.0 223923 231822 62117 16077
90° 60000.0 0.0 Undefined Undefined 60000 0