|
From: Michel T. <ta...@lp...> - 2017-01-16 13:48:48
|
Le 16/01/2017 à 12:05, Soegtrop, Michael a écrit : > (%i2) a:matrix([1,7,3],[7,4,-5],[3,-5,6]); > > (%o2) matrix([1,7,3],[7,4,-5],[3,-5,6]) > > (%i3) load(eigen); > > (%o3) "C:/Program Files > (x86)/Maxima-sbcl-5.37.3/share/maxima/5.37.3/share/matrix/eigen.mac" > > (%i7) evecsu:rectform(float(uniteigenvectors(a)))$ > > (%i8) evec2:evecsu[2][2][1]; > > (%o8) > [0.993506133354939,-8.326672684688674*10^-17*%i-0.8915008009299733,1.087133163311995*10^-16*%i-0.5718068323676483] > > (%i10) rectform(evec2.evec2); > > (%o10) 2.413867325458305*10^-17*%i+2.10879116861499 > > > > So this results in 2.10879116861499 rather than 1. > > > > I tested this on Maxima 5.37.3. > Here i tested this on maxima 5.39.0 and it doesn't work at all. I get eigenvectors: the eigenvector(s) for the 1 th eigenvalue will be missing. eigenvectors: the eigenvector(s) for the 2 th eigenvalue will be missing. eigenvectors: the eigenvector(s) for the 3 th eigenvalue will be missing. When computing the eigenvalues with bfloats and fpprec:30 one sees that they are all real and are: 7.03594584795763099344518048443b0 - 7.00792852354785898506814578269b0 1.09719826755902279916229652983b1 so we are in the case where the 3rd degree equation has 3 real solutions which can only be expressed as complex formulas. Apparently this confuses eigenvector. One can find the eigenvalues numerically like this: for the first one: X:[x,y,z]$ Y:a.X-7.03594584795763099344518048443b0*X$ solve([Y[1,1],Y[2,1]],[x,y]) float(solve(subst(%[1],x^2+y^2+z^2=1))); gives z = 0.7449388486979633 for z>0 and then x = 0.6287841861843084, y = 0.2229272502523859 so there is no real problem computing this normalized eigenvector. Which means there is a bug in "eigenvectors". Slightly deforming the matrix a above leaves the same error. -- Michel Talon |