On Fri, Nov 11, 2011 at 9:11 AM, Andres Cimmarusti <acimmarusti at gmail.com>wrote:
> Dear maxima users,
>
> I've been working on some calculations that eventually lead to a 5x5
> matrix, whose components can be complex. The next step is to calculate
> the eigenvalues and possibly the eigenvectors.
>
> The built-in maxima functions: eigenvalues and eigenvectors
> immediately fail, even when the matrix has all real components. It
> says "solve is unable to find the roots of the characteristic
> polynomial".
>
> I looked at "dgeev" which uses lapack, and it worked superbly when the
> matrix components are real, but gave me errors when they were complex,
> as expected. Sadly dgeev only works for integers and floating point.
>
Of course, lapack has a version for complex matrixes, but no one has hooked
that up for maxima. It's not difficult to do, but will take a little bit
of time. I cannot do that until later next week at the earliest.
>
> As an additional thing, in an earlier stage of my work (which proved
> wrong), I was able to reduce the characteristic polynomial to a 4th
> order equation. Wikipedia says, analytical solutions are possible
> (
> http://en.wikipedia.org/wiki/Quartic_function#Summary_of_Ferrari.27s_method
> )
> through something known as the Ferrari's method. However, when I tried
> using 'solve' with this quartic polynomial, maxima just couldn't do
> it. After many minutes, maxima simply crashed...(it was disconnected
> from WxMaxima)
>
solve should be able to produce the roots. It could be a bug. Can you
send the quartic that solve couldn't solve?
>
> I have to say that the coefficients of the polynomial were quite
> lengthy, but I feel it should have worked...Naturally when I try a
> general quartic polynomial like listed in the wikipedia article,
> things work fine, though I get warned the expression is too long to
> display. What are the limitations here?...it really is just a lot of
> algebra...
>
That's a display problem. You can do display2d:false, or grind(<result>).
But it will be very messy. But if you're eventually going to want
numerical results, presumably all of the variables in your quartic will be
replaced by numbers. It may be better to replace them with numbers in the
quartic before you try to solve the quartic.
>
> Now, in the case of quintic polynomials, which brings me back to my
> original question, 'solve' can't even do this:
>
> solve( z^5 -z -1 = 0 , z);
>
> This is a well known quintic polynomial whose roots cannot be obtained
> analytically by any means, but they should be possible, numerically.
> Is there a way to get the roots using solve or other tool in maxima?
>
Look for allroots or bf_allroots.
Ray