2
$\begingroup$

In order to find the behavior of a complex-valued function at an essential singularity, I want to plot $|e^{1/z}|= s$ for $s \in \mathbb{R}$, say for $s= 1, 1/2$. Following is the code but it doesn't show an output.

ContourPlot[{
  Abs[Exp[1/z]] == 1,
  Abs[Exp[1/z]] == 1/2}, 
{z, -3 - 3 I, 3 + 3 I}, 
ContourStyle -> {Blue, Red},
FrameLabel -> {"Re(z)", "Im(z)"},
PlotLegends -> {"|e^(1/z)| = 1", "|e^(1/z)| = 1/2"}
]

Any help in getting the desired output is much appreciated.


Edit : I tried the suggested answer but it still doesn't show an output. enter image description here

$\endgroup$
0

1 Answer 1

4
$\begingroup$

Edit

For the old version (before 12.1) we can use

Clear["Global`*"]; 
Block[{z = x + I*y}, 
 ContourPlot[
  Abs[Exp[1/z]] == {1, 1/2, 1/3, 1/4, 1/5} // Thread // 
   Evaluate, {x, -3, 3}, {y, -3, 3}, ContourStyle -> Automatic]]
  • For complex functions ,we using ComplexContourPlot.
ComplexContourPlot[
 Abs[Exp[1/z]] == {1, 1/2, 1/3, 1/4, 1/5} // Thread // 
  Evaluate, {z, -3 - 3 I, 3 + 3 I}, ContourStyle -> Automatic]

enter image description here

$\endgroup$
4
  • $\begingroup$ thank you very much for the prompt response. I've edited the question as I still didn't get an output. $\endgroup$
    – Eureka
    Oct 11, 2023 at 0:01
  • 1
    $\begingroup$ @Eureka see the updated. $\endgroup$
    – cvgmt
    Oct 11, 2023 at 7:47
  • $\begingroup$ many thanks ! Will it be possible to put a label corresponding to each curve with the respective $s$ value ? $\endgroup$
    – Eureka
    Oct 11, 2023 at 20:29
  • $\begingroup$ @Eureka Maybe Block[{z = x + I*y}, ContourPlot[Abs[Exp[1/z]], {x, -2, 2}, {y, -2, 2}, Contours -> {1, 1/2, 1/3, 1/4, 1/5}, ContourStyle -> ColorData[97] /@ Range[5], ContourLabels -> All, ContourShading -> None]] $\endgroup$
    – cvgmt
    Oct 12, 2023 at 2:25

Your Answer

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

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