3
$\begingroup$

This is the code I have:

ϵs = -13.6;
ϵso = -29.1;
ϵp = -14.1;
ssσ = -7.20;
spσ = 9.46;

θ = ((π - β)/2);

Hmatrix0[θ_] = 
{
  {ϵs, 0, ssσ, Cos[θ]*spσ, -Sin[θ]*spσ, 0}, 
  {0, ϵs, ssσ, -Cos[θ]*spσ, -Sin[θ]*spσ, 0}, 
  {ssσ, ssσ, ϵso, 0, 0, 0}, 
  {Cos[θ]*spσ, -Cos[θ]*spσ, 0, ϵp, 0, 0}, 
  {-Sin[θ]*spσ, -Sin[θ]*spσ, 0, 0, ϵp, 0}, 
  {0, 0, 0, 0, 0, ϵp}
}

Eigenvalues[Hmatrix0[θ]]

This is a sample of one of the eigenvalues:

Root[(38319.6 + 0. I) - 130827. Cos[β] - 116527. Cos[2 β] + (120228. - 9278.49 Cos[β] - 4004.37 Cos[2 β]) #1 + (29612. + 9.09495*10^-13 Cos[β]) #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.

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

1 Answer 1

10
$\begingroup$

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]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.