from sympy import *
init_session()
init_printing(pretty_print = True, use_unicode = True)
def deriver(exp):
return diff(exp, x)
f1 = (5-2*x)/3
f1
deriver(f1)
f2 = x**6 - 4*x**5 + 3*x**3 - x + 7
deriver(f2)
f3 = x**3 - x**2 + 5 - 4*x
deriver(f3)
f4 = x**3/2 - 3*x**2 + 5/x
f4
deriver(f4)
f5 = (1-2*x)*(0.5*x**2 + 1)
f5
deriver(f5)
f6 = 1/x - x**4 + 3*x**2 + 5/x
deriver(f6)
f7 = (3*x**2 + 1)*(2*x-3)
f7
deriver(f7)
f8 = (3*x**2 + x**4 - 5**3 + 1)**2
f8
deriver(f8)
f9 = 6*sqrt(x) + 3/x - 2/x**5
f9
deriver(f9)
f10 = 6*x*sqrt(x)
f10
deriver(f10)
f11 = (7-2*x)*sqrt(x)
f11
deriver(f11)
f12 = (5*x-3)/(x-2)
f12
deriver(f12)
f13 = 2+5/(x-1)
f13
deriver(f13)
f14 = 3 - 2*x-5*x/(x+1)
f14
deriver(f14)
factor(_)
f15 = sqrt(x)/(x-1)
f15
deriver(f15)
factor(_)
f16 = (x**2 + 1)/(x**2 + 2)
f16
deriver(f16)
factor(_)
f17 = 1/(7-5*x)
f17
factor(deriver(f17))
f18 = 5/(x**2 - x)
f18
factor(deriver(f18))
f19 = (x**3 + 1)/(x**2 - 2)
factor(deriver(f19))