Mathematica Mathematica question - plotting an equation

AI Thread Summary
To plot the locus of z in Mathematica for the equation arg((z-2)/(z+5)) = π/4, the user initially attempted to use ContourPlot but only obtained vertical lines. A suggestion was made to include the y variable in the Arg function, changing it to Arg[(x - 2 + y I)/((x + 5) + y I)]. After implementing this correction, the user confirmed that it resolved the issue. The discussion highlights the importance of including all relevant variables in mathematical functions for accurate plotting.
kidsmoker
Messages
85
Reaction score
0
How could I use Mathematica to give me a plot of the locus of z such that

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

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

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

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

Similar threads

Replies
4
Views
2K
Replies
2
Views
2K
Replies
2
Views
1K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Back
Top