Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Jupyter notebook 2016-04-14-100709.ipynb

Project: My First
Views: 100
Kernel: Python 2 (SageMath)
print 2;
2
print 1+1;
2
2
2
1+1
2
def f(x): sin(x)**2 + 1; return
from math import sin;
maximize(f);
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-19-b71dd3df78ff> in <module>() ----> 1 maximize(f); NameError: name 'maximize' is not defined
del f;
f(x) = 1 - sin(x)^2
File "<ipython-input-23-cd433e38adab>", line 1 f(x) = 1 - sin(x)^2 SyntaxError: can't assign to function call
f = function(x);
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-24-e19911738c5b> in <module>() ----> 1 f = function(x); NameError: name 'function' is not defined
import calculus
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-25-91c65807c23d> in <module>() ----> 1 import calculus ImportError: No module named calculus
del f
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-26-34928ba69c5e> in <module>() ----> 1 del f NameError: name 'f' is not defined
f = 1 + sin(x)^2
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-27-61655278761c> in <module>() ----> 1 f = 1 + sin(x)^2 NameError: name 'x' is not defined
var('x')
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-28-adc764569ee0> in <module>() ----> 1 var('x') NameError: name 'var' is not defined
import numpy
var('x')
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-30-adc764569ee0> in <module>() ----> 1 var('x') NameError: name 'var' is not defined
import sage/calculus
File "<ipython-input-31-ce9c895ab30a>", line 1 import sage/calculus ^ SyntaxError: invalid syntax
import calculus
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-32-91c65807c23d> in <module>() ----> 1 import calculus ImportError: No module named calculus
import sage.calculus
Setting permissions of DOT_SAGE directory so only you can read and write it.
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-33-6588b53cc896> in <module>() ----> 1 import sage.calculus /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/__init__.py in <module>() ----> 1 import all /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/all.py in <module>() ----> 1 from calculus import maxima as maxima_calculus 2 from calculus import (laplace, inverse_laplace, 3 limit, lim) 4 5 from functional import (diff, derivative, /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/calculus.py in <module>() 398 399 import re --> 400 from sage.rings.all import RR, Integer, CC, QQ, RealDoubleElement, algdep 401 from sage.rings.real_mpfr import create_RealNumber 402 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/all.py in <module>() 33 34 # Ideals ---> 35 from ideal import Ideal 36 ideal = Ideal 37 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/ideal.py in <module>() 34 import commutative_ring 35 from sage.structure.element import MonoidElement ---> 36 from sage.interfaces.singular import singular as singular_default 37 import sage.rings.infinity 38 from sage.structure.sequence import Sequence /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/interfaces/singular.py in <module>() 330 from sage.structure.element import RingElement 331 --> 332 import sage.rings.integer 333 334 from sage.misc.misc import get_verbose /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/rational.pxd in init sage.rings.integer (/projects/sage/sage-6.10/src/build/cythonized/sage/rings/integer.c:46715)() 6 cpdef rational_power_parts(a, b, factor_limit=?) 7 ----> 8 cdef class Rational(sage.structure.element.FieldElement): 9 cdef mpq_t value 10 sage/rings/rational.pyx in init sage.rings.rational (/projects/sage/sage-6.10/src/build/cythonized/sage/rings/rational.c:34765)() /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/rational_field.py in <module>() 53 import rational 54 import integer ---> 55 import infinity 56 ZZ = None 57 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/infinity.py in <module>() 214 import sage.rings.rational 215 --> 216 from sage.rings.integer_ring import ZZ 217 218 _obj = {} sage/rings/integer_ring.pyx in init sage.rings.integer_ring (/projects/sage/sage-6.10/src/build/cythonized/sage/rings/integer_ring.c:14184)() /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/structure/factorization.py in <module>() 187 from sage.structure.sequence import Sequence 188 from sage.rings.integer import Integer --> 189 from sage.misc.all import prod 190 from sage.misc.cachefunc import cached_method 191 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/misc/all.py in <module>() 86 from func_persist import func_persist 87 ---> 88 from functional import (additive_order, 89 base_ring, 90 base_field, /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/misc/functional.py in <module>() 28 29 ---> 30 from sage.rings.complex_double import CDF 31 from sage.rings.real_double import RDF, RealDoubleElement 32 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/real_double.pxd in init sage.rings.complex_double (/projects/sage/sage-6.10/src/build/cythonized/sage/rings/complex_double.c:22676)() 6 double NAN 7 ----> 8 cdef class RealDoubleField_class(Field): 9 cdef _new_c(self, double value) 10 sage/rings/real_double.pyx in init sage.rings.real_double (/projects/sage/sage-6.10/src/build/cythonized/sage/rings/real_double.c:25086)() ImportError: cannot import name ZZ
var('x')
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-34-adc764569ee0> in <module>() ----> 1 var('x') NameError: name 'var' is not defined
sage.calculus.var.clear_vars()
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-36-4809e9b8ff43> in <module>() ----> 1 sage.calculus.var.clear_vars() NameError: name 'sage' is not defined
expand((x+2)^2)
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-39-b8e962907c80> in <module>() ----> 1 expand((x+2)^2) NameError: name 'expand' is not defined
import sage.symbolic
from sage.symbolic import *
from sage.calculus import *
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-41-e4f9b6c5f1cd> in <module>() ----> 1 from sage.calculus import * /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/__init__.py in <module>() ----> 1 import all /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/all.py in <module>() ----> 1 from calculus import maxima as maxima_calculus 2 from calculus import (laplace, inverse_laplace, 3 limit, lim) 4 5 from functional import (diff, derivative, /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/calculus.py in <module>() 398 399 import re --> 400 from sage.rings.all import RR, Integer, CC, QQ, RealDoubleElement, algdep 401 from sage.rings.real_mpfr import create_RealNumber 402 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/all.py in <module>() 33 34 # Ideals ---> 35 from ideal import Ideal 36 ideal = Ideal 37 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/ideal.py in <module>() 35 from sage.structure.element import MonoidElement 36 from sage.interfaces.singular import singular as singular_default ---> 37 import sage.rings.infinity 38 from sage.structure.sequence import Sequence 39 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/infinity.py in <module>() 214 import sage.rings.rational 215 --> 216 from sage.rings.integer_ring import ZZ 217 218 _obj = {} ImportError: cannot import name ZZ
i
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-42-372e25f23b5a> in <module>() ----> 1 i NameError: name 'i' is not defined
e
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-43-9ffbf43126e3> in <module>() ----> 1 e NameError: name 'e' is not defined
E
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-44-787c9a8e2148> in <module>() ----> 1 E NameError: name 'E' is not defined
var('x')
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-45-adc764569ee0> in <module>() ----> 1 var('x') NameError: name 'var' is not defined
sage.calculus.calculus
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-48-937cdb0c1b42> in <module>() ----> 1 sage.calculus.calculus AttributeError: 'module' object has no attribute 'calculus'

x^2

type(x)
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-49-c6ec0f91e335> in <module>() ----> 1 type(x) NameError: name 'x' is not defined
import sage.calculus.var
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-50-652ff6475421> in <module>() ----> 1 import sage.calculus.var /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/__init__.py in <module>() ----> 1 import all /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/all.py in <module>() ----> 1 from calculus import maxima as maxima_calculus 2 from calculus import (laplace, inverse_laplace, 3 limit, lim) 4 5 from functional import (diff, derivative, /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/calculus.py in <module>() 398 399 import re --> 400 from sage.rings.all import RR, Integer, CC, QQ, RealDoubleElement, algdep 401 from sage.rings.real_mpfr import create_RealNumber 402 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/all.py in <module>() 33 34 # Ideals ---> 35 from ideal import Ideal 36 ideal = Ideal 37 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/ideal.py in <module>() 35 from sage.structure.element import MonoidElement 36 from sage.interfaces.singular import singular as singular_default ---> 37 import sage.rings.infinity 38 from sage.structure.sequence import Sequence 39 /projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/rings/infinity.py in <module>() 214 import sage.rings.rational 215 --> 216 from sage.rings.integer_ring import ZZ 217 218 _obj = {} ImportError: cannot import name ZZ
I
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-51-32f8e0bb6944> in <module>() ----> 1 I NameError: name 'I' is not defined
var('x')
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-52-adc764569ee0> in <module>() ----> 1 var('x') NameError: name 'var' is not defined
clear_vars()
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-53-6d68973cd1bc> in <module>() ----> 1 clear_vars() NameError: name 'clear_vars' is not defined
%var x
f = x^2
diff(f)
f
diff(f(x),x)
import symbolic
import symbolic.symbolic
import symbolic.symbolic.symbolic
import symbolic.symbolic.symbolic.symbolic
clear_vars()