Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004
a=[1,2,3,4,5,6] b=[1,3,6,7] c=[] for i in a: if i not in b: c.append(i) print c
[2, 4, 5]
var('x') f=((3+x)^2-x^2)*(x-2)-6*(x^2-2)+2 f1=f.simplify_full() print f1 f2=(x+2)^3-(x+2)*(2*x-1)-(x-1)^3-2*x*(3*x-1)+1 f1=f2.simplify_full() print f1 f3=x^5+3*x^4-4*x^3-12*x^2 f1=f3.factor() print f1 var('a, b') g=2*a^3*b^3-50*a*b^3 f1=g.factor() print f1 f1=g.simplify_full() print f1
-3*x - 4 x^2 + 8*x + 12 (x - 2)*(x + 2)*(x + 3)*x^2 2*(a - 5)*(a + 5)*a*b^3 2*(a^3 - 25*a)*b^3
h=(x-2)/(x+3)-(x+1)/(x-5)-(2-10*x)/(x^2-2*x-15) h2=h.factor() print h2 h2=h.simplify_full() print h2
-1/(x + 3) -1/(x + 3)
h=(2-sqrt(2))^2-sqrt(2*sqrt(4))-(3-sqrt(2))*(sqrt(2)-1)^(-1) h2=h.factor() show(h2) h2=h.simplify_full() show(h2)
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{3 \, {\left(3 \, \sqrt{2} - 5\right)}}{\sqrt{2} - 1}
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{3 \, {\left(3 \, \sqrt{2} - 5\right)}}{\sqrt{2} - 1}
var('a, b') h=log((a^3*b^(-1))/(c^(-1)))^(1/4) h2=h.factor() show(h2) h2=h.simplify_full() show(h2)
Traceback (most recent call last): show(h2) File "", line 1, in <module> File "/tmp/tmpsJuFp9/___code___.py", line 4, in <module> h=log((a**_sage_const_3 *b**(-_sage_const_1 ))/(c**(-_sage_const_1 ))) File "integer.pyx", line 1871, in sage.rings.integer.Integer.__pow__ (sage/rings/integer.c:12477) TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'int'