from sympy import *
x=symbols("x")
f=S("2/3*x**2+3*x-5")
print(f)
f
2*x**2/3 + 3*x - 5
2*x+3*x
factor(x**2+5*x-6)
simplify(1/x+1/(x+1))
expand((x-2)*(x+3))
f=x**2+5*x-6
f.subs(x,sqrt(2))
g =diff(f,x)
print(g)
g
4*x/3 + 3
integrate(g,x)
Rational("2/7")+Rational("4/9")
a=S("2/7+4/9")
simplify(a)
A = Matrix([[1,2],[4,2]])
A
B=Matrix([[1,3],[2,1]])
B
A+B
A*B
5*A
A**(-1)
A.transpose()