# Why is EigenValues returning Root expressions?

This is the code I have:

\[Epsilon]s = -13.6;
\[Epsilon]so = -29.1;
\[Epsilon]p = -14.1;
ss\[Sigma] = -7.20;
sp\[Sigma] = 9.46;

\[Theta] = ((\[Pi] - \[Beta])/2);

Hmatrix0[\[Theta]_] =
{
{\[Epsilon]s, 0, ss\[Sigma], Cos[\[Theta]]*sp\[Sigma], -Sin[\[Theta]]*sp\[Sigma], 0},
{0, \[Epsilon]s, ss\[Sigma], -Cos[\[Theta]]*sp\[Sigma], -Sin[\[Theta]]*sp\[Sigma], 0},
{ss\[Sigma], ss\[Sigma], \[Epsilon]so, 0, 0, 0},
{Cos[\[Theta]]*sp\[Sigma], -Cos[\[Theta]]*sp\[Sigma], 0, \[Epsilon]p, 0, 0},
{-Sin[\[Theta]]*sp\[Sigma], -Sin[\[Theta]]*sp\[Sigma], 0, 0, \[Epsilon]p, 0},
{0, 0, 0, 0, 0, \[Epsilon]p}
}

Eigenvalues[Hmatrix0[\[Theta]]]


This is a sample of one of the eigenvalues:

Root[(38319.6 + 0. I) - 130827. Cos[[Beta]] - 116527. Cos[2 [Beta]] + (120228. - 9278.49 Cos[[Beta]] - 4004.37 Cos[2 [Beta]]) #1 + (29612. + 9.09495*10^-13 Cos[[Beta]]) #1^2 + 2480.29 #1^3 + 84.5 #1^4 + 1. #1^5 &, 1]

I wish to plot the eigenvalues as a function of beta as it ranges from $\frac{\pi}{2}$ to $\pi$ but I don't know what those hashes are and putting N[hmatrix0[$\beta$]] doesn't work.

-
You forgot to define \[Beta]; N will work if it is numerically defined. – Mr.Wizard Mar 14 at 5:36
– Mr.Wizard Mar 14 at 5:36
@Mr.Wizard, how do I make beta a variable that ranges from pi/2 to pi? – user17338 Mar 14 at 5:44
@Mark please make that an answer; there's no point sticking it in the question like that. :-) – Mr.Wizard Mar 14 at 5:57
Those aren't "hashtags" - look up Slot in the documentation. – Verbeia Mar 14 at 5:57

First, you need to keep your $\theta$s and $\beta$s straight. Let's define the matrix in terms of $\theta$ and worry about the relationship with $\beta$ in a bit.

epss = -13.6;
epsso = -29.1;
epsp = -14.1;
sssigma = -7.20;
spsigma = 9.46;
Hmatrix0[theta_] = {
{epss, 0, sssigma, Cos[theta]*spsigma, -Sin[theta]*spsigma, 0},
{0, epss, sssigma, -Cos[theta]*spsigma, -Sin[theta]*spsigma, 0},
{sssigma, sssigma, epsso, 0, 0, 0},
{Cos[theta]*spsigma, -Cos[theta]*spsigma, 0, epsp, 0, 0},
{-Sin[theta]*spsigma, -Sin[theta]*spsigma, 0, 0, epsp, 0},
{0, 0, 0, 0, 0, epsp}
};


Now, we can make your plot as follows.

Plot[Evaluate[Eigenvalues[Hmatrix0[(Pi - theta)/2]]],
{theta, Pi/2, Pi}, PlotStyle -> Thick]


-