Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168733
Image: ubuntu2004

EJEMPLOS


RESOLUCIÓN DE ECUACIONES LINEALES

2%3
2
x, y = var('x, y') solve([x + y == 5, x - y == 4], x, y)
[[x == (9/2), y == (1/2)]]
x, y, z, t = var('x, y, z, t') solve([x + y + 4*z == 11, 2*x + 3*z - t == 11, 4*x + 2*y + 6*z - 2*t == 1, x -y + 5*z -2*t == 0], x, y, z, t)
[[x == (217/22), y == (-21/2), z == (32/11), t == (192/11)]]
M1 = Matrix([[1.0, 1.0, 4.0, 0.0],[2, 0, 0, -1], [0, 2, 6, -2], [1, -1, 5, -2]]) v1 = vector([1, 11, 1, 0]) X2 = M1.solve_right(v1) X2
(4.29310344827586, 2.22413793103448, -1.37931034482759, -2.41379310344828)
a = var('a') S = solve(x^2 + 2*x == 3+a,x); S
[x == -sqrt(a + 4) - 1, x == sqrt(a + 4) - 1]
#más numeros grandes factorial(100)
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
#digitos de pi N(pi, digits=150)
3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940813
FACTORIZACIÓN DE POLINOMIOS
R.<x,y> = QQ[] F = factor(x^99 + y^99) F
(x + y) * (x^2 - x*y + y^2) * (x^6 - x^3*y^3 + y^6) * (x^10 - x^9*y + x^8*y^2 - x^7*y^3 + x^6*y^4 - x^5*y^5 + x^4*y^6 - x^3*y^7 + x^2*y^8 - x*y^9 + y^10) * (x^20 + x^19*y - x^17*y^3 - x^16*y^4 + x^14*y^6 + x^13*y^7 - x^11*y^9 - x^10*y^10 - x^9*y^11 + x^7*y^13 + x^6*y^14 - x^4*y^16 - x^3*y^17 + x*y^19 + y^20) * (x^60 + x^57*y^3 - x^51*y^9 - x^48*y^12 + x^42*y^18 + x^39*y^21 - x^33*y^27 - x^30*y^30 - x^27*y^33 + x^21*y^39 + x^18*y^42 - x^12*y^48 - x^9*y^51 + x^3*y^57 + y^60)
F.expand()
x^99 + y^99
EXPRESIONES SIMBÓLICAS
x = var('x') f = sin(3*x)*x+log(x) + 1/(x+1)^2 show(f)
\newcommand{\Bold}[1]{\mathbf{#1}}x \sin\left(3 \, x\right) + \frac{1}{{\left(x + 1\right)}^{2}} + \log\left(x\right)
plot(f,(0.01,2))
GRÁFICOS
x=var('x') parametric_plot((x,1/x),(0.1,10))
#gráficos y programación lista = [] for k in range(-10, 10): f = sin(k*x**2 - k*x) lista.append(f) plot(lista)
t=var('t') parametric_plot((t*cos(t),t*sin(t)),0,16*pi)
/sagenb/sage_install/sage-5.0-boxen-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/decorators.py:534: DeprecationWarning: variable ranges to parametric_plot must be given as tuples, like (2,4) or (t,2,3) return func(*args, **options)
#graficos 3D r=var('r') parametric_plot3d([r,cos(r),sin(r)],(r,0,16*pi))
u,v=var('u,v') fx=(3+sin(v)+cos(u))*cos(2*v) fy=(3+sin(v)+cos(u))*sin(2*v) fz=sin(u)+2*cos(v) parametric_plot3d([fx,fy,fz],(u,0,4*pi),(v,0,4*pi),color="red")
#Poliedros sphere((0,0,0)) + sphere((0,1,0),color='red', opacity=0.5) + icosahedron((1,1,0), color='orange')