File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 2
2
"cells" : [
3
3
{
4
4
"cell_type" : " code" ,
5
- "execution_count" : 3 ,
5
+ "execution_count" : 1 ,
6
6
"metadata" : {},
7
7
"outputs" : [
8
8
{
25
25
" <IPython.core.display.HTML object>"
26
26
]
27
27
},
28
- "execution_count" : 3 ,
28
+ "execution_count" : 1 ,
29
29
"metadata" : {},
30
30
"output_type" : " execute_result"
31
31
}
66
66
" \n " ,
67
67
" Now we can substitute these values into the equation.\n " ,
68
68
" \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 " ,
70
70
" \n " ,
71
71
" And let's test this with some code:"
72
72
]
73
73
},
74
74
{
75
75
"cell_type" : " code" ,
76
- "execution_count" : 4 ,
76
+ "execution_count" : 2 ,
77
77
"metadata" : {},
78
78
"outputs" : [
79
79
{
80
80
"name" : " stdout" ,
81
81
"output_type" : " stream" ,
82
82
"text" : [
83
- " estimate of sin(.3) is 0.30452025 \n " ,
83
+ " estimate of sin(.3) is 0.29552025 \n " ,
84
84
" exact value of sin(.3) is 0.29552020666133955\n "
85
85
]
86
86
}
89
89
" import numpy as np\n " ,
90
90
" \n " ,
91
91
" x = .3\n " ,
92
- " estimate = x + x**3/6 + x**5/120\n " ,
92
+ " estimate = x - x**3/6 + x**5/120\n " ,
93
93
" exact = np.sin(.3)\n " ,
94
94
" \n " ,
95
95
" print('estimate of sin(.3) is', estimate)\n " ,
120
120
"name" : " python" ,
121
121
"nbconvert_exporter" : " python" ,
122
122
"pygments_lexer" : " ipython3" ,
123
- "version" : " 3.7.1 "
123
+ "version" : " 3.7.6 "
124
124
}
125
125
},
126
126
"nbformat" : 4 ,
You can’t perform that action at this time.
0 commit comments