0

Is ParametricPlot3D the best way to plot complex functions to find solutions?

The algebra for $e^z = 2 i$ tells me that there are infinite solutions at $\frac{\pi}{2} + 2 n \pi$ for all $n \in \mathbb{N}$.

So I do this

three = ParametricPlot3D[{z, Re[E^z], Im[E^z]}, {z, -5, 5}, PlotStyle -> {{Red}}];
four = ParametricPlot3D[{z, Re[2 I], Im[2 I]}, {z, -5, 5}, PlotStyle -> {{Blue}}];
Show[three, four]

and get

e^z=2i

What happened to the $2i$? I'm expecting to see two lines that periodically intersect.

Should I not be using ParametricPlot3D at all?

Marty B.
  • 133
  • 3

2 Answers2

3

I tend to use ContourPlot[] instead.

ContourPlot[With[{z = x + I y}, {Re[Exp[z] - 2 I], Im[Exp[z] - 2 I]}] // Evaluate,
            {x, 0, π}, {y, -3 π, 3 π}, AspectRatio -> Automatic,
            Contours -> {0}, ContourShading -> False]

zeroes of a complex function

(See this related thread as well.)

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
1

Just to show analytic and plot solutions:

Reduce[{Exp[x] Sin[y] == 2, Cos[y] == 0}, {x, y}, Reals]
lp = ListPlot[tb = Table[{Log[2], Pi/2 + 2 Pi j}, {j, -2, 2, 1}], 
   PlotMarkers -> {Automatic, 10}, PlotStyle -> Red];
cplot = ContourPlot[
   Through[{Re, Im@# - 2 &}[Exp[x + I y]]], {x, 0, Pi}, {y, -3 Pi, 
    3 Pi}, Contours -> {0}, ContourShading -> None, 
   GridLines -> {{Log[2]}, None}, 
   FrameTicks -> {Range[0, Pi, Pi/2], Range[-7 Pi/2, 7 Pi/2, Pi/2]}];
Show[cplot, lp]

enter image description here

ubpdqn
  • 60,617
  • 3
  • 59
  • 148