0
$\begingroup$
eqn[x1_, y1_, x2_, y2_, a1_, a2_] := 
  ((a1 + I a2) - (x2 + I y2))/(((x1 + I y1)(x2+ I y2)) - (a1 + I a2)) 

How can I plot the eqn? I need contour plot for different a1 + I a2.

I tried following:

 {ContourPlot[Re @ eqn[x1, y1, x2, y2, 3, 4], {x1, -1, 1}, {y1, -1, 1}, 
    PlotPoints -> 50], 
  ContourPlot[Im @ eqn[x1, y1, x2, y2, 3, 4], {x2, -1, 1}, {y2, -1, 1}, 
    PlotRange -> {-0.5, 0.5}, PlotPoints -> 50]}

but failed to get something.

$\endgroup$
  • 2
    $\begingroup$ 1. Remove the underscores in your ContourPlot[] 2. You can only have two things varying at a time in ContourPlot[], so you need to fix the other four parameters to certain values. $\endgroup$ – J. M. is in limbo Jul 7 '15 at 14:49
  • $\begingroup$ What you are asking for -- a complex contour plot of a function of three complex variables -- doesn't exist in Mathematica (and AFAIK anywhere else). $\endgroup$ – m_goldberg Jul 8 '15 at 11:16
  • $\begingroup$ Simply input the code from OP into a notebook and observe the different colors of x1, y1 and x2, y2 in the expressions within ContourPlot. Without specific numbers assigned to one or the other eqn does not evaluate to numbers and thus cannot be plotted. I guess this question will be closed as "arising due to a simple mistake". $\endgroup$ – LLlAMnYP Jul 8 '15 at 11:53
1
$\begingroup$

To follow up on my comment,

Without specific numbers assigned to one or the other eqn does not evaluate to numbers and thus cannot be plotted.

In my example I use a Manipulate to assign values to the otherwise undefined variables.

Most likely, you will find this as a suitable starting point:

{Manipulate[
  ContourPlot[Re@eqn[x1, y1, x2, y2, 3, 4], {x1, -1, 1}, {y1, -1, 1}, PlotPoints -> 50],
{x2, -1, 1}, {y2, -1, 1}],
 Manipulate[
  ContourPlot[Im@eqn[x1, y1, x2, y2, 3, 4], {x2, -1, 1}, {y2, -1, 1}, 
   PlotRange -> {-0.5, 0.5}, PlotPoints -> 50],
{x1, -1, 1}, {y1, -1, 1}]}

Output

$\endgroup$

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