0
$\begingroup$

I have three eigenvalues of a particular 3x3 matrix. Namely:

eigen1 = 1/3*(p + sig - u2/(2^(8/3)*sig) - 3*I*ω);
eigen2 = 1/3*(p - 1/2*(sig - u2/(2^(8/3)*sig)) + (I*Sqrt[3])/2*(sig + u2/(2^(8/3)*sig)) - 3*I*ω);
eigen3 = 1/3*(p - 1/2*(sig - u2/(2^(8/3)*sig)) - (I*Sqrt[3])/2*(sig + u2/(2^(8/3)*sig)) - 3*I*ω);

Where

p = (Γ + κ1 + κ2)/2;
u1 = 36 g1^2 (-2 p + 3 κ2) + (36 g2^2 + (2 p - 3 κ1) (2 p - 3 κ2)) (4 p - 3 (κ1 + κ2));
u2 = (2^(2/3)*(12 g1^2 + 12 g2^2 - 4 p^2 + 6 p (κ1 + κ2) - 3 (κ1^2 + κ1 κ2 + κ2^2)));
sig = ((u1 + Sqrt[u1^2 + u2^3])/16)^(1/3);

Now, I intend to make a density plot for all three eigenvalues on the same graph as a function of g1 and g2 with fixed parameters (Γ,κ1,κ2). However, the eigenvalues may or may not be complex (depending on the selection of parameters). My goal is to be able to illustrate a territory that demarcates the real and imaginary part of the eigenvalues.

I start by doing just for the first eigenvalue (eigen1)

DensityPlot[{Evaluate@eigen1 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]

and I was given something like thisthis

Whereas I am unable to show anything for the density plot for eigen2 with respect to g1, g2 and the same parameters

DensityPlot[{Evaluate@eigen2 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]

enter image description here

And finally, doing the same thing for eigen3 respectively gives

DensityPlot[{Evaluate@eigen3 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]

enter image description here

Notice that there are white spaces that permeates throughout all three plots and I'm not sure what's going on. My hunch is that the white spaces might correspond to complex components of the eigenvalues and hence DensityPlot was unable to show it.

Edit: Collecting the Real and Imaginary parts of the eigenvalues using Re[] and Im[]seems to do the trick in eliminating the white spaces.

DensityPlot[{Evaluate@Re[eigen2 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}]}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]

enter image description here

DensityPlot[{Evaluate@Im[eigen2 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}]}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]

enter image description here

And so forth (for eigen1 and eigen3). But it doesn't seem like the white spaces in the bad plots correspond to the Imaginary parts and I can't diagnose what the exact problem is here. Nonetheless, my issue now is that I wish to combine the Real and Imaginary parts of the eigenvalues in the same density plot for all 3 eigenvalues. But I'm struggling to combine just the Real and Imaginary parts of the same eigenvalue onto the same plot. Doing

DensityPlot[{Evaluate@Re[eigen2 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}],Evaluate@Im[eigen2 /. {Γ -> 0.01, κ1 -> 1, κ2 -> 5, ω -> 0}}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]

Will only show the Imaginary part of eigen2. Recall that the idea of doing this is to show the parameter space of the eigenvalues demarcated by real parts and imaginary parts of the eigenvalue on the same density plot. What should be my approach here?

$\endgroup$
  • 1
    $\begingroup$ Why combine together the real and imaginary part, when they can be reproduced separately and placed side by side? For example, {DensityPlot[{Evaluate@ Re[eigen2] /. {\[CapitalGamma] -> 0.01, \[Kappa]1 -> 1, \[Kappa]2 -> 5, \[Omega] -> 0}}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic], DensityPlot[{Evaluate@ Im[eigen2] /. {\[CapitalGamma] -> 0.01, \[Kappa]1 -> 1, \[Kappa]2 -> 5, \[Omega] -> 0}}, {g1, 0, 10}, {g2, 0, 10}, PlotRange -> All, PlotLegends -> Automatic]} $\endgroup$ – Alex Trounev Sep 26 '18 at 2:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.