How to check if a SymPy expression has analytical integral
问题 I want to solve my other question here so I need sympy to return an error whenever there is no analytical/symbolic solution for and integral. For example if I try : from sympy import * init_printing(use_unicode=False, wrap_line=False, no_global=True) x = Symbol('x') integrate(1/cos(x**2), x) It just [pretty] prints the integral itself without solving and/or giving an error about not being able to solve it! P.S. I have also asked this question here on Reddit. 回答1: A "symbolic" solution always