diff --git a/Supporting_Notebooks/Taylor-Series.ipynb b/Supporting_Notebooks/Taylor-Series.ipynb index 28f787c..6229587 100644 --- a/Supporting_Notebooks/Taylor-Series.ipynb +++ b/Supporting_Notebooks/Taylor-Series.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -25,7 +25,7 @@ "" ] }, - "execution_count": 3, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -66,21 +66,21 @@ "\n", "Now we can substitute these values into the equation.\n", "\n", - "$$\\sin(x) = \\frac{0}{0!}(x)^0 + \\frac{1}{1!}(x)^1 + \\frac{0}{2!}(x)^2 + \\frac{-1}{3!}(x)^3 + \\frac{0}{4!}(x)^4 + \\frac{-1}{5!}(x)^5 + ... $$\n", + "$$\\sin(x) = \\frac{0}{0!}(x)^0 + \\frac{1}{1!}(x)^1 + \\frac{0}{2!}(x)^2 + \\frac{-1}{3!}(x)^3 + \\frac{0}{4!}(x)^4 + \\frac{1}{5!}(x)^5 + ... $$\n", "\n", "And let's test this with some code:" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "estimate of sin(.3) is 0.30452025\n", + "estimate of sin(.3) is 0.29552025\n", "exact value of sin(.3) is 0.29552020666133955\n" ] } @@ -89,7 +89,7 @@ "import numpy as np\n", "\n", "x = .3\n", - "estimate = x + x**3/6 + x**5/120\n", + "estimate = x - x**3/6 + x**5/120\n", "exact = np.sin(.3)\n", "\n", "print('estimate of sin(.3) is', estimate)\n", @@ -120,7 +120,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.1" + "version": "3.7.6" } }, "nbformat": 4,