1
$\begingroup$

I'm working in the plotting the branch cut of a complex function, namely:

$w(z) = (2+z) \ln(2+z) - 2(1+z) \ln(1+z) + z \ln z$.

To do so, I have tried this:

Plot3D[Re[(2 + (x + I y)) Log[2 + (x + I y)] - 
2 (1 + (x + I y)) Log[
1 + (x + I y)] + (x + I y) Log[(x + I y)]], {x, -3, 3}, {y, -3, 
3}, PlotRange -> All]

There is a white blank on the plot from $-3$ to $-2$ which is NOT due to the branch cut, and shouldn't be there:

enter image description here

How to remove this "extra white line"? (I'd like to have the branch cut as a white line, that is to keep the white line from $−2$ to $0$. How can I remove the white line from $−3$ to $-2$ which is not a branch cut and I don't know why Mathematica produces it.)

Edit:

The contour plot also gives the same bad result:

With[{z = x + I y}, 
ContourPlot[
Re[(2 + z) Log[2 + z] - 2 (1 + z) Log[1 + z] + z Log[z]], {x, -3, 
3}, {y, -3, 3}, Contours -> Range[-4, 2, .1], 
ColorFunction -> (ColorData["Rainbow"][Rescale[#, {-2, 1}]] &), 
ColorFunctionScaling -> False, PlotRange -> All]]

enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

Try ParametricPlot3D:

myf[z_] := (2 + z) Log[2 + z] - 2 (1 + z) Log[1 + z] 
     + z Log[z];
p1 = ParametricPlot3D[{Re[z], Im[z], Re[myf[z]]} /. 
    z -> r Exp[I t], {r, 0, 3}, {t, -Pi, Pi}];
p2 = ParametricPlot3D[{Re[z], Im[z], Re[myf[z]] + 
   0.02} /.z -> r Exp[Pi I], {r, 0, 2}, 
   PlotStyle -> {Thickness[0.005], White}];
Show[{p1, p2}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.