Comment #2 on issue 2193 by [email protected]: Matrix.eigenvects() return empty vectors in some cases
http://code.google.com/p/sympy/issues/detail?id=2193

(for information only)

I have investigated this issue and here my preliminary estimates
that it is because of sequentially related problems:

1. Solving of characteristic polynomials return not simplified roots

    >>> roots(x**2 - (1 + I)*x + I, x)
{1/2 + I/2 - (-1)**(3/4)*2**(1/2)/2: 1, 1/2 + I/2 + (-1)**(3/4)*2**(1/2)/2: 1}
    >>> roots(x**2 - (1 + a)*x + a, x)
{1/2 + a/2 - (1 - 2*a + a**2)**(1/2)/2: 1, 1/2 + a/2 + (1 - 2*a + a**2)**(1/2)/2: 1}

   but expected {1: 1, I: 1} and {1: 1, a: 1} respective.

so Matrix.nullspace() can't operate with them (to determine zeros) properly: substitution them to some expressions do not result zero.

    1.1. In case of complex numbers it is because of:

       >>> sqrt(-2*I)
       (-1)**(3/4)*2**(1/2)

       but expected (S.One - I) or (- S.One + I).

Also substitution of the one of the roots in polynomial raise an Exception RuntimeError: 'maximum recursion depth...'

       >>> p = x**2 - (1 + I)*x + I
       >>> solution = roots(p, x)
       >>> x1 = solution.iteritems().next()[0]
       >>> x1
       1/2 + I/2 - (-1)**(3/4)*2**(1/2)/2
       # expected I or 1
       >>> (x1**x1).expand()
       Exception RuntimeError: 'maximum recursion ...'
       # expected zero

1.2. In case of symbolic algebra, this is because of insufficient work with roots_quadratic in sympy.polys.polyroots calculation determinant in this case
       >>> sqrt(1 + 2*a + a**2)
       (1 + 2*a + a**2)**(1/2)

My conclusions:
I have seen through sympy-issues that work with polynomial is intensively continuing now (and many issues NeedsReview), what about complex numbers many issues age hanged.

I am not going to consider this issue to be closed right now - it must be examined more, as well as situation with complex numbers (probably to solve them at first). But now I insert a necessary line of code for raising NotImplementedError when eigen vectors can't be obtained (for any unrecognized reasons) to catch this at the right time (pull request 115).

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