4
$\begingroup$

I want to plot the following complex numbers $$z \in \text{(complex numbers)}:\pi/4 < \arg (z) \leq 5 \pi/4,\ 1 \leq |z| < 2 $$

I don't know how to graph it so that it would look like 2D without any unecessary details. The closest approach I found is parametric function plotting. I tried to use ContourPlot to graph it, but I just can't seem to do it...

ContourPlot[
 Im[F[z[x, y]]], 
 {3 pi/4 < arg (z) <= 5 pi/4, 
  1 <= abs (z) < 2}, 
 {x, -.2, .2}, {y, -.2, .2}, 
 PlotRange -> All, 
 Contours -> Range[-5, 5, .5], 
 ContourLabels -> True
]

Does anybody know how to graph my set?

$\endgroup$
4
$\begingroup$

With correct Mathematica syntax and increased range of x,y RegionPlot solves your problem:

RegionPlot[ 3 Pi/4 < Arg[x + I y] <= 5 Pi/4 && 1 <= Abs [x + I y] < 2 , {x, - 2,2}, {y, - 2, 2} ]

enter image description here

addendum

Thanks to the comment @Bili Debili: Arg returns angle in the range -Pi...Pi, that's why the condition 3 Pi/4 < Arg[x + I y] <= 5 Pi/4 has to be changed

RegionPlot[3 Pi/4 < Abs[Arg[ x + I y]] <= Pi &&1 <= Abs [x + I y] < 2 , {x, - 2, 2}, {y, - 2, 2} ,FrameLabel -> {x, y}]

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Shouldn't the function also go into the third quadrant ? $\endgroup$ – Bili Debili Nov 21 at 14:07
  • 1
    $\begingroup$ That's right, thanks. Arg[…] lies in the range -Pi,Pi $\endgroup$ – Ulrich Neumann Nov 21 at 14:18
3
$\begingroup$
ParametricPlot[
 ReIm[r*Exp[I*θ]], {θ, π/4, (5 π)/4}, {r, 1, 2},
  MeshFunctions -> {#3 &, #4 &}, 
 Mesh -> {{{π/4, {Thick, Blue, Dashed}}, {(5 π)/
     4, {Thick, Blue}}}, {{1, {Thick, Red}}, {2, {Thick, Red, 
      Dashed}}}}, BoundaryStyle -> None, PlotStyle -> Yellow]

enter image description here

| improve this answer | |
$\endgroup$
3
$\begingroup$

One more way is as follows.

ComplexRegionPlot[ Pi/4 < Arg [z] <= 5 Pi/4 && 1 <= Abs [z] < 2, {z, -2 - 0*I, 2 + 2*I},AspectRatio->Automatic]
| improve this answer | |
$\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.