Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Trigonométrie"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Le Cercle Trigonométrique\n",
- "\n",
- "Le cercle trigonométrique est un cercle de rayon 1 centré à l'origine. C'est une manière très pratique de vérifier le signe des fonctions trigonométriques ou de se souvenir rapidement des relations trigonométriques. Par exemple:\n",
- "* $\\cos \\alpha + \\pi = -\\cos \\alpha$\n",
- "* $\\sin \\alpha + \\pi = -\\sin \\alpha$\n",
- "* $-\\sin \\alpha = \\sin -\\alpha$\n",
- "* $\\cos \\alpha = \\cos -\\alpha$\n",
- "* $\\cos \\alpha-\\frac{\\pi}{2}= \\sin \\alpha$\n",
- "* $\\sin \\alpha+\\frac{\\pi}{2}= \\cos \\alpha$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "4b1201305fb0478d9114ed4f44c15774",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "f4beb2b4cc634ea080bfe0d155a724f4",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "interactive(children=(FloatSlider(value=0.6283185307179586, description='Angle:', layout=Layout(height='140px'…"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "import ipywidgets as widgets\n",
- "import numpy as np\n",
- "import matplotlib.pyplot as plt\n",
- "import matplotlib as mpl\n",
- "mpl.style.use('seaborn')\n",
- "%matplotlib widget\n",
- "pi = np.pi\n",
- "t = np.linspace(-2*pi,2*pi,100)\n",
- "fig1 = plt.figure(1,figsize=(6, 4))\n",
- "fig1.suptitle('Le Cercle Trigonométrique')\n",
- "ax1 = fig1.add_subplot(1, 1, 1, aspect=1)\n",
- "\n",
- "def update_plot(angle):\n",
- " ax1.clear()\n",
- " ax1.plot(np.cos(t),np.sin(t),color='black')\n",
- " theta = np.linspace(0,angle,100)\n",
- " ax1.plot(1/6*np.cos(theta),1/6*np.sin(theta),color='gray')\n",
- " ax1.axhline(0, color='black', lw=1)\n",
- " ax1.axvline(0, color='black', lw=1)\n",
- " ax1.axis('equal')\n",
- " ax1.plot(np.cos(angle),np.sin(angle))\n",
- " ax1.plot([np.cos(angle),np.cos(angle)], [0,np.sin(angle)], color='r', label='Sinus')\n",
- " ax1.plot([0,np.cos(angle)], [0,0], color='b', label='Cosinus')\n",
- " ax1.plot([1,1], [0,np.tan(angle)], color='g', label='Tangente')\n",
- " if(np.tan(angle)!=0):\n",
- " cot = 1/np.tan(angle)\n",
- " else:\n",
- " cot = 0\n",
- " ax1.plot([0,cot], [1,1], color='y', label='Cotangente')\n",
- " ax1.plot(t,np.tan(angle)*t,color='black',lw=0.8)\n",
- " ax1.legend(loc=0)\n",
- " ax1.set_xlim(-1.5, 1.5)\n",
- " ax1.set_ylim(-1.5, 1.5)\n",
- "\n",
- "angle = widgets.FloatSlider(min=-2*pi,max=2*pi,step= pi/128,value=pi/5,description='Angle:',readout_format='.1f',layout=widgets.Layout(width='50%', height='140px'))\n",
- "widgets.interactive(update_plot, angle=angle)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "***\n",
- "## Identité trigonométrique"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "$$\\sin{x+y}=\\sin{x}\\cos{y}+\\cos{x}\\sin{y}$$\n",
- "$$\\sin{x-y}=\\sin{x}\\cos{y}-\\cos{x}\\sin{y}$$\n",
- "$$\\cos{x+y}=\\cos{x}\\cos{y}-\\sin{x}\\sin{y}$$\n",
- "$$\\cos{x-y}=\\cos{x}\\cos{y}+\\sin{x}\\sin{y}$$\n",
- "$$\\cos^2+\\sin^2=1$$\n",
- "$$\\tan{x}=\\frac{\\sin{x}}{\\cos{x}}$$\n",
- "$$\\cot{x}=\\frac{\\cos{x}}{\\sin{x}}$$\n",
- "$$\\tan{x+y} = \\frac{\\tan{x}+\\tan{y}}{1-\\tan{x}\\tan{y}}$$\n",
- "$$\\tan{x-y} = \\frac{\\tan{x}-\\tan{y}}{1+\\tan{x}\\tan{y}}$$\n",
- "$$\\sin{x+\\frac{\\pi}{2}}=\\cos{x}$$\n",
- "$$\\cos{x-\\frac{\\pi}{2}}=\\sin{x}$$\n",
- "$$\\sin{-x}=-\\sin{x}$$\n",
- "$$\\cos{x}=\\cos{-x}$$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "***\n",
- "## Fonctions\n",
- "\n",
- "### Sinus\n",
- "\n",
- "Dans un triangle rectangle, il est le rapport $\\frac{\\text{opposé}}{\\text{hypothénuse}}$.\n",
- "\n",
- "En fonction de l'angle $x$ en radian, c'est une fonction périodique.\n",
- "\n",
- "Il est bijectif sur l'interval $D = \\left[-\\frac{\\pi}{2}, +\\frac{\\pi}{2}\\right]$ et se projette sur l'image $I = \\left[-1, +1\\right]$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "dde2e976aadf4ade82abaefa6fcdf167",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x7f0d2baf1f98>"
- ]
- },
- "execution_count": 2,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "x = np.linspace(-pi/2,pi/2,100)\n",
- "fig2 = plt.figure(2,figsize=(5,5))\n",
- "ax2 = fig2.add_subplot(1,1,1)\n",
- "ax2.plot(x,np.sin(x), label=\"$f(x)= \\sin(x)$\", color='red')\n",
- "ax2.axhline(0, color='black', lw=1)\n",
- "ax2.axvline(0, color='black', lw=1)\n",
- "plt.xticks([-pi/2,0,pi/2],['$-\\pi/2$','$0$','$\\pi/2$'])\n",
- "plt.yticks([-1,0,1],['$-1$','$0$','$1$'])\n",
- "ax2.axis('equal')\n",
- "ax2.set_xlim(-pi/2, pi/2)\n",
- "ax2.set_ylim(-1, 1)\n",
- "ax2.legend(loc=0)\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Arc Sinus\n",
- "\n",
- "C'est la fonction inverse du sinus.\n",
- "\n",
- "Il est bijectif sur l'interval $I = \\left[-1, +1\\right]$ et se projette sur l'ensemble de départ du sinus $D = \\left[-\\frac{\\pi}{2}, +\\frac{\\pi}{2}\\right]$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "dda8c6e38ed94a4d89e2763aa6d3de8c",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x7f0d601d2898>"
- ]
- },
- "execution_count": 3,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "x = np.linspace(-1,1,100)\n",
- "fig3 = plt.figure(3,figsize=(5,5))\n",
- "ax3 = fig3.add_subplot(1,1,1)\n",
- "ax3.axhline(0, color='black', lw=1)\n",
- "ax3.axvline(0, color='black', lw=1)\n",
- "ax3.plot(x,np.arcsin(x), label=\"$f(x)= asin(x)$\", color='red')\n",
- "plt.yticks([-pi/2,0,pi/2],['$-\\pi/2$','$0$','$\\pi/2$'])\n",
- "plt.xticks([-1,0,1],['$-1$','$0$','$1$'])\n",
- "plt.axis('equal')\n",
- "ax3.set_xlim(-1, 1)\n",
- "ax3.set_ylim(-pi/2, pi/2)\n",
- "ax3.legend(loc=0)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Cosinus\n",
- "\n",
- "Dans un triangle rectangle, il est le rapport $\\frac{\\text{adjacent}}{\\text{hypothénuse}}$.\n",
- "\n",
- "En fonction de l'angle $x$ en radian, c'est une fonction périodique.\n",
- "\n",
- "Il est bijectif sur l'interval $D = \\left[0,\\pi\\right]$ et se projette sur l'image $I = \\left[-1, +1\\right]$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "b6806e424f964d70839b5deb4caa7bc6",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x7f0d2ba5aeb8>"
- ]
- },
- "execution_count": 4,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "x = np.linspace(0,pi,100)\n",
- "fig4 = plt.figure(4,figsize=(5,5))\n",
- "ax4 = fig4.add_subplot(1,1,1)\n",
- "ax4.axhline(0, color='black', lw=1)\n",
- "ax4.axvline(0, color='black', lw=1)\n",
- "ax4.plot(x,np.cos(x), label=\"$f(x)= \\cos(x)$\", color='blue')\n",
- "plt.xticks([0,pi/2,pi],['$0$','$\\pi/2$','$\\pi$'])\n",
- "plt.yticks([-1,0,1],['$-1$','$0$','$1$'])\n",
- "ax4 = plt.gca()\n",
- "ax4.set_xlim(0, pi)\n",
- "ax4.set_ylim(-1, 1)\n",
- "ax4.legend(loc=0)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Arc Cosinus\n",
- "C'est la fonction inverse du cosinus.\n",
- "\n",
- "Il est bijectif sur l'interval $I = \\left[-1, +1\\right]$ et se projette sur l'ensemble de départ du cosinus $D = \\left[0,\\pi\\right]$ "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "fbb81e5aabf044a4b8a4ff3c66c37646",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x7f0d2b9a8fd0>"
- ]
- },
- "execution_count": 5,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "x = np.linspace(-1,1,100)\n",
- "fig5 = plt.figure(5,figsize=(5,5))\n",
- "ax5 = fig5.add_subplot(1,1,1)\n",
- "ax5.axhline(0, color='black', lw=1)\n",
- "ax5.axvline(0, color='black', lw=1)\n",
- "ax5.plot(x,np.arccos(x), label=\"$f(x)= acos(x)$\", color='blue')\n",
- "plt.yticks([0,pi/2,pi],['$0$','$\\pi/2$','$\\pi$'])\n",
- "plt.xticks([-1,0,1],['$-1$','$0$','$1$'])\n",
- "ax5.axis('equal')\n",
- "ax5.set_ylim(0, pi)\n",
- "ax5.set_xlim(-1, 1)\n",
- "ax5.legend(loc=0)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Tangente\n",
- "\n",
- "Dans un triangle rectangle, c'est le rapport $\\frac{\\text{opposé}}{\\text{adjacent}}$.\n",
- "\n",
- "En fonction de l'angle $x$ en radian, c'est une fonction périodique.\n",
- "\n",
- "Elle est bijectif sur l'interval $D = \\left]-\\frac{\\pi}{2}, +\\frac{\\pi}{2}\\right[$ et se projette sur l'image $I = \\mathbb{R}$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "01d357dee1894fa084e556e46e210f4e",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.lines.Line2D at 0x7f0d2b983c88>"
- ]
- },
- "execution_count": 6,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "x = np.linspace(-pi/2,pi/2,100)\n",
- "fig6 = plt.figure(6,figsize=(5,5))\n",
- "ax6 = fig6.add_subplot(1,1,1)\n",
- "ax6.axhline(0, color='black', lw=1)\n",
- "ax6.axvline(0, color='black', lw=1)\n",
- "ax6.plot(x,np.tan(x), label=\"$f(x)= \\sin(x)$\", color='green')\n",
- "plt.xticks([-pi/2,0,pi/2],['$-\\pi/2$','$0$','$\\pi/2$'])\n",
- "ax6.axis('equal')\n",
- "ax6.set_xlim(-pi/2, pi/2)\n",
- "ax6.set_ylim(-3, 3)\n",
- "ax6.legend(loc=0)\n",
- "ax6.axvline(pi/2, color='grey', lw=1, ls='--')\n",
- "ax6.axvline(-pi/2, color='grey', lw=1, ls='--')"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Arc Tangente\n",
- "\n",
- "C'est l'inverse de la tangente.\n",
- "Son ensemble de départ est $\\mathbb{R}$ et son ensemble d'arrivée est $\\left]-\\frac{\\pi}{2},+\\frac{\\pi}{2}\\right[$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "d082198ac2db48a1992475dd152f6a30",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.lines.Line2D at 0x7f0d2b8e3c50>"
- ]
- },
- "execution_count": 7,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "x = np.linspace(-3,3,100)\n",
- "fig7 = plt.figure(7,figsize=(5,5))\n",
- "ax7 = fig7.add_subplot(1,1,1)\n",
- "ax7.axhline(0, color='black', lw=1)\n",
- "ax7.axvline(0, color='black', lw=1)\n",
- "ax7.plot(x,np.arctan(x), label=\"$f(x)= atan(x)$\", color='green')\n",
- "plt.yticks([-pi/2,0,pi/2],['$-\\pi/2$','$0$','$\\pi/2$'])\n",
- "ax7.axis('equal')\n",
- "ax7.set_ylim(-pi/2, pi/2)\n",
- "ax7.set_xlim(-3, 3)\n",
- "ax7.legend(loc=0)\n",
- "ax7.axhline(pi/2, color='grey', lw=1, ls='--')\n",
- "ax7.axhline(-pi/2, color='grey', lw=1, ls='--')"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "***\n",
- "## Valeurs des fonctions trigonométriques\n",
- "\n",
- "Ce tableau indique la valeur des fonctions $\\sin,\\cos$ et $\\tan$ en fonction de l'angle.\n",
- "Il est très facile à construire rapidement si l'on ne connaît pas les valeurs par coeur."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "$$\n",
- "\\begin{array}{|c|c|c|c|c|c|c|}\n",
- "\\hline\n",
- " & 0 & \\frac{\\pi}{6} & \\frac{\\pi}{4} & \\frac{\\pi}{3} & \\frac{\\pi}{2} & \\pi \\\\\n",
- "\\hline\n",
- "\\sin{\\alpha} & 0 & \\frac{\\sqrt{1}}{2} & \\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{3}}{2} & 1 & 0 \\\\\n",
- "\\hline\n",
- "\\cos{\\alpha} & 1 & \\frac{\\sqrt{3}}{2} & \\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{1}}{2} & 0 & 1 \\\\\n",
- "\\hline\n",
- "\\tan{\\alpha} & 0 & \\frac{\\sqrt{3}}{3} & 1 & \\sqrt{3} & \\emptyset & 0 \\\\\n",
- "\\hline\n",
- "\\end{array}\n",
- "$$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Construction\n",
- "\n",
- "1. Trier les angles remarquables du premier cadrant du plus petit au plus grand sur la première ligne.\n",
- "2. *Les sinus sont les premiers* car ils sont au dessus au numérateur dans la fonction $\\tan$. Alors il convient de commencer par eux.\n",
- "3. Entrer les valeurs remarquables les plus importantes ( $0,\\frac{\\pi}{2}, \\pi$ ). Elle sont facile à évaluer et elle ne valent que 1 ou 0.\n",
- "4. Poser la structure $\\frac{\\sqrt{x}}{2}$ dans les trois colonnes restantes pour le $\\sin$ et le $\\cos$.\n",
- "5. Comme *les sinus sont les premiers* on écrit de gauche à droite 1,2,3 et pour les cosinus 3,2,1.\n",
- "6. On complète pour $\\tan$ en divisant les $\\sin$ par les $\\cos$"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
- "outputs": [],
- "source": [
- "%matplotlib widget"
- ]
- }
- ],
- "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.7.3"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement