CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: calcul-formel
Views: 35
License: GPL3
Image: ubuntu2204
matrix(2, 3, [1,pi,3, e,5,6])
[ 1 pi 3] [ e 5 6]
vector([pi, 2, 3, e])
(pi, 2, 3, e)
matrix(2, 2, [1,2, 3,4]).charpoly()
x^2 - 5*x - 2
import numpy numpy.array([[1,2,3], [4,5,6]], dtype=float)
array([[1., 2., 3.], [4., 5., 6.]])
[n+1 for n in range(10) if n%2==0] len([1, 2, 5, 6, 10]) show(cube(color=['red', 'blue', 'green'], frame_thickness=2, frame_color='brown', opacity=0.8), frame=False) from sage.plot.plot3d.shapes import Torus inner_radius = .3; outer_radius = 1 show(Torus(outer_radius, inner_radius, color='orange'), aspect_ratio=1, spin=3) text3d("Text in 3D", (1,1, 1), color="darkred", fontsize=20)
[1, 3, 5, 7, 9] 5
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
@interact def interactive_function(a = slider(0, 10, .05, default=4), b = (-3, 3, .1)): f(x) = b * x + sin(a * x) plot(f, (x, -5, 5)).show() Mod(5, 12)
Interact: please open in CoCalc
Mod(5, 12) prime_range(100) factor(2015)
5 [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] 78498 5 * 13 * 31
prime_pi(10^6) BinaryQF([1,2,3]) EllipticCurve([1,2,3,4,5])
78498 x^2 + 2*x*y + 3*y^2 Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
CC CDF R.<x,y,z> = QQ[x,y,z]
Complex Field with 53 bits of precision Complex Double Field
a=2*3+7^3
a;a==9;
349 False
b=a%13 A=13*(a//13)+b A==a
True
R.<x> = PolynomialRing(ZZ,'x') R P = 6*x^4 + 6*x^3 - 6*x^2 - 12*x - 12; P.factor()
Univariate Polynomial Ring in x over Integer Ring 2 * 3 * (x^2 - 2) * (x^2 + x + 1)
P2 = P.change_ring(QQ) P2.factor()
(6) * (x^2 - 2) * (x^2 + x + 1)
P3 = P.change_ring(QQbar) P3.factor()
(6) * (x - 1.414213562373095?) * (x + 0.500000000000000? - 0.866025403784439?*I) * (x + 0.500000000000000? + 0.866025403784439?*I) * (x + 1.414213562373095?)
bool(arctan(1+abs(x)) == pi/2 - arctan(1/(1+abs(x))))
False
bool(arctan(1/sqrt(2))+arctan(sqrt(2))==pi/2)
False
d=7^2; d; d==7^2
49 True
reset(); print('d')
d
33+ 22
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python3.11/site-packages/smc_sagews/sage_server.py", line 1245, in execute compile(block + '\n', File "<string>", line 1 Integer(33)+ ^ SyntaxError: invalid syntax
1+2+3+4+5+ \ 6+7
28
1+2+3+4+5+ 6+7
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python3.11/site-packages/smc_sagews/sage_server.py", line 1245, in execute compile(block + '\n', File "<string>", line 1 Integer(1)+Integer(2)+Integer(3)+Integer(4)+Integer(5)+ ^ SyntaxError: invalid syntax
10/2
5
10/3
10/3
20/30
2/3
sqrt(20)
2*sqrt(5)
A1
3
20/10; 10/20; sqrt(9); sqrt(20)
2 1/2 3 2*sqrt(5)
n(sqrt(20)); N(sqrt(20)); numerical_approx(sqrt(20))
4.47213595499958 4.47213595499958 4.47213595499958
N(sqrt(20),digits=6);n(sqrt(20),digits=6); numerical_approx(sqrt(20),prec=6)
4.47214 4.47214 4.5
sqrt(20).n(); sqrt(20).n(digits=6); sqrt(20).numerical_approx(); sqrt(20).numerical_approx(prec=6)
4.47213595499958 4.47214 4.47213595499958 4.5
10./20
0.500000000000000
d=7^2; d; d==7^2
49 True
reset(); d==7^2
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python3.11/site-packages/smc_sagews/sage_server.py", line 1244, in execute exec( File "", line 1, in <module> NameError: name 'd' is not defined
sqrt(9); sqrt(20)
3 2*sqrt(5)