passagemath-repl 10.5.28__py3-none-any.whl → 10.5.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- passagemath_repl-10.5.30.data/data/share/jupyter/kernels/sagemath/kernel.json +1 -0
- passagemath_repl-10.5.30.data/data/share/jupyter/kernels/sagemath/logo-64x64.png +0 -0
- passagemath_repl-10.5.30.data/data/share/jupyter/kernels/sagemath/logo.svg +352 -0
- {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/METADATA +3 -3
- {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/RECORD +95 -24
- {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/top_level.txt +1 -0
- sage/ext_data/all__sagemath_repl.py +1 -0
- sage/interfaces/all__sagemath_repl.py +1 -0
- sage/repl/ipython_kernel/install.py +6 -8
- sage/tests/books/__init__.py +2 -0
- sage/tests/books/computational-mathematics-with-sagemath/__init__.py +1 -0
- sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py +550 -0
- sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py +1054 -0
- sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py +444 -0
- sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py +478 -0
- sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py +255 -0
- sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py +419 -0
- sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py +291 -0
- sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py +455 -0
- sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py +422 -0
- sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py +235 -0
- sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py +561 -0
- sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py +491 -0
- sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py +156 -0
- sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py +406 -0
- sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py +181 -0
- sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py +663 -0
- sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py +393 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/__init__.py +1 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/calculus_doctest.py +265 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py +218 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py +60 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py +142 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py +106 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py +54 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py +57 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py +57 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py +26 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py +48 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py +116 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py +112 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py +168 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py +108 -0
- sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py +59 -0
- sage/tests/books/judson-abstract-algebra/__init__.py +1 -0
- sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py +52 -0
- sage/tests/books/judson-abstract-algebra/actions-sage.py +174 -0
- sage/tests/books/judson-abstract-algebra/algcodes-sage.py +131 -0
- sage/tests/books/judson-abstract-algebra/boolean-sage.py +270 -0
- sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py +88 -0
- sage/tests/books/judson-abstract-algebra/cosets-sage.py +171 -0
- sage/tests/books/judson-abstract-algebra/crypt-sage.py +152 -0
- sage/tests/books/judson-abstract-algebra/cyclic-sage.py +451 -0
- sage/tests/books/judson-abstract-algebra/domains-sage.py +164 -0
- sage/tests/books/judson-abstract-algebra/fields-sage.py +300 -0
- sage/tests/books/judson-abstract-algebra/finite-sage.py +109 -0
- sage/tests/books/judson-abstract-algebra/galois-sage.py +485 -0
- sage/tests/books/judson-abstract-algebra/groups-sage.py +281 -0
- sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py +66 -0
- sage/tests/books/judson-abstract-algebra/homomorph-sage.py +201 -0
- sage/tests/books/judson-abstract-algebra/integers-sage.py +198 -0
- sage/tests/books/judson-abstract-algebra/isomorph-sage.py +173 -0
- sage/tests/books/judson-abstract-algebra/normal-sage.py +134 -0
- sage/tests/books/judson-abstract-algebra/permute-sage.py +320 -0
- sage/tests/books/judson-abstract-algebra/poly-sage.py +301 -0
- sage/tests/books/judson-abstract-algebra/rings-sage.py +414 -0
- sage/tests/books/judson-abstract-algebra/sets-sage.py +164 -0
- sage/tests/books/judson-abstract-algebra/struct-sage.py +64 -0
- sage/tests/books/judson-abstract-algebra/sylow-sage.py +251 -0
- sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py +49 -0
- sage/tests/books/judson-abstract-algebra/vect-sage.py +212 -0
- sage/tests/memcheck/__init__.py +1 -0
- sage/tests/memcheck/run_tests.py +25 -0
- sage/tests/memcheck/run_tests_in_valgrind.py +36 -0
- sage/tests/memcheck/symbolic_expression.py +12 -0
- sage/tests/memcheck/verify_no_leak.py +28 -0
- sage/tests/all.py +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-cachegrind +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-callgrind +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-cleaner +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-coverage +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-eval +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-fixdoctests +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-inline-fortran +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-ipynb2rst +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-ipython +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-massif +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-notebook +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-omega +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-preparse +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-run +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-run-cython +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-runtests +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-startuptime.py +0 -0
- {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-valgrind +0 -0
- {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/WHEEL +0 -0
@@ -0,0 +1,291 @@
|
|
1
|
+
# sage_setup: distribution = sagemath-repl
|
2
|
+
# sage.doctest: needs sage.symbolic
|
3
|
+
"""
|
4
|
+
This file (./integration_doctest.sage) was *autogenerated* from ./integration.tex,
|
5
|
+
with sagetex.sty version 2011/05/27 v2.3.1.
|
6
|
+
It contains the contents of all the sageexample environments from this file.
|
7
|
+
You should be able to doctest this file with:
|
8
|
+
sage -t ./integration_doctest.sage
|
9
|
+
It is always safe to delete this file; it is not used in typesetting your
|
10
|
+
document.
|
11
|
+
|
12
|
+
Sage example in ./integration.tex, line 73::
|
13
|
+
|
14
|
+
sage: x = var('x'); f(x) = exp(-x^2) * log(x)
|
15
|
+
sage: result = integrate(f, x, 1, 3)
|
16
|
+
...
|
17
|
+
sage: N(result) # abs tol 1e-14
|
18
|
+
0.03586029499126769
|
19
|
+
|
20
|
+
Sage example in ./integration.tex, line 78::
|
21
|
+
|
22
|
+
sage: plot(f, 1, 3, fill='axis')
|
23
|
+
Graphics object consisting of 2 graphics primitives
|
24
|
+
|
25
|
+
Sage example in ./integration.tex, line 104::
|
26
|
+
|
27
|
+
sage: N(integrate(sin(x^2)/(x^2), x, 1, infinity)) # abs tol 2e-15
|
28
|
+
0.285736646322853 - 6.93889390390723e-18*I
|
29
|
+
|
30
|
+
Sage example in ./integration.tex, line 108::
|
31
|
+
|
32
|
+
sage: plot(sin(x^2)/(x^2), x, 1, 10, fill='axis')
|
33
|
+
Graphics object consisting of 2 graphics primitives
|
34
|
+
|
35
|
+
Sage example in ./integration.tex, line 162::
|
36
|
+
|
37
|
+
sage: fp = plot(f, 1, 3, color='red')
|
38
|
+
sage: n = 4
|
39
|
+
sage: interp_points = [(1+2*u/(n-1), N(f(1+2*u/(n-1))))
|
40
|
+
....: for u in range(n)]
|
41
|
+
sage: A = PolynomialRing(RR, 'x')
|
42
|
+
sage: pp = plot(A.lagrange_polynomial(interp_points), 1, 3, fill='axis')
|
43
|
+
sage: fp+pp
|
44
|
+
Graphics object consisting of 3 graphics primitives
|
45
|
+
|
46
|
+
Sage example in ./integration.tex, line 522::
|
47
|
+
|
48
|
+
sage: N(integrate(cos(log(cos(x))), x, 0, pi/4)) # rel tol 2e-12
|
49
|
+
0.7766520331543109
|
50
|
+
|
51
|
+
Sage example in ./integration.tex, line 536::
|
52
|
+
|
53
|
+
sage: integrate(log(1+x)*x, x, 0, 1)
|
54
|
+
1/4
|
55
|
+
sage: N(integrate(log(1+x)*x, x, 0, 1))
|
56
|
+
0.250000000000000
|
57
|
+
|
58
|
+
Sage example in ./integration.tex, line 562::
|
59
|
+
|
60
|
+
sage: numerical_integral(cos(log(cos(x))), 0, pi/4) # rel tol 2e-11
|
61
|
+
(0.7766520331543109, 8.622569693298564e-15)
|
62
|
+
|
63
|
+
Sage example in ./integration.tex, line 600::
|
64
|
+
|
65
|
+
sage: numerical_integral(exp(-x^100), 0, 1.1)
|
66
|
+
(0.99432585119150..., 4.0775730...e-09)
|
67
|
+
sage: numerical_integral(exp(-x^100), 0, 1.1, algorithm='qng') # abs tol 2e-12
|
68
|
+
(0.9943275385765319, 0.016840666914705607)
|
69
|
+
|
70
|
+
Sage example in ./integration.tex, line 612::
|
71
|
+
|
72
|
+
sage: integrate(cos(log(cos(x))), x, 0, pi/4)
|
73
|
+
integrate(cos(log(cos(x))), x, 0, 1/4*pi)
|
74
|
+
|
75
|
+
Sage example in ./integration.tex, line 622::
|
76
|
+
|
77
|
+
sage: N(integrate(cos(log(cos(x))), x, 0, pi/4), digits=60) # abs tol 2e-12
|
78
|
+
0.7766520331543109
|
79
|
+
|
80
|
+
Sage example in ./integration.tex, line 628::
|
81
|
+
|
82
|
+
sage: N(integrate(sin(x)*exp(cos(x)), x, 0, pi), digits=60)
|
83
|
+
2.35040238728760291376476370119120163031143596266819174045913
|
84
|
+
|
85
|
+
Sage example in ./integration.tex, line 644::
|
86
|
+
|
87
|
+
sage: sage.calculus.calculus.nintegral(sin(sin(x)), x, 0, 1)
|
88
|
+
(0.430606103120690..., 4.78068810228705...e-15, 21, 0)
|
89
|
+
|
90
|
+
Sage example in ./integration.tex, line 654::
|
91
|
+
|
92
|
+
sage: g = sin(sin(x))
|
93
|
+
sage: g.nintegral(x, 0, 1)
|
94
|
+
(0.430606103120690..., 4.78068810228705...e-15, 21, 0)
|
95
|
+
|
96
|
+
Ensure consistent results on 32-bit and 64-bit systems by using the same
|
97
|
+
precision::
|
98
|
+
|
99
|
+
sage: _ = gp.default('realprecision', 38)
|
100
|
+
|
101
|
+
Sage example in ./integration.tex, line 703::
|
102
|
+
|
103
|
+
sage: gp('intnum(x=17, 20, exp(-x^2)*log(x))')
|
104
|
+
2.5657285005610514829173563961304785900 E-127
|
105
|
+
|
106
|
+
Sage example in ./integration.tex, line 717::
|
107
|
+
|
108
|
+
sage: gp('intnum(x=0, 1, sin(sin(x)))')
|
109
|
+
0.43060610312069060491237735524846578643
|
110
|
+
sage: old_prec = gp.set_precision(50)
|
111
|
+
sage: gp('intnum(x=0, 1, sin(sin(x)))')
|
112
|
+
0.43060610312069060491237735524846578643360804182200
|
113
|
+
|
114
|
+
Sage example in ./integration.tex, line 746::
|
115
|
+
|
116
|
+
sage: p = gp.set_precision(old_prec) # we reset the default precision
|
117
|
+
sage: gp('intnum(x=0, 1, x^(-99/100))') # rel tol 1e-9
|
118
|
+
73.629142577870966597465391764897770039
|
119
|
+
|
120
|
+
Sage example in ./integration.tex, line 754::
|
121
|
+
|
122
|
+
sage: gp('intnum(x=[0, -99/100], 1, x^(-99/100))')
|
123
|
+
100.00000000000000000000000000000000000
|
124
|
+
|
125
|
+
Sage example in ./integration.tex, line 766::
|
126
|
+
|
127
|
+
sage: gp('intnum(x=[0, -1/42], 1, x^(-99/100))') # rel tol 1e-9
|
128
|
+
74.472749314025559405335761513474670714
|
129
|
+
|
130
|
+
Sage example in ./integration.tex, line 785::
|
131
|
+
|
132
|
+
sage: import mpmath
|
133
|
+
sage: mpmath.mp.prec = 53
|
134
|
+
sage: mpmath.quad(lambda x: mpmath.sin(mpmath.sin(x)), [0, 1])
|
135
|
+
mpf('0.43060610312069059')
|
136
|
+
|
137
|
+
Sage example in ./integration.tex, line 795::
|
138
|
+
|
139
|
+
sage: a = RDF(pi); b = mpmath.mpf(a); b
|
140
|
+
mpf('3.1415926535897931')
|
141
|
+
sage: c = RDF(b); c
|
142
|
+
3.141592653589793
|
143
|
+
|
144
|
+
Sage example in ./integration.tex, line 824::
|
145
|
+
|
146
|
+
sage: mpmath.mp.prec = 113
|
147
|
+
sage: mpmath.quad(lambda x: mpmath.sin(mpmath.sin(x)), [0, 1])
|
148
|
+
mpf('0.430606103120690604912377355248465809')
|
149
|
+
|
150
|
+
Sage example in ./integration.tex, line 846::
|
151
|
+
|
152
|
+
sage: f(x) = sin(sin(x))
|
153
|
+
sage: mpmath.quad(f, [0, 1])
|
154
|
+
Traceback (most recent call last):
|
155
|
+
...
|
156
|
+
TypeError: no canonical coercion from <class '...mpf'> to ...
|
157
|
+
|
158
|
+
Sage example in ./integration.tex, line 866::
|
159
|
+
|
160
|
+
sage: g(x) = max_symbolic(sin(x), cos(x))
|
161
|
+
sage: mpmath.mp.prec = 100
|
162
|
+
sage: mpmath.quadts(lambda x: g(N(x, 100)), [0, 1])
|
163
|
+
mpf('0.873912416263035435957979086252')
|
164
|
+
|
165
|
+
Sage example in ./integration.tex, line 878::
|
166
|
+
|
167
|
+
sage: mpmath.mp.prec = 170
|
168
|
+
sage: mpmath.quadts(lambda x: g(N(x, 190)), [0, 1])
|
169
|
+
mpf('0.87391090757400975205393005981962476344054148354188794')
|
170
|
+
sage: N(sqrt(2) - cos(1), 100)
|
171
|
+
0.87391125650495533140075211677
|
172
|
+
|
173
|
+
Sage example in ./integration.tex, line 892::
|
174
|
+
|
175
|
+
sage: mpmath.quadts(lambda x: g(N(x, 170)), [0, mpmath.pi / 4, 1])
|
176
|
+
mpf('0.87391125650495533140075211676672147483736145475902551')
|
177
|
+
|
178
|
+
Sage example in ./integration.tex, line 979::
|
179
|
+
|
180
|
+
sage: y = var('y'); integrate(exp(y*sin(x)), (x, 0, sqrt(y))) # long time
|
181
|
+
integrate(e^(y*sin(x)), x, 0, sqrt(y))
|
182
|
+
|
183
|
+
Sage example in ./integration.tex, line 990::
|
184
|
+
|
185
|
+
sage: f = lambda y: numerical_integral(lambda x: exp(y*sin(x)), \
|
186
|
+
....: 0, sqrt(y))[0]
|
187
|
+
sage: f(0.0), f(0.5), f(1.0) # abs tol 2e-15
|
188
|
+
(0.0, 0.8414895067661431, 1.6318696084180513)
|
189
|
+
|
190
|
+
Sage example in ./integration.tex, line 998::
|
191
|
+
|
192
|
+
sage: numerical_integral(f, 0, 1) # abs tol 2e-16
|
193
|
+
(0.8606791942204567, 6.301207560882073e-07)
|
194
|
+
|
195
|
+
Sage example in ./integration.tex, line 1008::
|
196
|
+
|
197
|
+
sage: f = lambda y: sage.calculus.calculus.nintegral(exp(y*sin(x)), \
|
198
|
+
....: x, 0, sqrt(y))[0]
|
199
|
+
sage: numerical_integral(f, 0, 1) # abs tol 2e-16
|
200
|
+
(0.8606791942204567, 6.301207560882096e-07)
|
201
|
+
|
202
|
+
Sage example in ./integration.tex, line 1016::
|
203
|
+
|
204
|
+
sage: f = lambda y: RDF(mpmath.quad(lambda x: mpmath.exp(y*mpmath.sin(x)), \
|
205
|
+
....: [0, sqrt(y)]))
|
206
|
+
sage: numerical_integral(f, 0, 1) # abs tol 2e-16
|
207
|
+
(0.8606791942204567, 6.301207561187562e-07)
|
208
|
+
|
209
|
+
Sage example in ./integration.tex, line 1027::
|
210
|
+
|
211
|
+
sage: mpmath.mp.dps = 60
|
212
|
+
sage: f = lambda x, y: mpmath.exp(y*mpmath.sin(x))
|
213
|
+
sage: mpmath.quad(f, [0,1], [0,1])
|
214
|
+
mpf('1.28392205755238471754385917646324675741664250325189751108716305')
|
215
|
+
|
216
|
+
Sage example in ./integration.tex, line 1044::
|
217
|
+
|
218
|
+
sage: def evalI(n):
|
219
|
+
....: f = lambda y: numerical_integral(lambda x: exp(y*sin(x)),
|
220
|
+
....: 0, sqrt(y), algorithm='qng', max_points=n)[0]
|
221
|
+
....: return numerical_integral(f, 0, 1, algorithm='qng', max_points=n)
|
222
|
+
sage: evalI(100) # abs tol 2e-12
|
223
|
+
(0.8606792028826138, 5.553962923506737e-07)
|
224
|
+
|
225
|
+
Sage example in ./integration.tex, line 1228::
|
226
|
+
|
227
|
+
sage: T = ode_solver()
|
228
|
+
|
229
|
+
Sage example in ./integration.tex, line 1244::
|
230
|
+
|
231
|
+
sage: def f_1(t, y, params): return [y[1],params[0]*(1-y[0]^2)*y[1]-y[0]]
|
232
|
+
sage: T.function = f_1
|
233
|
+
|
234
|
+
Sage example in ./integration.tex, line 1266::
|
235
|
+
|
236
|
+
sage: def j_1(t, y, params):
|
237
|
+
....: return [[0, 1],
|
238
|
+
....: [-2*params[0]*y[0]*y[1]-1, params[0]*(1-y[0]^2)],
|
239
|
+
....: [0,0]]
|
240
|
+
sage: T.jacobian = j_1
|
241
|
+
|
242
|
+
Sage example in ./integration.tex, line 1279::
|
243
|
+
|
244
|
+
sage: T.algorithm = "rk8pd"
|
245
|
+
sage: T.ode_solve(y_0=[1,0], t_span=[0,100], params=[10],
|
246
|
+
....: num_points=1000)
|
247
|
+
sage: f = T.interpolate_solution()
|
248
|
+
|
249
|
+
Sage example in ./integration.tex, line 1302::
|
250
|
+
|
251
|
+
sage: plot(f, 0, 100)
|
252
|
+
Graphics object consisting of 1 graphics primitive
|
253
|
+
|
254
|
+
Sage example in ./integration.tex, line 1363::
|
255
|
+
|
256
|
+
sage: t, y = var('t, y')
|
257
|
+
sage: desolve_rk4(t*y*(2-y), y, ics=[0,1], end_points=[0, 1], step=0.5) # abs tol 1e-12
|
258
|
+
[[0, 1], [0.5, 1.12419127424558], [1.0, 1.461590162288825]]
|
259
|
+
|
260
|
+
Sage example in ./integration.tex, line 1399::
|
261
|
+
|
262
|
+
sage: import mpmath
|
263
|
+
sage: mpmath.mp.prec = 53
|
264
|
+
sage: sol = mpmath.odefun(lambda t, y: y, 0, 1)
|
265
|
+
sage: sol(1)
|
266
|
+
mpf('2.7182818284590451')
|
267
|
+
sage: mpmath.mp.prec = 100
|
268
|
+
sage: sol(1)
|
269
|
+
mpf('2.7182818284590452353602874802307')
|
270
|
+
sage: N(exp(1), 100)
|
271
|
+
2.7182818284590452353602874714
|
272
|
+
|
273
|
+
Sage example in ./integration.tex, line 1436::
|
274
|
+
|
275
|
+
sage: mpmath.mp.prec = 53
|
276
|
+
sage: f = mpmath.odefun(lambda t, y: [-y[1], y[0]], 0, [1, 0])
|
277
|
+
sage: f(3)
|
278
|
+
[mpf('-0.98999249660044542'), mpf('0.14112000805986721')]
|
279
|
+
sage: (cos(3.), sin(3.))
|
280
|
+
(-0.989992496600445, 0.141120008059867)
|
281
|
+
|
282
|
+
Sage example in ./integration.tex, line 1497::
|
283
|
+
|
284
|
+
sage: mpmath.mp.prec = 10
|
285
|
+
sage: sol = mpmath.odefun(lambda t, y: y, 0, 1)
|
286
|
+
sage: sol(1)
|
287
|
+
mpf('2.7148')
|
288
|
+
sage: mpmath.mp.prec = 100
|
289
|
+
sage: sol(1)
|
290
|
+
mpf('2.7135204235459511323824699502438')
|
291
|
+
"""
|