{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "![Callysto Banner](https://raw.githubusercontent.com/Ariel-VB/Central-Limit-Theorem/master/Callysto_Notebook-Banner_Top_06.06.18.jpg)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Hide code\n", "from IPython.display import HTML\n", "\n", "HTML('''\n", "
''')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# An Introduction to Historical Trigonometry\n", "\n", "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 kailyn.pritchard@questu.ca for further information, and/or a copy of the lesson plan." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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°." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
SineCosineTangentSecantCosecantCotangent
0.0000001.00000001UndefinedUndefined
15°0.2588190.9659260.2679491.035283.86373.73205
30°0.5000000.8660250.577351.154721.73205
45°0.7071070.70710711.414211.414211
60°0.8660250.5000001.7320521.15470.57735
75°0.9659260.2588193.732053.86371.035280.267949
90°1.0000000.000000UndefinedUndefined10
\n", "
" ], "text/plain": [ " Sine Cosine Tangent Secant Cosecant Cotangent\n", "0° 0.000000 1.000000 0 1 Undefined Undefined\n", "15° 0.258819 0.965926 0.267949 1.03528 3.8637 3.73205\n", "30° 0.500000 0.866025 0.57735 1.1547 2 1.73205\n", "45° 0.707107 0.707107 1 1.41421 1.41421 1\n", "60° 0.866025 0.500000 1.73205 2 1.1547 0.57735\n", "75° 0.965926 0.258819 3.73205 3.8637 1.03528 0.267949\n", "90° 1.000000 0.000000 Undefined Undefined 1 0" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import pandas as pd\n", "import qgrid\n", "import math\n", "\n", "import warnings\n", "warnings.filterwarnings(\"ignore\")\n", "\n", "functions = ['Sine', 'Cosine', 'Tangent', 'Secant', 'Cosecant', 'Cotangent']\n", "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'], \n", " [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)], \n", " [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)],\n", " [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)], \n", " [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)], \n", " [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)],\n", " [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)]] \n", "arguments = [\"0°\" , \"15°\", \"30°\", \"45°\", \"60°\", \"75°\", \"90°\"]\n", "\n", "trigTable = pd.DataFrame(data = computations, columns = functions , index = arguments)\n", "\n", "display(trigTable)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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!" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "What radius would you like to use? 60000\n" ] } ], "source": [ "rad = input(\"What radius would you like to use? \")\n", "Rad = int(rad)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Below, we can now see the same table, computed for a circle of radius 60000.\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
SineCosineTangentSecantCosecantCotangent
0.060000.0060000UndefinedUndefined
15°15529.057956.01607762117231822223923
30°30000.051962.03464169282120000103923
45°42426.042426.060000848538485360000
60°51962.030000.01039231200006928234641
75°57956.015529.02239232318226211716077
90°60000.00.0UndefinedUndefined600000
\n", "
" ], "text/plain": [ " Sine Cosine Tangent Secant Cosecant Cotangent\n", "0° 0.0 60000.0 0 60000 Undefined Undefined\n", "15° 15529.0 57956.0 16077 62117 231822 223923\n", "30° 30000.0 51962.0 34641 69282 120000 103923\n", "45° 42426.0 42426.0 60000 84853 84853 60000\n", "60° 51962.0 30000.0 103923 120000 69282 34641\n", "75° 57956.0 15529.0 223923 231822 62117 16077\n", "90° 60000.0 0.0 Undefined Undefined 60000 0" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "print('Below, we can now see the same table, computed for a circle of radius ' + str(Rad) + '.')\n", "\n", "functions2 = ['Sine', 'Cosine', 'Tangent', 'Secant', 'Cosecant', 'Cotangent']\n", "\n", "computations2 = [[round(Rad*trigTable.loc['0°', 'Sine'],0), round(Rad*trigTable.loc['0°', 'Cosine'],0), round(Rad*trigTable.loc['0°', 'Tangent'],0), round(Rad*trigTable.loc['0°', 'Secant'],0), 'Undefined', 'Undefined'], \n", " [round(Rad*trigTable.loc['15°', 'Sine'],0), round(Rad*trigTable.loc['15°', 'Cosine'],0), round(Rad*trigTable.loc['15°', 'Tangent'],0), round(Rad*trigTable.loc['15°', 'Secant'],0), round(Rad*trigTable.loc['15°', 'Cosecant'],0), round(Rad*trigTable.loc['15°', 'Cotangent'],0)], \n", " [round(Rad*trigTable.loc['30°', 'Sine'],0), round(Rad*trigTable.loc['30°', 'Cosine'],0), round(Rad*trigTable.loc['30°', 'Tangent'],0), round(Rad*trigTable.loc['30°', 'Secant'],0), round(Rad*trigTable.loc['30°', 'Cosecant'],0), round(Rad*trigTable.loc['30°', 'Cotangent'],0)],\n", " [round(Rad*trigTable.loc['45°', 'Sine'],0), round(Rad*trigTable.loc['45°', 'Cosine'],0), round(Rad*trigTable.loc['45°', 'Tangent'],0), round(Rad*trigTable.loc['45°', 'Secant'],0), round(Rad*trigTable.loc['45°', 'Cosecant'],0), round(Rad*trigTable.loc['45°', 'Cotangent'],0)], \n", " [round(Rad*trigTable.loc['60°', 'Sine'],0), round(Rad*trigTable.loc['60°', 'Cosine'],0), round(Rad*trigTable.loc['60°', 'Tangent'],0), round(Rad*trigTable.loc['60°', 'Secant'],0), round(Rad*trigTable.loc['60°', 'Cosecant'],0), round(Rad*trigTable.loc['60°', 'Cotangent'],0)], \n", " [round(Rad*trigTable.loc['75°', 'Sine'],0), round(Rad*trigTable.loc['75°', 'Cosine'],0), round(Rad*trigTable.loc['75°', 'Tangent'],0), round(Rad*trigTable.loc['75°', 'Secant'],0), round(Rad*trigTable.loc['75°', 'Cosecant'],0), round(Rad*trigTable.loc['75°', 'Cotangent'],0)],\n", " [round(Rad*trigTable.loc['90°', 'Sine'],0), round(Rad*trigTable.loc['90°', 'Cosine'],0), 'Undefined', 'Undefined', round(Rad*trigTable.loc['90°', 'Cosecant'],0), round(Rad*trigTable.loc['90°', 'Cotangent'],0)]]\n", "\n", "arguments2 = [\"0°\" , \"15°\", \"30°\", \"45°\", \"60°\", \"75°\", \"90°\"]\n", "\n", "trigTable2 = pd.DataFrame(data = computations2, columns = functions2 , index = arguments2)\n", "\n", "display(trigTable2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![Callysto Banner](https://github.com/Ariel-VB/Central-Limit-Theorem/blob/master/Callysto_Notebook-Banners_Bottom_06.06.18.jpg?raw=true)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" } }, "nbformat": 4, "nbformat_minor": 2 }