0
$\begingroup$

I have expressions $\log\frac{z}{z-1}$ and $\frac{1}{z \left( 1 + W_0\left(-\frac{1}{e z}\right) \right)} $ visualized below. There's a branch cut along the Im[z]=0 plane, what is an efficient way to visualize their branch cuts in a 2D plot?

enter image description here

plotStieltjes[expr_] := 
 ParametricPlot3D[{x, y^3/(1/2)^2, 
   Im@expr /. z -> (x + I y^3/(1/2)^2)}, {x, -1/2, 3/2}, {y, -1/2, 
   1/2},
  PlotRange -> {Automatic, Automatic, {-5, 5}}, PlotPoints -> 25, 
  MaxRecursion -> 4,
  ColorFunction -> (ColorData["TemperatureMap"][
      Rescale[#3, {4, -4}, {0, 1}]] &), ColorFunctionScaling -> False,
   ExclusionsStyle -> {None, Directive[Red, Thick]},
  MeshFunctions -> {#3 &}, Mesh -> {Range[-3, 3, .5]}, 
  MeshStyle -> {{Opacity[0.5], Darker[Blue]}, {Opacity[0.3], Gray}},
  PlotStyle -> Directive[Specularity[White, 10], Opacity[0.95]],
  Exclusions -> {{Im[z] == 0} /. z -> x + I y}, 
  Lighting -> {{"Ambient", GrayLevel[0.3]}, {"Directional", White, 
     ImageScaled[{0, 0, 2}]}, {"Directional", White, 
     ImageScaled[{1, 1, 1}]}}, 
  AxesLabel -> {Style["Re[z]", FontSize -> 14, Bold], 
    Style["Im[z]", FontSize -> 14, Bold], 
    Style["Im[f(z)]", FontSize -> 14, Bold]}, BoxRatios -> {1, 1, 0.6},
   ViewPoint -> {-2.5, 2.5, 1.3}, ViewVertical -> {0, 0, 1}, 
  PlotTheme -> "Detailed", Background -> GrayLevel[0.95], 
  ImageSize -> Large, AxesStyle -> Directive[Black, Thickness[0.002]],
   Boxed -> False, FaceGrids -> None,
  Ticks -> {{0, 1}, None, {-Pi, 0, Pi}},
  BaseStyle -> {FontFamily -> "Helvetica"}]
plotStieltjes[Log[z/(z - 1)]]
plotStieltjes[1/(z (1 + ProductLog[-(1/(E z))]))]
$\endgroup$
10
  • 2
    $\begingroup$ How is this question different from your previous one? mathematica.stackexchange.com/questions/313994/… $\endgroup$ Commented Jun 10 at 21:57
  • $\begingroup$ @azerbajdzan "visualize their branch cuts in a 2D plot" $\endgroup$ Commented Jun 10 at 22:23
  • $\begingroup$ So you set z->x+0 I and plot it for {x,0,1}, no? $\endgroup$ Commented Jun 10 at 22:25
  • 2
    $\begingroup$ This question is similar to: Plotting branch-cuts along Re[z] line. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. $\endgroup$ Commented Jun 10 at 22:52
  • $\begingroup$ @DavidG.Stork this question is specific to a 2D plot of the branch cut $\endgroup$ Commented Jun 10 at 23:11

1 Answer 1

2
$\begingroup$

Use Limit[] to compute the boundary curves $w^*=b(x)$ of $w=f(z)$ and plot $(x,\text{Im}(w^*))$ parametrically.

FunctionSingularities[
  1/(z (1 + ProductLog[-(1/(E z))])), z, 
  Complexes] // Reduce
(*  (0 < Re[z] <= 1 && Im[z] == 0) || z == 0 || z == 1  *)

posedge = 
  Limit[1/(z (1 + ProductLog[-(1/(E z))])) /. z -> x + I y, y -> 0, 
   Direction -> "FromAbove", Assumptions -> 0 < x < 1];
line1 = Normal@ParametricPlot[{x, Im@posedge}, {x, 0, 1}];

negedge = 
  Limit[1/(z (1 + ProductLog[-(1/(E z))])) /. z -> x + I y, y -> 0, 
   Direction -> "FromBelow", Assumptions -> 0 < x < 1];
line2 = Normal@
   ParametricPlot[{x, Im@negedge}, {x, 0, 1}, 
    ColorFunction -> "Rainbow"];

Graphics[
 {AbsoluteThickness[2], Red,
  Line[
   Join[
     First@Cases[line1, Line[p_] :> p, Infinity], 
     First@Cases[line2, Line[p_] :> Reverse@p, Infinity]
     ] // Append[#, First@#] &
   ]
  }, PlotRange -> {{-0.5, 1.5}, {-4, 4}}, Axes -> True, 
 AspectRatio -> 0.7]

plot of the branch cut

Don't join the lines if you don't want the "asymptotes."

$\endgroup$
2
  • $\begingroup$ This does not work on version 13.0.1. The output for me is just the lower half of the branch cut. $\endgroup$ Commented Jun 12 at 10:44
  • $\begingroup$ @azerbajdzan Most likely there is a problem computing negedge, which is the same as posedge except for the branch ProductLog[-1,...] instead of ProductLog[...]. Maybe it's a bug in V13, because it seems a simple limit. I don't have V13, so I can't do anything but guess. $\endgroup$ Commented Jun 12 at 10:55

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.