解决单变量不等式

>>> from sympy.solvers.inequalities import solve_univariate_inequality
>>> from sympy import var
>>> x=var('x')
>>> solve_univariate_inequality(2*x**2-6>1,x,relational=False)
(-oo, -sqrt(14)/2) U (sqrt(14)/2, oo)

关系=假参数只是表示结果如何被呈现。默认值( relational = True )会产生这样的结果。

>>> solve_univariate_inequality(2*x**2-6>1,x)
Or(And(-oo < x, x < -sqrt(14)/2), And(sqrt(14)/2 < x, x < oo))