Issue 1168: Matrix([[x+y, -x, 0], [-x-y, x, 1], [0,1,0]]).inf() gives wrong
result
http://code.google.com/p/sympy/issues/detail?id=1168
New issue report by ondrej.certik:
In [1]: A = Matrix([[x+y, -x, 0], [-x-y, x, 1], [0,1,0]])
In [2]: Ainv = A.inv("ADJ")
In [3]: Ainv
Out[3]:
⎡ -1 -x ⎤
⎢────── 0 ──────⎥
⎢-x - y -x - y⎥
⎢ ⎥
⎢ 0 0 1 ⎥
⎢ ⎥
⎣ 1 1 0 ⎦
In [4]: Ainv*A
Out[4]:
⎡ x y ⎤
⎢- ────── - ────── 0 0⎥
⎢ -x - y -x - y ⎥
⎢ ⎥
⎢ 0 1 0⎥
⎢ ⎥
⎣ 0 0 1⎦
In [6]: (Ainv*A).applyfunc(simplify)
Out[6]:
⎡1 0 0⎤
⎢ ⎥
⎢0 1 0⎥
⎢ ⎥
⎣0 0 1⎦
This is a-ok. But this is wrong:
In [1]: A = Matrix([[x+y, -x, 0], [-x-y, x, 1], [0,1,0]])
In [2]: Ainv = A.inv()
In [3]: Ainv = Ainv.applyfunc(simplify)
In [4]: Ainv
Out[4]:
⎡0 0 0⎤
⎢ ⎥
⎢0 0 1⎥
⎢ ⎥
⎣0 1 0⎦
In [5]: Ainv * A
Out[5]:
⎡ 0 0 0⎤
⎢ ⎥
⎢ 0 1 0⎥
⎢ ⎥
⎣-x - y x 1⎦
It needs to be investigated if the error is in simplify() or in the
inversion algorithm.
See also this thread:
http://groups.google.com/group/sympy/browse_thread/thread/313238d56bbaea21
Issue attributes:
Status: Accepted
Owner: ----
Labels: Type-Defect Priority-High WrongResult
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---