# Trying to simplify Root expressions from the output of Eigenvalues

I am trying to calculate eigenvalues of a sparse matrix with only two distinct non-zero elements, here Alpha and Beta, which are both negative reals. Mathematica returns some complex expressions with Root[] values when using the Eigenvalues[] command on the following matrixA:

In all cases the matrices are symmetric and real and hence have real eigenvalues.

matrixA={
{α, β, 0, 0, 0, 0, β, 0, 0, β},
{β, α, β, 0, 0, 0, 0, 0, 0, 0},
{0, β, α, β, 0, 0, 0, 0, 0, 0},
{0, 0, β, α, β, 0, 0, 0, 0, 0},
{0, 0, 0, β, α, β, 0, 0, 0, 0},
{0, 0, 0, 0, β, α, β, 0, 0, 0},
{β, 0, 0, 0, 0, β, α, β, 0, 0},
{0, 0, 0, 0, 0, 0, β, α, β, 0},
{0, 0, 0, 0, 0, 0, 0, β, α, β},
{β, 0, 0, 0, 0, 0, 0, 0, β, α}
}


For comparison, with all the other similar matrices I've tried (see below e.g. matrixB) Mathematica will put out simple decimal approximations (using Eigenvalues[matrixB] // N // Simplify)

Can anyone point out a way to get expressions for the matrixA as simple as for matrixB?

And yes, the desired simple answers for matrixA do exist, I can get them with other programs, but I want to use Mathematica!

I should add that I already have already used $Assumptions = α<0 && β <0 at the top of my worksheet. matrixB={ {α, β, 0, 0, 0, 0, 0, 0, 0, β}, {β, α, β, 0, 0, 0, 0, 0, 0, 0}, {0, β, α, β, 0, 0, 0, β, 0, 0}, {0, 0, β, α, β, 0, 0, 0, 0, 0}, {0, 0, 0, β, α, β, 0, 0, 0, 0}, {0, 0, 0, 0, β, α, β, 0, 0, 0}, {0, 0, 0, 0, 0, β, α, β, 0, 0}, {0, 0, β, 0, 0, 0, β, α, β, 0}, {0, 0, 0, 0, 0, 0, 0, β, α, β}, {β, 0, 0, 0, 0, 0, 0, 0, β, α} }  - You don't need the //N for matrixB: there is an analytical solution. If the highest power of the eigenvalues for matrixA is higher than those for matrixB, they won't be "as simple". – Verbeia Mar 4 '12 at 22:54 ## 3 Answers The reason why you can't get a simple expression for eigenvalues is that the characterisitc polynomial of matrixA is not factorizable (in general) to lower order polynomials, unlike for matrixB. CharacteristicPolynomial[matrixA, x] // Factor  CharacteristicPolynomial[matrixB, x] // Factor  There is no general method of solving sixth order polynomial equations, unlike for forth order ones. In general, you can still simplify a bit the expression for eigenvalues of matrixA adding an option Quartics -> True to Eigenvalues : Eigenvalues[matrixA, Quartics -> True]  - Very interesting, thanks for the thorough explanation I should have known of. I'm still looking for numerical approximations, though. I have other software that gives the results, but I don't know how to replicate that in Mathematica. – William Kennerly Mar 5 '12 at 7:47 @WilliamKennerly Can you post the result that the other software gives you? – R. M. Mar 5 '12 at 7:59 @R.M Here you go. The answers are in the form (\Alpha - C\Beta), with the 10 values of C: -2.310 -1.652 -1.356 -0.887 -0.477 0.400 0.738 1.579 1.869 2.095 I'm sure that program is just doing a straight numerical diagonalization, say with LAPACK... so is there some way to get Mathematica to do that? – William Kennerly Mar 6 '12 at 0:40 I doubt this is really correct in general, it would be if the associated Galois group of the characteristic polynomial is solvable, which is not the case here. I suppose there is an implicit assumption of solvability of the group, this could be true only for special values of alpha and beta. Look for example mathworld.wolfram.com/QuinticEquation.html – Artes Mar 7 '12 at 1:06 Presumably those other systems are making some assumptions about the values of α and β, which Mathematica does not. Mathematica's symbolic engine does not assume that symbols represent real-valued quantities. You can probably get some simplification using the Assuming construct or the Assumptions option to Simplify and FullSimplify, like this: FullSimplify[Eigenvalues[matrixA], Assumptions -> {Element[α, Reals], Element[β, Reals]}]  Or even: FullSimplify[Eigenvalues[matrixA], Assumptions -> {α > 0, β > 0}]  The latter simplifies the first eigenvalue to: α - 1/4 (1 + Sqrt[5] + Sqrt[2 (11 + Sqrt[5])]) β However, some of the others are still higher-order expressions represented by Root expressions. - Thanks! I should have thought of FullSimplify[]... that gets 4 out of 10 of numerical approximations to the eigenvalues. So not all the way there yet. However I should have originally said that I do run the command $Assumptions=\[Alpha]<0 && \[Beta] <0 before I do any of the eigenvalue calculations. – William Kennerly Mar 5 '12 at 2:12

Well, I figured out how the other programs do get numeric answers. Of course the trick is to eliminate the symbols. Since matrixA is so simply structured it can be massaged into a non-symbolic form, calculate numerically the eigenvalues of that, and then unmassage them to recover the symbolic eigenvalues. Divide the whole matrix by β then "re-zero" the main diagonal to α/β.

For reference,

reducedmatrixA=({
{0, 1, 0, 0, 0, 0, 1, 0, 0, 1},
{1, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0},
{1, 0, 0, 0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 1, 0}
} )

numericeigenvalues = Sort[Eigenvalues[reducedmatrixA] // Simplify // N]
symboliceigenvalues = α + β numericeigenvalues


does the trick. Thanks everyone for your pointers on the algebra.

-
If all you want is the approximate numerical values, it is a lot quicker to calculate Sort[Eigenvalues[reducedmatrixA // N]] than Sort[Eigenvalues[reducedmatrixA] // Simplify // N] – Simon Mar 27 '12 at 1:48