If I ask Mathematica to find the eigenvectors and eigenvalues of the matrix:
mat := {{a, b, c}, {b, d, e}, {c, e, f}}
Assuming[{a > 0, b > 0, c > 0, d > 0, e > 0, f > 0}, Eigenvalues[mat]]
Assuming[{a > 0, b > 0, c > 0, d > 0, e > 0, f > 0}, Eigenvectors[mat]]
If returns stuff like
{Root[c^2 d - 2 b c e + a e^2 + b^2 f -
a d f + (-b^2 - c^2 + a d - e^2 + a f + d f) #1 + (-a - d -
f) #1^2 + #1^3 &, 1],
Root[c^2 d - 2 b c e + a e^2 + b^2 f -
a d f + (-b^2 - c^2 + a d - e^2 + a f + d f) #1 + (-a - d -
f) #1^2 + #1^3 &, 2],
Root[c^2 d - 2 b c e + a e^2 + b^2 f -
a d f + (-b^2 - c^2 + a d - e^2 + a f + d f) #1 + (-a - d -
f) #1^2 + #1^3 &, 3]}
But if I ask Wolfram Alpha:

It does it. What am I doing wrong in Mathematica?
Answer
Use
Eigenvalues[mat, Cubics -> True]
Eigenvectors[mat, Cubics -> True]
sometimes Quartics -> Truecan be needed.
or
ToRadicals @ Eigenvalues[ mat]
ToRadicals @ Eigenvectors[ mat]
In general one cannot find roots (of higher order) polynomials in terms of radicals. The reason that Mathematica allows this option is that in general it is convenient to decide whether output (sometimes very large) is needed. For a matrix 2 x 2 it yields automatically the result in terms of radicals :
Eigenvalues[{{a, b}, {c, d}}]
{1/2 (a + d - Sqrt[a^2 + 4 b c - 2 a d + d^2]), 1/2 (a + d + Sqrt[a^2 + 4 b c - 2 a d + d^2])}
because it is quite simple, but the first eigenvalue of your matrix is slightly more involved :
Eigenvalues[ mat, Cubics -> True][[1]]

So these options are certainly convenient to choose whether one prefers the results in terms of Root objects or it terms of radicals.
Comments
Post a Comment