2+3

916 days ago by pub

2+3 
       
5
5

\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}=\prod_p \left(\frac{1}{1-p^{-s}}\right)

Matrix([[1,2,3],[3,2,1],[1,1,1]]); A 
       
[1 2 3]
[3 2 1]
[1 1 1]
Traceback (click to the left of this block for traceback)
...
NameError: name 'A' is not defined
[1 2 3]
[3 2 1]
[1 1 1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_2.py", line 5, in <module>
    Matrix([[_sage_const_1 ,_sage_const_2 ,_sage_const_3 ],[_sage_const_3 ,_sage_const_2 ,_sage_const_1 ],[_sage_const_1 ,_sage_const_1 ,_sage_const_1 ]]); A
  File "", line 1, in <module>
    
NameError: name 'A' is not defined
A = Matrix([[1,2,3],[3,2,1],[1,1,1]]) A 
       
[1 2 3]
[3 2 1]
[1 1 1]
[1 2 3]
[3 2 1]
[1 1 1]
Matrix([[1,2,3],[3,2,1],[1,1,1]]); A 
       
[1 2 3]
[3 2 1]
[1 1 1]
[1 2 3]
[3 2 1]
[1 1 1]
[1 2 3]
[3 2 1]
[1 1 1]
[1 2 3]
[3 2 1]
[1 1 1]
w = vector([1,1,-4]); w; w*A; A*w 
       
(1, 1, -4)
(0, 0, 0)
(-9, 1, -2)
(1, 1, -4)
(0, 0, 0)
(-9, 1, -2)
Y = vector([0,-4,-1]) X = A.solve_right(Y) A \ Y; X; A*X 
       
(-2, 1, 0)
(-2, 1, 0)
(0, -4, -1)
(-2, 1, 0)
(-2, 1, 0)
(0, -4, -1)
A.solve_right(w) 
       
Traceback (click to the left of this block for traceback)
...
ValueError: matrix equation has no solutions
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_8.py", line 4, in <module>
    A.solve_right(w)
  File "", line 1, in <module>
    
  File "matrix2.pyx", line 280, in sage.matrix.matrix2.Matrix.solve_right (sage/matrix/matrix2.c:3808)
  File "matrix2.pyx", line 400, in sage.matrix.matrix2.Matrix._solve_right_general (sage/matrix/matrix2.c:4609)
ValueError: matrix equation has no solutions
A.echelon_form();A.determinant();A.rank() 
       
[ 1  0 -1]
[ 0  1  2]
[ 0  0  0]
0
2
[ 1  0 -1]
[ 0  1  2]
[ 0  0  0]
0
2
echelon_form(A) 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'echelon_form' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_10.py", line 4, in <module>
    echelon_form(A)
  File "", line 1, in <module>
    
NameError: name 'echelon_form' is not defined
A.eigenspaces_left? 
       
A.eigenspaces_left() 
       
[
(5, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[1 1 1]),
(0, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[ 1  1 -4]),
(-1, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[   1 -1/5 -7/5])
]
[
(5, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[1 1 1]),
(0, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[ 1  1 -4]),
(-1, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[   1 -1/5 -7/5])
]
y = var('y') P=plot_slope_field(1-y,(x,0,3),(y,0,20)) y = function('y',x) # declare y to be a function of x f = desolve(diff(y,x) + y - 1, y, ics=[2,2]) # solve the DE, with Initial ConditionS of 2,2 Q=plot(f,0,3) html('$f=%s$'%(latex(f),)); show(P+Q) # I can use HTML in my outcomes 
       
f={(e^{2} + e^{x})} e^{-x}

f={(e^{2} + e^{x})} e^{-x}

f(x)=x^2; f(3) 
       
9
9
plot([x^i for i in [1..10]],(x,0,1),fill = dict((i,[i+1]) for i in [0..9])) 
       
import pylab A_image = pylab.mean(pylab.imread(DATA + 'WNECMath.png'), 2) @interact def svd_image(i=(20,(1..100)),display_axes=True): u,s,v = pylab.linalg.svd(A_image) A = sum(s[j]*pylab.outer(u[0:,j],v[j,0:]) for j in range(i)) g = graphics_array([matrix_plot(A),matrix_plot(A_image)]) show(g,axes=display_axes, figsize=(8,3)) html('<h2>Compressed using %s eigenvalues</h2>'%i) 
       

Click to the left again to hide and once more to show the dynamic interactive window

var('x,y') plot3d(sin(pi*(x^2+y^2))/2,(x,-1,1),(y,-5,5))