0
$\begingroup$

So I have to generate a few different plots with z, where z is a complete number...

z[x_, y_] := x + y*I
F[z_] := (25*Pi*z*I)/(1 + 10*Pi*z*I)

First, I need to graph u(x,y) and v(x,y) which are the real and complex parts of F(z), respectively. My confusion lies in how to make it so the plot is in terms of x and y as opposed to z and F(z)...

When trying to graph the code below, nothing shows up...

 ContourPlot[{(z[x, y])*(Conjugate[z[x, y]] + 2) == 3}, {x, -100, 
  100}, {y, -100, 100}, PlotTheme -> "Scientific"]

Thank you!

$\endgroup$
3
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$
    – bbgodfrey
    Feb 27, 2015 at 21:18
  • $\begingroup$ Check the documentation for SetDelayed to better understand the use of :=. In that context, replace F[z] by F[z_] in your second line of code. $\endgroup$
    – bbgodfrey
    Feb 27, 2015 at 21:21
  • $\begingroup$ You defined a function called z[x_,y_] that takes 2 argument. But then on next line below it, you wrote z with no arguments. ?? $\endgroup$
    – Nasser
    Feb 27, 2015 at 21:24

1 Answer 1

1
$\begingroup$

Starting with your code, corrected as in my comment,

z[x_, y_] := x + y*I 
F[z_] := (25*Pi*z*I)/(1 + 10*Pi*z*I)

you can plot the imaginary part of F as follow

ContourPlot[Im[F[z[x, y]]], {x, -.2, .2}, {y, -.2, .2},  PlotRange -> All, 
  Contours -> Range[-5, 5, .5], ContourLabels -> True]

enter image description here

and similarly for other quantities. Many different types of plots are available.

$\endgroup$
3
  • $\begingroup$ Ah! So you can have both of them with added underscore - I thought this would mess up redefining z when x and y are being redefined. I read the definitions - makes much more sense now. Thank you! $\endgroup$ Feb 27, 2015 at 23:00
  • $\begingroup$ When I've tried this however nothing shows up on the plot ContourPlot[{(z[x, y])*(Conjugate[z[x, y]] + 2) == 3}, {x, -100, 100}, {y, -100, 100}, PlotTheme -> "Scientific"] $\endgroup$ Feb 28, 2015 at 2:42
  • $\begingroup$ Remember that ContourPlot cannot handle complex numbers. ContourPlot[Re[z[x, y] (Conjugate[z[x, y]] + 2)] == 3, {x, -100, 100}, {y, -100, 100}] plots a small circle. $\endgroup$
    – bbgodfrey
    Feb 28, 2015 at 12:58

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