One of the problems I am running into with polys is this: >>> p1,p2=[(x - 5)**2 + (y - 5)**2 - 4, -(-x + 5)*(-x - 2*2**(1/ S(2)) + 5) - (-y + 5)*(-y + 5)] >>> solve([p1,p2]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "sympy\solvers\solvers.py", line 236, in solve solution = _solve(f, *symbols, **flags) File "sympy\solvers\solvers.py", line 607, in _solve soln = solve_poly_system(polys) File "sympy\solvers\polysys.py", line 45, in solve_poly_system return solve_generic(polys, opt) File "sympy\solvers\polysys.py", line 179, in solve_generic result = solve_reduced_system(polys, opt.gens, entry=True) File "sympy\solvers\polysys.py", line 149, in solve_reduced_system raise NotImplementedError("only zero-dimensional systems supported (finite n umber of solutions)") NotImplementedError: only zero-dimensional systems supported (finite number of s olutions)
The two expressions end up getting different domains: [Poly(x**2 - 10*x + y**2 - 10*y + 46, x, y, domain='ZZ'), Poly(-x**2 + (-2*2**(1 /2) + 10)*x - y**2 + 10*y - 50 + 10*2**(1/2), x, y, domain='EX')] If I get rid of the sqrt(2) then the domains are both ZZ and it works. >>> p2 -(-x + 5)*(-x - 2*2**(1/2) + 5) - (-y + 5)**2 >>> _.subs(sqrt(2),2) (-x + 1)*(x - 5) - (-y + 5)**2 >>> solve([p1,_]) [(4, -3**(1/2) + 5), (4, 3**(1/2) + 5)] What's the best way to make solve flexible so it will handle this? -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.