1
$\begingroup$

When I try to sort the eigenvalues of the matrix (Rho) the results seems to be in the wrong order

enter image description here

What is wrong with my code?

Rm = {{E^(-2 I t \[Sigma] - 
       2 t \[Gamma] \[Sigma]^2) \[Kappa] \[Mu]^2 + 
     E^SuperStar[(-2 I t \[Sigma] - 2 t \[Gamma] \[Sigma]^2)]
       SuperStar[\[Kappa]] (SuperStar[\[Mu]])^2, -I E^(-2 I t \
\[Sigma] - 2 t \[Gamma] \[Sigma]^2) \[Kappa] \[Mu]^2 + 
     I E^SuperStar[(-2 I t \[Sigma] - 2 t \[Gamma] \[Sigma]^2)]
       SuperStar[\[Kappa]] (SuperStar[\[Mu]])^2, 
    0}, {-I E^(-2 I t \[Sigma] - 
       2 t \[Gamma] \[Sigma]^2) \[Kappa] \[Mu]^2 + 
     I E^SuperStar[(-2 I t \[Sigma] - 2 t \[Gamma] \[Sigma]^2)]
       SuperStar[\[Kappa]] (SuperStar[\[Mu]])^2, -E^(-2 I t \[Sigma] \
- 2 t \[Gamma] \[Sigma]^2) \[Kappa] \[Mu]^2 - 
     E^SuperStar[(-2 I t \[Sigma] - 2 t \[Gamma] \[Sigma]^2)]
       SuperStar[\[Kappa]] (SuperStar[\[Mu]])^2, 0}, {0, 0, 
    E^(2 I t \[Sigma] - 2 t \[Gamma] \[Sigma]^2) \[Kappa] \[Mu] + 
     E^(2 I t \[Sigma] - 2 t \[Gamma] \[Sigma]^2) \[Kappa]^2 \[Mu]^2}};
Rho = Rm\[ConjugateTranspose].Rm ;
{\[Epsilon]1, \[Epsilon]2, \[Epsilon]3} = 
  Sort[Eigenvalues[Rho], Greater];
\[Sigma] = Sqrt[(J*\[ScriptV])^2 + B^2]; \[Mu] = 
 B - \[Sigma]; \[Kappa] = B + \[Sigma]; \[ScriptV] = 5/100;
       J = 1; \[Gamma] = 1/10; B = 0; t = 20;
\[Epsilon]1  // FullSimplify
\[Epsilon]2 // FullSimplify
\[Epsilon]3 // FullSimplify
$\endgroup$
3
  • $\begingroup$ Can you compare the behavior of Sort[{1, 2, 3}, Greater] and Sort[{1, 2, 3}, Less] and state which order you like better? $\endgroup$ – Arnoud Buzing Apr 17 '20 at 21:12
  • $\begingroup$ According to the code, the results should be E1>E2>E3. @Arnoud Buzing $\endgroup$ – Ragab Zidan Apr 17 '20 at 21:35
  • 1
    $\begingroup$ I note that you did the sorting before you substituted numerical values for your parameters. It is possible that Sort[] did little to no sorting of the symbolic eigenvalues, since Greater[] wouldn't really know what to do with things that aren't numbers. $\endgroup$ – J. M.'s ennui Apr 18 '20 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.