Comment #3 on issue 2033 by nicolas.pourcelot: solve should be able to handle rational function systems
http://code.google.com/p/sympy/issues/detail?id=2033

That's already done in 1694 branch, since together() is used, and then equation is solved for numerator.

However, in smichr/1694, both systems now fail:

In [2]: solve([r - x**2 - y**2, tan(t) - y/x], [x, y])

/home/nicolas/Programmation/sympy/sympy/solvers/solvers.py in solve(f, *symbols, **flags)
    421         else:
    422
--> 423 syms, soln = solve_poly_system(polys, **{'simplfiied': False})
    424             assert list(syms) == symbols
    425

/home/nicolas/Programmation/sympy/sympy/solvers/polysys.py in solve_poly_system(system, *gens, **flags)
    118     gave_gens = gens
    119
--> 120     solutions = solve_reduced_system(system, gens, entry=True)
    121
    122     if solutions is None:

/home/nicolas/Programmation/sympy/sympy/solvers/polysys.py in solve_reduced_system(system, gens, entry)
     62     def solve_reduced_system(system, gens, entry=False):
     63         """Recursively solves reduced polynomial systems. """
---> 64         basis = groebner(system, gens, polys=True)
     65
     66         if len(basis) == 1 and basis[0].is_ground:

/home/nicolas/Programmation/sympy/sympy/polys/polytools.pyc in groebner(F, *gens, **args)
   2373         F[i] = sdp_from_dict(f.rep.to_dict(), order)
   2374
-> 2375     G = sdp_groebner(F, lev, order, dom)
   2376
   2377     G = [ Poly(DMP(dict(g), dom, lev), *gens) for g in G ]

/home/nicolas/Programmation/sympy/sympy/polys/groebnertools.pyc in sdp_groebner(F, u, O, K)
    620
621 p = sdp_mul_term(p, (monomial_div(M, p_LM), K.quo(K.one, sdp_LC(p, K))), u, O, K) --> 622 q = sdp_mul_term(q, (monomial_div(M, q_LM), K.quo(K.one, sdp_LC(q, K))), u, O, K)
    623
    624         h = normal(sdp_sub(p, q, u, O, K), G)

/home/nicolas/Programmation/sympy/sympy/polys/algebratools.pyc in quo(self, a, b)
    462         """Quotient of `a` and `b`, implies `__floordiv__`. """
    463         if a % b:
--> 464 raise ExactQuotientFailed('%s does not divide %s in %s' % (b, a, self))
    465         else:
    466             return a // b

ExactQuotientFailed: DMP([[1, 0]], ZZ) does not divide DMP([[1]], ZZ) in ZZ[_r,tan(_t)]



In [3]: solve([r - x**2 - y**2, tan(t) - y/x], [x, y])

...

ExactQuotientFailed: DMP([[1, 0]], ZZ) does not divide DMP([[1]], ZZ) in ZZ[_r,tan(_t)]


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en.

Reply via email to