from sympy import * init_printing(use_latex='mathjax') n, m = symbols('n,m', integer=True) x, y, z = symbols('x,y,z') # Indefinite integral integrate(x**2, x) # Definite integral integrate(x**2, (x, 0, 3)) integrate(x**n, (x, y, z)) # Use `integrate` to solve the integrals above # Use `integrate` on other equations. Symbolic integration has it limits, find them.