| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168737Image: ubuntu2004
You can use Sage to teach Calculus
5
1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) + (I + 1)*sqrt(2)*erf((-1)^(1/4)*x))
Interact: please open in CoCalc
(a, b, c, X)
Finite Field Arithmetic
Finite Field in a of size 2^8
\Bold{F}_{2^{8}}
x^5 + 2*x^4 + 2*x^2 + x + 2
x^5 + 2*x^4 + 2*x^2 + x + 2
x^5 + 2*x^4 + 2*x^2 + x + 2
Dense Linear Algebra over the Rationals and Integers
The NTRUEncrypt Public Key Cryptosystem is based on the hard mathematical problem of finding very short vectors in lattices of very high dimension. Generate a ntru-like lattice of dimension (), with the coefficients chosen as random bits integers and parameter :Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
ImportError: No module named fplll.fplll
Error in lines 3-3
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "<string>", line 1
time a.echelonize()
^
SyntaxError: invalid syntax
Time: 2.100
Dense Linear Algebra over Finite Fields
Time: CPU 2.60 s, Wall: 3.13 s
CPU time: 1.50 s, Wall time: 1.54 s
Time: CPU 0.20 s, Wall: 0.21 s
Time: 0.700
Time: CPU 12.70 s, Wall: 13.25 s
Time: 14.510
Sparse Linear Algebra over Finite Fields
Time: CPU 0.11 s, Wall: 0.16 s
1635
Time: CPU 3.27 s, Wall: 3.72 s
True
Factoring
1099511627791 * 2037035976334486086268445688409378161051468393665936250636140449354381299763336706183397533
CPU time: 3.99 s, Wall time: 4.82 s
[1099511627791, 2037035976334486086268445688409378161051468393665936250636140449354381299763336706183397533]
CPU time: 0.18 s, Wall time: 1.40 s
[1237940039285380274899124357, 2475880078570760549798248507] 3.99
Elliptic Curves
y^2 + y = x^3 - x
[0, 0, 1, -1, 0]
[-2, -3, -2, -1, -5, -2, 0, 0]
Time: CPU 5.22 s, Wall: 6.00 s
2 14 14
[ -2, -3, -2, -1, -5, -2, 0, 0 ]
Time: 5.980
Elliptic Curve defined by y^2 = x^3 + 3004046*x + 7315639 over Finite Field of size 10000019
9997377
9997377
(6921336 : 2053572 : 1)
p-Adic Numbers
0.45693099999999731
Time: 0.750
'4*5 + 5^2 + 4*5^3 + 3*5^4 + 4*5^5 + 4*5^6 + 3*5^8 + 2*5^9 + 2*5^10 + 3*5^11 + O(5^21)'
0.76500000000000000000000000000000000000
Graph Theory
True
5
Univariate Polynomials over
<type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'>
CPU time: 1.39 s, Wall time: 1.42 s
9.1200000000000000000000000000000000000
Time: 14.260
CPU time: 8.19 s, Wall time: 8.51 s
Multivariate Polynomial Rings over Finite Fields
Time: CPU 1.09 s, Wall: 1.11 s
Time: 0.450
Time: CPU 0.12 s, Wall: 0.12 s
Time: 0.260
Sage/Singular 2.254657
MAGMA 0.38
Algebraic Cryptanalysis
SR(2,1,1,4)
Polynomial System with 104 Polynomials in 36 Variables
[{s001: 1, s103: 1, s101: 1, x103: 0, s000: 1, x101: 1, k003: 0, k100: 1, k001: 0, k200: 1, x200: 1, k202: 1, x202: 0, w102: 1, w100: 0, w201: 0, s002: 1, w203: 0, k101: 0, s102: 1, s100: 1, x102: 1, x100: 0, k002: 0, k000: 1, x201: 0, k201: 0, x203: 1, k203: 1, k103: 0, w103: 1, k102: 0, w101: 1, w200: 0, s003: 1, w202: 1}, {s001: 1, s103: 0, s101: 1, x103: 1, s000: 1, x101: 1, k003: 0, k100: 0, k001: 1, k200: 0, x200: 1, k202: 1, x202: 0, w102: 1, w100: 1, w201: 1, s002: 0, w203: 1, k101: 0, s102: 1, s100: 1, x102: 0, x100: 0, k002: 0, k000: 0, x201: 0, k201: 1, x203: 0, k203: 0, k103: 1, w103: 1, k102: 1, w101: 0, w200: 1, s003: 1, w202: 1}, {s001: 0, s103: 1, s101: 1, x103: 0, s000: 1, x101: 1, k003: 0, k100: 0, k001: 0, k200: 0, x200: 1, k202: 0, x202: 1, w102: 0, w100: 1, w201: 1, s002: 0, w203: 1, k101: 1, s102: 0, s100: 1, x102: 0, x100: 0, k002: 1, k000: 0, x201: 0, k201: 0, x203: 1, k203: 0, k103: 0, w103: 1, k102: 0, w101: 1, w200: 0, s003: 1, w202: 0}]
{k000: 1, k001: 0, k002: 0, k003: 0}
[w200 + k100 + x100 + x102 + x103, w201 + k101 + x100 + x101 + x103 + 1, w202 + k102 + x100 + x101 + x102 + 1, w203 + k103 + x101 + x102 + x103, x100*w100 + x103*w100 + x102*w101 + x101*w102 + x100*w103, x100*w100 + x101*w100 + x100*w101 + x103*w101 + x102*w102 + x101*w103, x101*w100 + x102*w100 + x100*w101 + x101*w101 + x100*w102 + x103*w102 + x102*w103, x102*w100 + x101*w101 + x100*w102 + x103*w103 + 1, x100*w100 + x101*w100 + x103*w100 + x101*w101 + x100*w102 + x102*w102 + x100*w103 + x100, x102*w100 + x100*w101 + x101*w101 + x103*w101 + x101*w102 + x100*w103 + x102*w103 + x101, x100*w100 + x101*w100 + x102*w100 + x102*w101 + x100*w102 + x101*w102 + x103*w102 + x101*w103 + x102, x101*w100 + x100*w101 + x102*w101 + x100*w102 + x101*w103 + x103*w103 + x103, x100*w100 + x102*w100 + x103*w100 + x100*w101 + x101*w101 + x102*w102 + x100*w103 + w100, x101*w100 + x103*w100 + x101*w101 + x102*w101 + x100*w102 + x103*w102 + x101*w103 + w101, x100*w100 + x102*w100 + x100*w101 + x102*w101 + x103*w101 + x100*w102 + x101*w102 + x102*w103 + w102, x101*w100 + x102*w100 + x100*w101 + x103*w101 + x101*w102 + x103*w103 + w103, x100^2 + x100, x101^2 + x101, x102^2 + x102, x103^2 + x103, w100^2 + w100, w101^2 + w101, w102^2 + w102, w103^2 + w103]