Mathematica question - plotting an equation

  • Context: Mathematica 
  • Thread starter Thread starter kidsmoker
  • Start date Start date
  • Tags Tags
    Mathematica Plotting
Click For Summary
SUMMARY

The discussion centers on plotting the locus of the complex variable z in Mathematica, specifically for the equation \arg(\frac{z-2}{z+5}) = \frac{\pi}{4}. The user initially attempted to use ContourPlot with an incorrect formulation, resulting in vertical lines. The correct approach involves including the imaginary component by using Arg[(x - 2 + y I)/((x + 5) + y I)], which accurately represents the desired arc of a circle passing through the points (-5,0) and (2,0).

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of complex numbers and their representation
  • Knowledge of the Arg function in complex analysis
  • Experience with ContourPlot for visualizing mathematical functions
NEXT STEPS
  • Explore advanced plotting techniques in Mathematica
  • Learn about complex number manipulation in Mathematica
  • Study the properties of the Arg function in complex analysis
  • Investigate the use of ParametricPlot for complex loci
USEFUL FOR

Mathematics students, educators, and anyone using Mathematica for complex analysis and visualization of mathematical functions.

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

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K