komya

70 days ago by komakale

sin(y) 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'y' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_2.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("c2luKHkp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpLisdQD/___code___.py", line 2, in <module>
    exec compile(u'sin(y)
  File "", line 1, in <module>
    
NameError: name 'y' is not defined
var('y') 
       
y
y
sin(y) 
       
sin(y)
sin(y)
var('x,alpha,y,beta') x^2/alpha^2+y^2/beta^2 
       
x^2/alpha^2 + y^2/beta^2
x^2/alpha^2 + y^2/beta^2
var('theta') sin(theta)*sin(theta)+cos(theta)*cos(theta) 
       
cos(theta)^2 + sin(theta)^2
cos(theta)^2 + sin(theta)^2
n(pi) n(e) n(oo) 
       
+infinity
+infinity
n(pi,digits=20) 
       
3.1415926535897932385
3.1415926535897932385
sin(pi/2) 
       
1
1
arctan(00) 
       
0
0
n(pi^2,digits=6) 
       
9.86961
9.86961
var('x') h(x)=x^2 g(x)=1 f=piecewise([[(0,1),h(x)],[(1,2),g(x)]],x) f 
       
Piecewise defined function with 2 parts, [[(0, 1), x |--> x^2], [(1,
2), x |--> 1]]
Piecewise defined function with 2 parts, [[(0, 1), x |--> x^2], [(1, 2), x |--> 1]]
phi=var('phi') find_root(cos(phi)==sin(phi),0,pi/2) 
       
0.7853981633974484
0.7853981633974484
var('x,y,z') a=matrix([[x,0,1],[y,1,0],[z,0,y]]) a 
       
[x 0 1]
[y 1 0]
[z 0 y]
[x 0 1]
[y 1 0]
[z 0 y]
a.inverse() 
       
[   1/x + z/(x^2*(y - z/x))                          0          
-1/(x*(y - z/x))]
[-y/x - y*z/(x^2*(y - z/x))                          1           
y/(x*(y - z/x))]
[          -z/(x*(y - z/x))                          0               
1/(y - z/x)]
[   1/x + z/(x^2*(y - z/x))                          0           -1/(x*(y - z/x))]
[-y/x - y*z/(x^2*(y - z/x))                          1            y/(x*(y - z/x))]
[          -z/(x*(y - z/x))                          0                1/(y - z/x)]
t=varG=Graph({0:[1,2,3],2:[4]}) G.show() 
       
t=var('t') p1=plot(e^(-t)*sin(2*t),(t,0,15show(p1) 
       
@interact def plot_damped(n=(1..10)): t= var('t') p1=plot(e^(-t/n)* sin(2*t), (t,0,20)) show(p1) 
       

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