!pip install sympy
Collecting sympy
  Downloading sympy-1.1.1.tar.gz (4.6MB)
    100% |████████████████████████████████| 4.6MB 89kB/s  eta 0:00:01
Collecting mpmath>=0.19 (from sympy)
  Downloading mpmath-0.19.tar.gz (498kB)
    100% |████████████████████████████████| 501kB 780kB/s eta 0:00:01
Installing collected packages: mpmath, sympy
  Running setup.py install for mpmath ... - \ | / - \ | done
  Running setup.py install for sympy ... - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - done
Successfully installed mpmath-0.19 sympy-1.1.1
import sympy
x = sympy.var('x')
y = x ** 2
sympy.integrate(y)
x**3/3
sympy.diff(y)
2*x