On Sun, Jun 10, 2012 at 4:50 AM, [email protected]
<[email protected]> wrote:
> One more thing. `solve` should raise NotImplementedError when it can
> not find the solutions. Returning [] means that according to `solve`
> no solutions exist at all, not that it can not find those that exist.
> Could you report this as a bug on the google code site?

This is the difficulty currently: since domain=RR was not given, roots
didn't find a solution in whatever domain it defaults to. I don't know
enough about domains to know what should be tried when. If all
instances of poly in solve are given the RR domain will this always
work? It does for this problem (and btw, to get real roots give x a
real assumption):

>>> var('x', real=True)
x
>>> M = Matrix([[1,3*x,2*x,5*x,7*x,7*x,4*x,6*x,5*x],[1/(3*x),1,x/2,3*x,5*x,
... 3*x,5*x,3*x,3*x],[1/(2*x),2/x,1,3*x,6*x,3*x,6*x,5*x,5*x],[1/(5*x),1/
... (3*x),1/(3*x),1,6*x,2*x,4*x,3*x,3*x],[1/(7*x),1/(5*x),1/(6*x),1/(6*x),
... 1,x/5,x/2,x/3,x/3],[1/(7*x),1/(3*x),1/(3*x),1/(2*x),5/x,1,3*x,2*x,2*x],
... [1/(4*x),1/(5*x),1/(6*x),1/(4*x),2/x,1/(3*x),1,x,x/3],[1/(6*x),1/(3*x),
... 1/(5*x),1/(3*x),3/x,1/(2*x),1/x,1,x],[1/(5*x),1/(3*x),1/(5*x),1/(3*x),
... 3/x,1/(2*x),3/x,1/x,1]])
>>> s = M.det()
>>> solve(s)
[0.493925305792679, 0.686078618485917]

(This is from my solve branch. I'm running tests to see if domain='RR'
will cause any tests to fail.)

-- 
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.

Reply via email to