0
$\begingroup$

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?

$\endgroup$
2
  • $\begingroup$ Show[three, four, PlotRange -> All, BoxRatios -> {1, 1, 1}] $\endgroup$
    – Bob Hanlon
    Nov 14 '15 at 15:00
  • $\begingroup$ Your algebra is wrong - you're plotting for real z when the solutions are imaginary: Log[2] I (Pi / 2 + 2 Pi n) $\endgroup$
    – LLlAMnYP
    Nov 14 '15 at 15:06
3
$\begingroup$

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.)

$\endgroup$
1
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.