File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 22 "cells" : [
33 {
44 "cell_type" : " code" ,
5- "execution_count" : 3 ,
5+ "execution_count" : 1 ,
66 "metadata" : {},
77 "outputs" : [
88 {
2525 " <IPython.core.display.HTML object>"
2626 ]
2727 },
28- "execution_count" : 3 ,
28+ "execution_count" : 1 ,
2929 "metadata" : {},
3030 "output_type" : " execute_result"
3131 }
6666 " \n " ,
6767 " Now we can substitute these values into the equation.\n " ,
6868 " \n " ,
69- " $$\\ 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 " ,
69+ " $$\\ 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 " ,
7070 " \n " ,
7171 " And let's test this with some code:"
7272 ]
7373 },
7474 {
7575 "cell_type" : " code" ,
76- "execution_count" : 4 ,
76+ "execution_count" : 2 ,
7777 "metadata" : {},
7878 "outputs" : [
7979 {
8080 "name" : " stdout" ,
8181 "output_type" : " stream" ,
8282 "text" : [
83- " estimate of sin(.3) is 0.30452025 \n " ,
83+ " estimate of sin(.3) is 0.29552025 \n " ,
8484 " exact value of sin(.3) is 0.29552020666133955\n "
8585 ]
8686 }
8989 " import numpy as np\n " ,
9090 " \n " ,
9191 " x = .3\n " ,
92- " estimate = x + x**3/6 + x**5/120\n " ,
92+ " estimate = x - x**3/6 + x**5/120\n " ,
9393 " exact = np.sin(.3)\n " ,
9494 " \n " ,
9595 " print('estimate of sin(.3) is', estimate)\n " ,
120120 "name" : " python" ,
121121 "nbconvert_exporter" : " python" ,
122122 "pygments_lexer" : " ipython3" ,
123- "version" : " 3.7.1 "
123+ "version" : " 3.7.6 "
124124 }
125125 },
126126 "nbformat" : 4 ,
You can’t perform that action at this time.
0 commit comments