1#This prints the derivative of a function
2import sympy as sym
3x = sym.Symbol('x')
4function = x ** 4 + 7 * x ** 3 + 8
5derivitive = sym.diff(function)
6print(derivitive)
1from sympy import Symbol, Derivative
2
3x= Symbol('x')
4
5function= x**4 + 7*x**3 + 8
6
7deriv= Derivative(function, x)
8deriv.doit().subs({x:4})
9
10