import math from sympy import * x = symbols('x') f_prime = diff(x*x*sin(x),x) print("f'(x) = ", f_prime)