解決單變數不等式
>>> 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))