Discrepancy between eigenvalues and eigenvectors derived from analytical solution and matlab code.
1 view (last 30 days)
Show older comments
mohammad mortezaie
on 23 Jul 2021
Commented: mohammad mortezaie
on 26 Jul 2021
Hello,
I have this matrix [ep+V/2 t*phi; t*conj(phi) eb-V/2].
The analytical solution for eigenvalues of this matrix is E=(eb+ep)/2+v*sqrt((eb-ep+V)/2+t^2*|phi|^2).
But matlab solution is different from this.
Can someone help me for solve this chalenge?
2 Comments
Accepted Answer
Chunru
on 23 Jul 2021
Edited: Chunru
on 23 Jul 2021
First, the sign in the last element of H should be '-' rather than '+' as in your question. Second, "doc eig" command for the order of output variables. Third, make sure your analytical result is correct. Try manual simplification then. You may want to verify the symbolic expressions with some numerical values to see if they agree.
syms eb ep t V phi
H=[ep+V/2 t*phi; t*conj(phi) eb-V/2]
[v,d]=eig(H) % not [E, v]
More Answers (1)
Steven Lord
on 23 Jul 2021
syms eb ep t V phi
H=[ep+V/2 t*phi; t*conj(phi) eb+V/2]
[E,v]=eig(H)
Let's check if the elements in E and v satisfy the definition of the eigenvectors and eigenvalues for H.
simplify(H*E-E*v)
The elements in E and v satisfy the definition of the eigenvectors and eigenvalues for H, so they are eigenvectors and eigenvalues of H. What did you say you expected the eigenvalues to be?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/693569/image.png)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!