from numpy import mat
a=(8-4)-3
b=8-(4-3)
print 'since a and b are not equal so subtraction is non-commutative on Z(set of integers)'
a=mat([[1, 2],[3, 4]])
b=mat([[5 ,6],[0, -2]])
g= a*b
k= b*a
print 'since g and k are not equal matrix multiplication is non-commutative'
h=(2**2)**3
j=2**(2**3)
print 'since h and j are not equal so exponential operation is non associative on the set of positive integers N'
from sympy import symbols, solve
t=symbols('t')
f=t**3+t**2-8*t+4
r=solve(f,t)
print 'roots of f(t) are as follows:'
for r in r:
print r
from sympy import symbols, solve
t=symbols('t')
h=t**4-2*t**3+11*t-10
r=solve(h,t)
print 'the real roots of h(t) are 1 and -2'
for r in r:
print r
t=symbols('t')
f=t**4-3*t**3+6*t**2+25*t-39
r=solve(f,t)
print '\nroots of f(t) are as follows:'
for r in r:
print r