Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Matrices
New issue 3811 by asmeu...@gmail.com: Matrix.eigenvects(simplify=True) does
not simplify
http://code.google.com/p/sympy/issues/detail?id=3811
In [47]: M.eigenvects(simplify=True)
Out[47]:
⎡⎛ ⎡⎡
⎛ 2⎞⎤⎤⎞ ⎛ ⎡⎡
⎢⎜ ⎢⎢ ⎛ ⎛ a⋅b ⎞ ⎞
⎜ ⎛ a⋅b ⎞ ⎟⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎜a⋅⎜─────── + b⎟ ⎟
⎜ 2 (a + 2⋅b)⋅⎜─────── + b⎟ ⎟⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎛ a⋅b ⎞ ⎜ ⎝a + 2⋅b ⎠ 4⋅b ⎟
⎜ 4⋅b ⎝a + 2⋅b ⎠ ⎟⎥⎥⎟ ⎜ ⎢⎢ ⎛
a⋅b ⎞
⎢⎜ ⎢⎢4⋅a⋅⎜─────── + b⎟ ⎜─────────────── + ───────⎟⋅⎜4⋅a +
─────── + ────────────────────────⎟⎥⎥⎟ ⎜ ⎢⎢ 4⋅a⋅⎜─────── + b⎟
⎢⎜ ⎢⎢ ⎝a + 2⋅b ⎠ 16⋅b ⎝ b⋅(a + b) a + 2⋅b⎠ ⎝
a + 2⋅b b⋅(a + b) ⎠⎥⎥⎟ ⎜ ⎢⎢ ⎝a - 2⋅b
⎠ 1
⎢⎜1, 1, ⎢⎢───────────────── + ─────── +
──────────────────────────────────────────────────────────────────────⎥⎥⎟,
⎜-4⋅b + 1, 1, ⎢⎢- ───────────────── + ───
⎢⎜ ⎢⎢ b⋅(a + b) a + 2⋅b a +
b ⎥⎥⎟ ⎜ ⎢⎢ b⋅(a -
b) a -
⎢⎜
⎢⎢
⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢
⎛ 2⎞ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢
⎜ ⎛ a⋅b ⎞ ⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢
⎜ 2 (a + 2⋅b)⋅⎜─────── + b⎟ ⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎛ a⋅b ⎞ ⎛ a⋅b ⎞ ⎜
4⋅b ⎝a + 2⋅b ⎠ ⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎛ a⋅b
⎢⎜ ⎢⎢ 4⋅(a + 2⋅b)⋅⎜─────── + b⎟ (a + 2⋅b)⋅⎜─────── + b⎟⋅⎜4⋅a +
─────── + ────────────────────────⎟ ⎥⎥⎟ ⎜ ⎢⎢ 4⋅(a -
2⋅b)⋅⎜───────
⎢⎜ ⎢⎢ ⎝a + 2⋅b ⎠ ⎝a + 2⋅b ⎠ ⎝ a +
2⋅b b⋅(a + b) ⎠ ⎥⎥⎟ ⎜ ⎢⎢ ⎝a
- 2⋅b
⎢⎜ ⎢⎢ ───────────────────────── +
────────────────────────────────────────────────────────────────── ⎥⎥⎟
⎜ ⎢⎢ - ────────────────────
⎢⎜ ⎢⎢ b⋅(a +
b)
2 ⎥⎥⎟ ⎜ ⎢⎢ b⋅(a - b)
⎢⎜ ⎢⎢ b⋅(a +
b) ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜
⎢⎢
⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢
⎛ 2⎞ ⎥⎥⎟
⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎜ ⎛
a⋅b ⎞ ⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎜ 2 (a + 2⋅b)⋅⎜───────
+ b⎟ ⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎜ 4⋅b ⎝a +
2⋅b ⎠ ⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ 4⋅⎜4⋅a + ─────── +
────────────────────────⎟ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ ⎝ a + 2⋅b b⋅(a +
b) ⎠ ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢
────────────────────────────────────────────
⎥⎥⎟ ⎜ ⎢⎢
⎢⎜ ⎢⎢ a +
b ⎥⎥⎟ ⎜ ⎢⎢
⎢⎜
⎢⎢
⎥⎥⎟ ⎜ ⎢⎢
⎣⎝ ⎣⎣
16 ⎦⎦⎠ ⎝ ⎣⎣
⎛
2⎞⎤⎤⎞ ⎤
⎛ ⎛ a⋅b ⎞ ⎞ ⎜ ⎛ a⋅b ⎞
⎟⎥⎥⎟ ⎥
⎜a⋅⎜─────── + b⎟ ⎟ ⎜ 2 (a - 2⋅b)⋅⎜─────── + b⎟
⎟⎥⎥⎟ ⎥
⎜ ⎝a - 2⋅b ⎠ 4⋅b ⎟ ⎜ 4⋅b ⎝a - 2⋅b ⎠
⎟⎥⎥⎟ ⎥
⎜─────────────── - ───────⎟⋅⎜4⋅a + ─────── -
────────────────────────⎟⎥⎥⎟ ⎥
6⋅b ⎝ b⋅(a - b) a - 2⋅b⎠ ⎝ a - 2⋅b b⋅(a - b)
⎠⎥⎥⎟ ⎥
──── -
──────────────────────────────────────────────────────────────────────⎥⎥⎟,
⎛-2⋅a - 2⋅b + 1, 2, ⎡⎡-1⎤, ⎡0 ⎤⎤⎞⎥
2⋅b a -
b ⎥⎥⎟ ⎜ ⎢⎢ ⎥ ⎢ ⎥⎥⎟⎥
⎥⎥⎟
⎜ ⎢⎢1 ⎥ ⎢0 ⎥⎥⎟⎥
⎛
2⎞ ⎥⎥⎟ ⎜ ⎢⎢ ⎥ ⎢ ⎥⎥⎟⎥
⎜ ⎛ a⋅b ⎞
⎟ ⎥⎥⎟ ⎜ ⎢⎢0 ⎥ ⎢-1⎥⎥⎟⎥
⎜ 2 (a - 2⋅b)⋅⎜─────── + b⎟
⎟ ⎥⎥⎟ ⎜ ⎢⎢ ⎥ ⎢ ⎥⎥⎟⎥
⎞ ⎛ a⋅b ⎞ ⎜ 4⋅b ⎝a - 2⋅b ⎠
⎟ ⎥⎥⎟ ⎝ ⎣⎣0 ⎦ ⎣1 ⎦⎦⎠⎥
+ b⎟ (a - 2⋅b)⋅⎜─────── + b⎟⋅⎜4⋅a + ─────── -
────────────────────────⎟ ⎥⎥⎟ ⎥
⎠ ⎝a - 2⋅b ⎠ ⎝ a - 2⋅b b⋅(a - b)
⎠ ⎥⎥⎟ ⎥
───── -
──────────────────────────────────────────────────────────────────
⎥⎥⎟ ⎥
2 ⎥⎥⎟ ⎥
b⋅(a -
b) ⎥⎥⎟ ⎥
⎥⎥⎟
⎥
⎛
2⎞ ⎥⎥⎟ ⎥
⎜ ⎛ a⋅b ⎞
⎟ ⎥⎥⎟ ⎥
⎜ 2 (a - 2⋅b)⋅⎜─────── + b⎟
⎟ ⎥⎥⎟ ⎥
⎜ 4⋅b ⎝a - 2⋅b ⎠
⎟ ⎥⎥⎟ ⎥
4⋅⎜4⋅a + ─────── -
────────────────────────⎟
⎥⎥⎟ ⎥
⎝ a - 2⋅b b⋅(a - b)
⎠ ⎥⎥⎟ ⎥
────────────────────────────────────────────
⎥⎥⎟ ⎥
a -
b
⎥⎥⎟ ⎥
⎥⎥⎟
⎥
16
⎦⎦⎠ ⎦
But the eigenvectors do simplify
>>> A = M.eigenvects()
>>> A[0][2][0].simplify()
>>> A[1][2][0].simplify()
>>> pprint(A)
⎡⎛1, 1, ⎡⎡1⎤⎤⎞, ⎛-4⋅b + 1, 1, ⎡⎡-1⎤⎤⎞, ⎛-2⋅a - 2⋅b + 1, 2, ⎡⎡-1⎤, ⎡0
⎤⎤⎞⎤
⎢⎜ ⎢⎢ ⎥⎥⎟ ⎜ ⎢⎢ ⎥⎥⎟ ⎜ ⎢⎢ ⎥ ⎢
⎥⎥⎟⎥
⎢⎜ ⎢⎢1⎥⎥⎟ ⎜ ⎢⎢-1⎥⎥⎟ ⎜ ⎢⎢1 ⎥ ⎢0
⎥⎥⎟⎥
⎢⎜ ⎢⎢ ⎥⎥⎟ ⎜ ⎢⎢ ⎥⎥⎟ ⎜ ⎢⎢ ⎥ ⎢
⎥⎥⎟⎥
⎢⎜ ⎢⎢1⎥⎥⎟ ⎜ ⎢⎢1 ⎥⎥⎟ ⎜ ⎢⎢0 ⎥
⎢-1⎥⎥⎟⎥
⎢⎜ ⎢⎢ ⎥⎥⎟ ⎜ ⎢⎢ ⎥⎥⎟ ⎜ ⎢⎢ ⎥ ⎢
⎥⎥⎟⎥
⎣⎝ ⎣⎣1⎦⎦⎠ ⎝ ⎣⎣1 ⎦⎦⎠ ⎝ ⎣⎣0 ⎦ ⎣1
⎦⎦⎠⎦
From http://stackoverflow.com/q/16431552/161801.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.