In [1]:
var('x')
Out[1]:
x
In [2]:
solve(x^2 + 2 == 0, x)
Out[2]:
[x == -I*sqrt(2), x == I*sqrt(2)]
In [3]:
solve(e^x == 5, x)
Out[3]:
[x == log(5)]
In [5]:
var('y')
Out[5]:
y
In [6]:
solve([x+y==6, x-y==4], x, y)
Out[6]:
[[x == 5, y == 1]]
In [7]:
var('b c')
Out[7]:
(b, c)
In [8]:
solve([x^2 + b*x + c == 0],x)
Out[8]:
[x == -1/2*b - 1/2*sqrt(b^2 - 4*c), x == -1/2*b + 1/2*sqrt(b^2 - 4*c)]
In [9]:
f = x - (x/2 + x/3 + x/5) + (x/6 + x/10 + x/15) - x/30
In [10]:
type(f)
Out[10]:
<type 'sage.symbolic.expression.Expression'>
In [11]:
show(f)
In [25]:
f = (1/2)*log(2*x) + (1/2)*log(1/x)
In [26]:
show(f)
In [27]:
show(f.canonicalize_radical())