Mathematica question - plotting an equation

  • Context: Mathematica 
  • Thread starter Thread starter kidsmoker
  • Start date Start date
  • Tags Tags
    Mathematica Plotting
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
kidsmoker
Messages
85
Reaction score
0
How could I use Mathematica to give me a plot of the locus of z such that

[tex]\arg(\frac{z-2}{z+5}) = \frac{\pi}{4}[/tex] ?

I've tried using ContourPlot and typing

ContourPlot[Arg[(x - 2 + I)/((x + 5) + I)] == (\[Pi]/4), {x, -5, 5}, {y, -5, 5}]

but it just gives me two vertical lines. I think the correct graph should be the arc of a circle passing through (-5,0) and (2,0).

Many thanks!
 
Physics news on Phys.org
Hi kidsmoker,

kidsmoker said:
How could I use Mathematica to give me a plot of the locus of z such that

[tex]\arg(\frac{z-2}{z+5}) = \frac{\pi}{4}[/tex] ?

I've tried using ContourPlot and typing

ContourPlot[Arg[(x - 2 + I)/((x + 5) + I)] == (\[Pi]/4), {x, -5, 5}, {y, -5, 5}]

but it just gives me two vertical lines. I think the correct graph should be the arc of a circle passing through (-5,0) and (2,0).

Many thanks!

I think the reason it is giving vertical lines is because you have left out the y variable in your Arg function. I believe it should be:

Arg[(x - 2 + y I)/((x + 5) + y I)]

Does that work?
 
Got it! Thanks very much :-)