from IPython.display import Math, HTML def enable_sympy_in_cell(): display(HTML("")) get_ipython().events.register('pre_run_cell', enable_sympy_in_cell) import sympy from sympy import * init_printing() x, y, z = symbols('x y z') Integral(sqrt(1/x), (x, 0, oo))