Hi,

On Wed, Nov 17, 2010 at 02:05:42PM -0800, Filip Dominec wrote:
> Hi, I am trying to solve a inequality as is demonstrated at
> http://code.google.com/p/sympy/issues/detail?id=1646#c22. Aaron's
> output was
> 
> In [3]: x = Symbol('x', real=True)
> In [4]: e = Le(x**2, 2)
> In [5]: solve(e, x)
> Out[5]:
> ⎡⎡   ⎽⎽⎽    ⎽⎽⎽⎤⎤
> ⎣⎣-╲╱ 2 , ╲╱ 2 ⎦⎦
> 
> However, I am not able to get this nice result nor with the 0.6.7
> version, nor with the today's git
> version, nor with https://github.com/mattpap/sympy-polys/tree/polys11.

This feature is implemented only in polys11 at this point. You should
get the following output in complex and real cases:

In [1]: solve(x**2 < 2, x)
Out[1]: 
   ⎽⎽⎽                     ⎽⎽⎽
-╲╱ 2  < re(x) ∧ re(x) < ╲╱ 2  ∧ im(x) = 0

In [2]: solve([x**2 < 2, Assume(x, Q.real)], x)
Out[2]: 
   ⎽⎽⎽             ⎽⎽⎽
-╲╱ 2  < x ∧ x < ╲╱ 2

> Can you please point me to what I am doing wrong?
> 
> The /usr/lib/pymodules/python2.6/sympy/solvers/solvers.pyc  module
> raises "ValueError: Could not parse expression x**2 <= 2" (at line
> 334).

This suggests that you are using the system wide version of sympy.
To use the new feature you have to import sympy from the cloned git
repository, e.g.:

$ git clone https://[email protected]/mattpap/sympy-polys.git
$ cd sympy-polys
$ git checkout polys11
$ bin/isympy

> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
> 

-- 
Mateusz

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to