Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168737
Image: ubuntu2004
x^3+1/(x-1)^2-150/(1+(x+3)^4)
1/(x - 1)^2 - 150/((x + 3)^4 + 1) + x^3
plot([x^3+1/(x-1)^2-150/(1+(x+3)^4)],(x,-2,2)).show(ymin=-10,ymax=20)
plot(x^2*sin(x),x,-10,10)
plot([(1/x)*sin(20*x),1/x,-1/x],x,-1,1).show(ymin=-10, ymax=20)
fact(x)=gamma(x+1)
plot(fact(x),x,-10,10).show(ymin=-20, ymax=20)
plot(x^2,(x,-10,10))
p1=plot(x^2,(x,-10,10),color='green') p2=plot(fact(x),x,-10,10) show(p1+p2, ymin=-20, ymax=20)
find_root(fact(x)==x^2,0,2)
1.0
print(1.0.n(digits=11))
1.0000000000
find_root(fact(x)==x^2,3,4)
3.562382285391303
find_root(fact(x)==x^2,-2.2,-2.5)
-2.2003917826105948
fact(1/2)
1/2*sqrt(pi)

YES, I AM SURPRISED

fact(x)=gamma(x+1)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_4.py", line 4, in <module> exec compile(ur'open("___code___.py","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZmFjdCgtMS8yKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmphBxyUr/___code___.py", line 3, in <module> exec compile(ur'fact(-_sage_const_1 /_sage_const_2 )' + '\n', '', 'single') File "", line 1, in <module> NameError: name 'fact' is not defined

SURPRISED AGAIN

fact(-1/2)