from sympy import Integral, latex
from sympy.abc import x
latex(x ** 2)
latex(x ** 2, mode='inline')
latex(x ** 2, mode='equation')
Methods for entering equations while programming in C/C++ , Python or Fortran