Mathematica Asked by Hazoor Imran on December 7, 2020

I am trying to Plot Eigenvalues of a Hamiltonian, but I am getting noisy plot, which is incorrect. Here is the code.

```
A1 = {{0, 1, 0, 0}, {1, 0, 0, 0}, {0, 0, 0, -1}, {0, 0, -1, 0}};
A2 = {{0, -I, 0, 0}, {I, 0, 0, 0}, {0, 0, 0, -I}, {0, 0, I, 0}};
A3 = {{0, 0, 0, -1}, {0, 0, 1, 0}, {0, 1, 0, 0}, {-1, 0, 0, 0}};
A4 = {{0, -I, 0, 0}, {I, 0, 0, 0}, {0, 0, 0, I}, {0, 0, -I, 0}};
A5 = {{1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, -1}};
A6 = {{0, 0, 0, -I}, {0, 0, I, 0}, {0, -I, 0, 0}, {I, 0, 0, 0}};
A7 = {{0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}};
A8 = {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}};
H[d_, λ_, β_, m_] :=
a (Sin[x] A1 + Sin[ky] A2) + A3 β +
d A4 + (t Cos[z] + 2 b (2 - Cos[x] - Cos[ky])) A5 + α*
Sin[ky] A6 + λ Sin[z] A7+m*A8;
ky = 0;
a = 1;
b = 1;
t = 1.5;
α = 0.3;
Plot3D[Eigenvalues[H[0.1, 0.5, 0.7, 0]][[4]], {x, -π, π}, {z, 0, 2 π}]
```

Any help will be highly appreciated.

Not sure why you pick the 4th element, but maybe this will help:

```
ev4 = Eigenvalues[H[p, q, r, s]][[4]] /.
Thread[{p, q, r, s} -> {0.1, 0.5, 0.7, 0}];
Plot3D[ev4, {x, -π, π}, {z, 0, 2 π}]
```

Answered by Michael E2 on December 7, 2020

By default, the eigenvalues are ordered by absolute value. All the eigenvalues of this particular matrix have the *same* absolute value plus some rounding errors. Thus, it can easily happen, that the fourth eigenvalue is positive or negative, depending on the parameters.

You can use `Max`

to plot the largest eigenvalue:

```
Plot3D[[email protected][H[0.1, 0.5, 0.7, 0.]], {x, -Pi, Pi}, {z, 0, 2 Pi}]
```

Alternatively, you may use the `"Criteria"`

suboption of the Method `"Arnoldi"`

:

```
Plot3D[
Eigenvalues[
H[0.1, 0.5, 0.7, 0], -1,
Method -> {"Arnoldi", "Criteria" -> "RealPart"}
],
{x, - Pi, Pi}, {z, 0, 2 Pi}]
```

Answered by Henrik Schumacher on December 7, 2020

1 Asked on December 7, 2021

1 Asked on December 7, 2021

1 Asked on December 7, 2021

1 Asked on December 6, 2021

distributions numerical integration probability or statistics

1 Asked on December 6, 2021

2 Asked on December 6, 2021

1 Asked on December 2, 2021

2 Asked on December 2, 2021

1 Asked on November 30, 2021

3 Asked on November 30, 2021

1 Asked on November 28, 2021

2 Asked on November 28, 2021

differential equations equation solving nonlinear special functions

0 Asked on November 28, 2021

2 Asked on November 25, 2021

Get help from others!

Recent Answers

- Jon Church on Why fry rice before boiling?
- Joshua Engel on Why fry rice before boiling?
- Lex on Does Google Analytics track 404 page responses as valid page views?
- haakon.io on Why fry rice before boiling?
- Peter Machado on Why fry rice before boiling?

Recent Questions

- How Do I Get The Ifruit App Off Of Gta 5 / Grand Theft Auto 5
- Iv’e designed a space elevator using a series of lasers. do you know anybody i could submit the designs too that could manufacture the concept and put it to use
- Need help finding a book. Female OP protagonist, magic
- Why is the WWF pending games (“Your turn”) area replaced w/ a column of “Bonus & Reward”gift boxes?
- Does Google Analytics track 404 page responses as valid page views?

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir