On Thursday, December 4, 2014 7:23:28 AM UTC+1, Chris Smith wrote:
>
> Could you do `print filldedent(R);print filldedent(L)` so I can see what
> the expressions are that you are trying to solve?
>
>
>
Sorry my list L of 4 relationals was latter renamed R... Here they are
(btw I was not able to use filldedent, using "from sympy import *" so
I used print(R) and reformat with my editor to have an element per line)
:
R = [(-k**8 + 8*k**6 - 8*k**4 - 16*k**2 - 64)/(k*(k**8 - 2*k**6 - 4*k**4
- 16*k**2 + 8)) > 0,
(-k**8 + 8*k**6 - 8*k**4 - 16*k**2 - 64)/(k*(k**8 - 2*k**6 - 4*k**4 -
16*k**2 + 8)) > 0,
(k**8 - 6*k**6 + 8*k**2 + 96)/(k*(k**8 - 2*k**6 - 4*k**4 - 16*k**2 +
8)) >= 0,
(k**8 - 2*k**7 + 4*k**6 + 4*k**5 - 16*k**4 + 8*k**3 - 40*k**2 + 24*k -
64)/(k*(k**8 - 2*k**6 - 4*k**4 - 16*k**2 + 8)) >= 0]
The symbol k is restricted to be real and in (2,3].
(k is introduced with k = symbols('k',real=True,positive=True)).
In fact even if I try to solve for only the first relational I meet the
same error message :
>>> res= solve([k>2, k <= 3, R[0]],k)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/sympy/solvers/solvers.py", line 674,
in solve
symbols=symbols)
File "/usr/lib/python2.7/site-packages/sympy/solvers/inequalities.py", line
434, in reduce_inequalities
poly_reduced.append(reduce_rational_inequalities([exprs], gen, assume))
File "/usr/lib/python2.7/site-packages/sympy/solvers/inequalities.py", line
209, in reduce_rational_inequalities
solution = solve_rational_inequalities(eqs)
File "/usr/lib/python2.7/site-packages/sympy/solvers/inequalities.py", line
144, in solve_rational_inequalities
global_interval -= denom_interval
File "/usr/lib/python2.7/site-packages/sympy/core/sets.py", line 250, in
__sub__
return self.intersect(other.complement)
File "/usr/lib/python2.7/site-packages/sympy/core/sets.py", line 133, in
complement
return self._complement
File "/usr/lib/python2.7/site-packages/sympy/core/sets.py", line 1229, in
_complement
% self)
ValueError: {RootOf(k**8 - 2*k**6 - 4*k**4 - 16*k**2 + 8, 0)}: Complement
not defined for symbolic inputs
Bruno
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/08b5c016-5952-4775-9372-c1d7ae83b2c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.