1
$\begingroup$

I have the following functions e1, e2, and e3 which consists of the functions p, u1c, u2c, and sigc

p = (Γ + κ1 + κ2)/2;
u1c = -36 g1^2 (-2 p + 3 κ2) - (36 g2^2 + (2 p - 3 κ1) (2 p - 3 κ2)) (4 p - 3 (κ1 + κ2));
u2c = 2^(2/3)*(12 g1^2 + 12 g2^2 - 4 p^2 + 6 p (κ1 + κ2) - 3 (κ1^2 + κ1 κ2 + κ2^2));
sigc = (u1c + Sqrt[u1c^2 + u2c^3])^(1/3);

e1 = -(1/3)*(p + u2c/(2^(4/3)*sigc) - 1/2^(4/3)*sigc);
e2 = -(1/3)*(p + E^(-I*π/3)*sigc/2^(4/3) - E^(I*π/3)*u2c/(2^(4/3)*sigc));
e3 = -(1/3)*(p + E^(I*π/3)*sigc/2^(4/3) - E^(-I*π/3)*u2c/(2^(4/3)*sigc));

I intend to plot the real part of e1, e2, and e3 by fixing the parameters κ1, κ2, Γ, and g2 as a function of g1.

ree1 = (Re[ComplexExpand[e1]]) /. {Γ -> 0.01, κ1 -> 1.0, κ2 -> 20, g2 -> 4.8}
ree2 = (Re[ComplexExpand[e2]]) /. {Γ -> 0.01, κ1 -> 1.0, κ2 -> 20, g2 -> 4.8}
ree3 = (Re[ComplexExpand[e3]]) /. {Γ -> 0.01, κ1 -> 1.0, κ2 -> 20, g2 -> 4.8}

Upon plotting

Plot[{Evaluate@ree1, Evaluate@ree2, Evaluate@ree3}, {g1, 0, 10}, PlotRange -> All, ImageSize -> Large, PlotPoints -> 100, PlotStyle -> {Directive[Black], Directive[Red, Dashed], Directive[Blue, Dotted, Thick]}]

I am returned withenter image description here

There is a peculiar behavior with ree1 (black curve) in that it jumps around g1 = 3 (x-axis), something that shouldn't happen. I tried only plotting ree1 and I have that enter image description here

Given that I have already specified for only Real parts of e1, there shouldn't be any discontinuity. I suspect that this has to do with sigc since there is a radical in there followed by an overall cube root and Mathematica probably doesn't know which root to take when the quantity in the radical becomes less than 0 (taking the cube root of a complex number). I know that the final plot should display the curves with no discontinuities and it is likely that the red and black curves swapped positions at around g1 = 3. How should I go about remedying this problem?

Edit: I have tried using Surd but it does not work when the quantity inside the cube root in sigc is complex since Surd only takes in real valued quantities.

$\endgroup$

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.