Re: Root function
- To: mathgroup at smc.vnet.net
- Subject: [mg51031] Re: [mg51009] Root function
- From: "David Park" <djmp at earthlink.net>
- Date: Sat, 2 Oct 2004 03:18:01 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Mathematica is giving you exact answers as the various roots of cubic equations. To obtain approximate roots you can add N. Eigensystem[{{-1, 1, 0, 0}, {1, -2, 1, 0}, {0, 1, -2, 0}, {0, 0, 1, 0}}] // N {{-3.24698, -1.55496, -0.198062, 0.}, {{-1.80194, 4.04892, -3.24698, 1.}, {1.24698, -0.692021, -1.55496, 1.}, {-0.445042, -0.356896, -0.198062, 1.}, {0., 0., 0., 1.}}} Or, in this case, if you want an exact answer you could use Eigensystem[{{-1, 1, 0, 0}, {1, -2, 1, 0}, {0, 1, -2, 0}, {0, 0, 1, 0}}] // ToRadicals (output omitted) David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Ben [mailto:bmauer at wisc.edu] To: mathgroup at smc.vnet.net When I try to diagonalize this matrix in mathematica 5: Eigensystem[{{-1, 1, 0, 0}, {1, -2, 1, 0}, {0, 1, -2, 0}, {0, 0, 1, 0}}] I get this ugly mess \!\({{Root[1 + 6\ #1 + 5\ #1\^2 + #1\^3 &, 1], Root[1 + 6\ #1 + 5\ #1\^2 + #1\^3 &, 2], Root[ 1 + 6\ #1 + 5\ #1\^2 + #1\^3 &, 3], 0}, {{\(-1\) - 3\ Root[1 + 6\ #1 + 5\ #1\^2 + #1\^3 &, 1] - Root[1 + 6\ #1 + etc etc etc Mathematica 4 gives me the right answer. How do I get v5 to not spit this out and what does it mean?