If the eigenvalues cannot be expressed in radicals, then it doesn't
matter what method you use to compute them.

And for whatever reason, people always seem to be confused about this.
 The general fifth order and higher polynomial does not have a
solution in radicals, and you can construct specific fifth order and
higher polynomials whose roots are not expressible in radicals (like
x**5 - x + 1).  But that doesn't mean that *all* fifth order
polynomials don't have solutions in radicals.  It's very easy to
construct a polynomial of any degree that has solutions in radicals.
For example (x - 1)**n is a nth degree polynomial, and the roots are
all 1.  It's even possible to have an irreducible polynomial of degree
5 or greater whose solution is expressible in radicals.

So there's no reason to just "give up" if the polynomial is degree 5
or higher unless you are always solving the general equation.  You can
easily create a square matrix of any size whose eigenvalues are easily
expressed (in radicals, or for example just integers).  Yes, there
will be cases where it can only produce roots in the form of RootOf,
but either just let those pass through, or raise the error only when
that happens (depending on if it works to just let them pass through).

And by the way, maybe you were thinking that the characteristic
polynomial isn't computed by det(A - x*I), as is often taught in
linear algebra courses?

Aaron Meurer

On Sun, Jun 12, 2011 at 6:49 AM, SherjilOzair <sherjiloz...@gmail.com> wrote:
>
>
> On Jun 12, 3:09 am, Vinzent Steinberg
> <vinzent.steinb...@googlemail.com> wrote:
>> On 11 Jun., 10:47, SherjilOzair <sherjiloz...@gmail.com> wrote:
>>
>> > Do you require to solve eigenvalue problems of matrices bigger than
>> > 4*4 ?
>> > How are you doing it currently ?
>> > Matrix.diagonalize only works for matrices smaller than 5*5, as
>> > polys.roots can only solve degree 4 equations and less.
>>
>> This is not entirely true, because we can find roots of higher order
>> using for examples factorization. But yes, for equations of degree
>> greater than 4 there is no general algorithm. But this does not matter
>> in this case, because sympy does not calculate eigenvalues using the
>> characteristic polynomial AFAIK.
>
> Arbitrary higher-order equations can not be solved.
> And characteristic polynomial of an arbitrary matrix is arbitrary.
> This means, that we can't use that method to compute eigenvals
> reliably.
> I don't think there are any other direct methods, though.
>
> sympy uses this method.
>
> def berkowitz_eigenvals(self, **flags):
>        """Computes eigenvalues of a Matrix using Berkowitz method.
> """
>        return roots(self.berkowitz_charpoly(Dummy('x')), **flags)
>
> eigenvals = berkowitz_eigenvals
>
> Or are you referring to something else ?
>
>>
>> Vinzent
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to