eigenvector problem
- Subject: eigenvector problem
- From: Barton Willis
- Date: Tue, 10 Feb 2009 14:48:57 -0600
A possible workaround: (this could present the data in a better form)
(%i35) myeigenvectors(m) := (m : spectral_rep(m), [first(m),
map('columnspace, second(m))])$
Simple checks:
(%i36) m : matrix([2,3],[4,5])$
(%i37) e : myeigenvectors(m);
(%o37)
[[-(sqrt(57)-7)/2,(sqrt(57)+7)/2],[span(matrix([(sqrt(57)+19)/38],[-(4*sqrt(57))/57])),span(matrix([-(sqrt(57)-19)/38],[(4*sqrt(57))/57]))]]
(%i38) ratsimp(m . first(first(second(e))) - first(first(e)) .
first(first(second(e))));
(%o38) matrix([0],[0])
(%i39) ratsimp(m . first(second(second(e))) - second(first(e)) .
first(second(second(e))));
(%o39) matrix([0],[0])
(%i40) A : matrix([0, 0, -1, 0, 0, 0], [2, 0, 0, 0, 1, 0], [-4, 0, 0,
-1,-1, 0], [0, -2, -1, 0, 0, -1], [1, 2, 0, 0, 0, 1], [-2, 1, 1, -2, 1,
0])$
(%i41) myeigenvectors(A);
(%o41)
[[(-(sqrt(3)*%i)/2-1/2)*((3^(-3/2)*sqrt(473)*%i)/2+1/2)^(1/3)+(5*((sqrt(3)*%i)/2-1/2))/(3*((3^(-3/2)*
... < huge mess deleted>
Let us know if this works for you.
Barton
(author of columnspace & specral_rep).
maxima-bounces at math.utexas.edu wrote on 02/10/2009 02:19:44 PM:
> [image removed]
>
> [Maxima] eigenvector problem
>
> Leo Butler
>
> to:
>
> 'Maxima List'
>
> 02/10/2009 02:21 PM
>
> Sent by:
>
> maxima-bounces at math.utexas.edu
>
> Hello,
> I have encountered the following problem. I am unsure of its origins.
> The charpoly of the 6x6 matrix is (x^3-3x-1)^2, so the eigenvector
> problem can be solved symbolically (maple does it in < 1sec on my
> work desktop).
> Leo
>
>
> <session>
> Maxima 5.16.3 http://maxima.sourceforge.net
> Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) A : matrix([0, 0, -1, 0, 0, 0], [2, 0, 0, 0, 1, 0], [-4, 0, 0, -1,
> -1, 0], [0, -2, -1, 0, 0, -1], [1, 2, 0, 0, 0, 1], [-2, 1, 1, -2, 1,
> 0]);
> [ 0 0 - 1 0 0 0 ]
> [ ]
> [ 2 0 0 0 1 0 ]
> [ ]
> [ - 4 0 0 - 1 - 1 0 ]
> (%o1) [ ]
> [ 0 - 2 - 1 0 0 - 1 ]
> [ ]
> [ 1 2 0 0 0 1 ]
> [ ]
> [ - 2 1 1 - 2 1 0 ]
> (%i2) eigenvectors(A);
>
> Maxima encountered a Lisp error:
>
> Error in PROGN [or a callee]: Caught fatal error [memory may be
> damaged]
>
> Automatically continuing.
> To reenable the Lisp debugger set *debugger-hook* to nil.
> (%i3) eigenvalues(A);
> - 3/2
> sqrt(3) %i 1 3 sqrt(473) %i 1 1/3
> (%o3) [[(- ---------- - -) (------------------- + -)
> 2 2 2 2
> sqrt(3) %i 1
> 5 (---------- - -)
> 2 2 sqrt(3) %i 1
> + ------------------------------, (---------- - -)
> - 3/2 2 2
> 3 sqrt(473) %i 1 1/3
> 3 (------------------- + -)
> 2 2
> sqrt(3) %i 1
> - 3/2 5 (- ---------- - -)
> 3 sqrt(473) %i 1 1/3 2 2
> (------------------- + -) + ------------------------------,
> 2 2 - 3/2
> 3 sqrt(473) %i 1 1/3
> 3 (------------------- + -)
> 2 2
> - 3/2
> 3 sqrt(473) %i 1 1/3 5
> (------------------- + -) + ------------------------------], [2, 2,
> 2]]
> 2 2 - 3/2
> 3 sqrt(473) %i 1 1/3
> 3 (------------------- + -)
> 2 2
> </session>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima