Status: Accepted
Owner: asmeurer
CC: nicolas.pourcelot, mattpap
Labels: Type-Defect Priority-Medium Solvers
New issue 2033 by asmeurer: solve should be able to handle rational
function systems
http://code.google.com/p/sympy/issues/detail?id=2033
In [29]: solve([r - x**2 - y**2, tan(t) - y/x], [x, y])
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
/Users/aaronmeurer/Documents/python/sympy/sympy/<ipython console> in
<module>()
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/solvers/solvers.pyc
in solve(f, *symbols, **flags)
369 polys.append(poly)
370 else:
--> 371 raise NotImplementedError()
372
373 if all(p.is_linear for p in polys):
NotImplementedError:
In [30]: solve([r - x**2 - y**2, tan(t)*x - y], [x, y])
Out[30]:
⎡⎛ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽
⎽⎽⎽⎽⎽⎽⎽⎽⎽ ⎞ ⎛
⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽ ⎽⎽⎽⎽⎽⎽⎽⎽⎽ ⎞⎤
⎢⎜ ⎽⎽⎽ ╱ 1 ╱
2 ⎟ ⎜ ⎽⎽⎽ ╱ 1
╱ 2 ⎟⎥
⎢⎜╲╱ r ⋅ ╱ ─────────── ⋅╲╱ tan
(t) ⎟ ⎜-╲╱ r ⋅ ╱ ───────────
⋅╲╱ tan (t) ⎟⎥
⎢⎜ ╱ 2 ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽
⎽⎽⎽⎽⎽⎽⎽⎽⎽⎟ ⎜ ╱ 2
⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎟⎥
⎢⎜ ╲╱ 1 + tan (t) ⎽⎽⎽ ╱ 1 ╱
2 ⎟ ⎜ ╲╱ 1 + tan (t) ⎽⎽⎽ ╱
1 ╱ 2 ⎟⎥
⎢⎜─────────────────────────────────────, ╲╱ r ⋅ ╱ ─────────── ⋅╲╱ tan
(t) ⎟, ⎜──────────────────────────────────────, -╲╱ r ⋅ ╱ ───────────
⋅╲╱ tan (t) ⎟⎥
⎢⎜ tan(t) ╱
2 ⎟ ⎜ tan(t)
╱ 2 ⎟⎥
⎣⎝ ╲╱ 1 + tan
(t) ⎠ ⎝ ╲╱ 1
+ tan (t) ⎠⎦
Now, this particular example also requires an unrelated fix from my
integration3 branch:
commit 6abbf26524e631039142dd5acffde676839e8e6b
Author: Aaron Meurer <asmeu...@gmail.com>
Date: Fri Jun 11 23:12:51 2010 -0600
Allow coercion from ZZ(a) to ZZ(a, b)
But point is one similar to issue 1694, when you make it a polynomial
system instead of a rational system by multiplying through by x in the
second equation, it can do it.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.