Artifact in conformal mapping using ParametricPlot

Update: A less kludgy workaround, which I thought I had already tried.

ParametricPlot[
 Evaluate@ Simplify@ ComplexExpand@ Through[{Re, Im}[1/(Exp[u + v I] + 1)]],
 {u, -5, 5}, {v, 0, 2 Pi},
 PlotRange -> {{-2, 2}, {-2, 2}}, Mesh -> {100, Round[100 2 Pi/10]}, 
 Axes -> False, ImageSize -> Large, 
 MeshShading -> {{Yellow, Orange}, {Pink, Red}}]

Mathematica graphics

Numerically checking this function with the OP's at a few points throughout the domain show they evaluate to the same numbers. I think this must be a bug.


Original workaround:

Show[
 ParametricPlot[
  Evaluate@ComplexExpand@Through[{Re, Im}[1/(Exp[u + v I] + 1)]],
  {u, -5, 5}, {v, Pi + 0.00001, 2 Pi},
  PlotRange -> {{-2, 2}, {-2, 2}}, 
  Mesh -> {100, Round[0.5 100 2 Pi/10]}, Axes -> False, 
  ImageSize -> Large, MeshShading -> {{Yellow, Orange}, {Pink, Red}}, 
  BoundaryStyle -> None],
 ParametricPlot[
  Evaluate@ComplexExpand@Through[{Re, Im}[1/(Exp[u + v I] + 1)]],
  {u, -5, 5}, {v, 0, Pi}, 
  PlotRange -> {{-2, 2}, {-2, 2}}, 
  Mesh -> {100, Round[0.5 100 2 Pi/10]}, Axes -> False, 
  ImageSize -> Large, MeshShading -> {{Yellow, Orange}, {Pink, Red}}]
 ]

Here is a workaround that hinges on the built-in LogisticSigmoid[] function:

ParametricPlot[ReIm[LogisticSigmoid[-u - I v]], {u, -5, 5}, {v, 0, 2 Pi}, 
               PlotRange -> 2, Mesh -> {100, Round[100 2 Pi/10]}, Axes -> False, 
               ImageSize -> Large, MeshShading -> {{Yellow, Orange}, {Pink, Red}}]

correct conformal map

That the behavior in the OP is a clear bug can be demonstrated by expanding out the LogisticSigmoid[] function:

ParametricPlot[ReIm[LogisticSigmoid[-u - I v]] // FunctionExpand // Evaluate,
               {u, -5, 5}, {v, 0, 2 Pi}, PlotRange -> 2, Mesh -> {100, Round[100 2 Pi/10]},
               Axes -> False, ImageSize -> Large,
               MeshShading -> {{Yellow, Orange}, {Pink, Red}}]

and the erroneous plot in the OP is reproduced.

Tags:

Plotting

Bugs