Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Polynomial WrongResult

New issue 3245 by [email protected]: Wrong result with Poly.eval
http://code.google.com/p/sympy/issues/detail?id=3245

In [370]: print A
[-alpha*x**2 + x - y]
[ -alpha*y - x*y + x]

In [371]: A.jacobian([x, y]).subs({x:0, y:0}).charpoly().eval((z + 1)/(z - 1))
Out[371]:
 2
z  + 4⋅z - 1
────────────
 2
z  - 2⋅z + 1

But the right answer is

In [372]: print A.jacobian([x, y]).subs({x:0, y:0}).charpoly().as_expr()
_lambda**2 + _lambda*(alpha - 1) - alpha + 1

In [373]: f = l**2 + l*(alpha - 1) - alpha + 1

In [374]: f.subs(l, (z + 1)/(z - 1)).cancel()
Out[374]:
               2
2⋅α⋅z - 2⋅α + z  + 3
────────────────────
     2
    z  - 2⋅z + 1

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