Consider
test : matrix([-0.13333333333333,-0.16666666666667],[0.04,0.0]);
when I execute
float(eigenvalues(test));
I get
(%o210)
[[-4.971296243246757*10^-28*(9.4825272469217148*10^25*%i+1.3410318638167688*10^26),
4.971296243246757*10^-28*(9.4825272469217148*10^25*%i-1.3410318638167688*10^26)],[1.0,1.0]]
However, I *know* the eigenvalues for this matrix are
-.6666666665e-1+.4714045212e-1*I, -.6666666665e-1-.4714045212e-1*I
(These are what Maple, Mathematica, and R all return, in some fashion).
So, either Maxima is in error, or I'm not interpreting the output
correctly. At minimum, I need to to be able to determine if the
eigenvalues are real, or complex, and if complex, what the sign of the
real and imaginary parts is for a given value.
Now, if instead of using eigenvalues() I try:
cp : charpoly(test,lambda);
allroots(cp,lambda);
I get the 'right answer' (or, at least, one I can easily 'read', and
which matches the results from other applications):
[lambda=0.047140452079107*%i-0.066666666666665,lambda=-0.047140452079107*%i-
0.066666666666665]
So, any suggestions on how to parse the results from eigenvalues()? I'd
rather not have to generate a charpoly for each matrix, and then find
roots of same. Perhaps the issue is related to the use of solve by
eigenvalues(), as opposed to allroots? I suspect this because
float(solve(cp,lambda));
returns the same 'mess' that eigenvalues(test) does (not above).
Any way to cook up a 'better' version of eigenvalues()?