from sympy import * from IPython.display import * init_printing(use_latex=True) x = Symbol('x') f = lambda x: sqrt(1-x**2) fl = ['$f(x) =',latex(f(x)),'$'] display(Latex(''.join(fl))) 2 * integrate(f(x),(x,-1,1))