ComplexPlot since V12.0 is very handy to solve this type of problem. Typically when the contour/mesh line that I am looking for passes through zeros and poles.
The first plot shows a yellow contour traverses the regions of color corresponding to 0,π or -π according to the legend. z maps every point on this curve to some real number
z-3I
z(z+1)
In[]:=
ComplexPlot,{z,-2-I,2+4I},PlotLegendsAutomatic,Mesh{{0},{0}},MeshFunctions{Im[#2]&,Im[#2]&},MeshStyleDirective[Thick,Yellow],PlotPoints50
(z-3I)
z*(z+1)
Out[]=
Similarly, the second plot shows a yellow contour traverses the regions of color corresponding to π/2 or -π/2 according to the legend. z maps every point on this curve to some imaginary number.
z-3I
z(z+1)
In[]:=
ComplexPlot,{z,-4-2I,3+5I},PlotLegendsAutomatic,Mesh{{0},{0}},MeshFunctions{Re[#2]&,Re[#2]&},MeshStyleDirective[Thick,Yellow],PlotPoints50
(z-3I)
z*(z+1)
Out[]=
The algebra part can be
In[]:=
expr=/.za+b*I
(z-3I)
z*(z+1)
Out[]=
-3+a+b
(a+b)(1+a+b)
Symbolically extract real and imaginary part assuming all variables are real
In[]:=
{re,im}=ComplexExpand[ReIm[expr]]
Out[]=
+--++,---b+-
2
a
(+)(+)
2
a
2
b
2
(1+a)
2
b
3
a
(+)(+)
2
a
2
b
2
(1+a)
2
b
3b
(+)(+)
2
a
2
b
2
(1+a)
2
b
6ab
(+)(+)
2
a
2
b
2
(1+a)
2
b
2
b
(+)(+)
2
a
2
b
2
(1+a)
2
b
a
2
b
(+)(+)
2
a
2
b
2
(1+a)
2
b
3a
(+)(+)
2
a
2
b
2
(1+a)
2
b
3
2
a
(+)(+)
2
a
2
b
2
(1+a)
2
b
2
a
(+)(+)
2
a
2
b
2
(1+a)
2
b
3
2
b
(+)(+)
2
a
2
b
2
(1+a)
2
b
3
b
(+)(+)
2
a
2
b
2
(1+a)
2
b
We only need the numerator of each part because we are only interested in when they are zero.
In[]:=
Together[re]//Numerator
Out[]=
2
a
3
a
2
b
2
b
In[]:=
Together[im]//Numerator
Out[]=
-3a-3-b+3-
2
a
2
a
2
b
3
b
Choose a or b with less power. Though WL has no problem to solve the third degree polynomial equation, it is way easier to understand the solution with quadratic equation
◼
Find z = a + b * to some real number under transformation. We need image to have zero imaginary part
In[]:=
Solve[-3a-3-b+3-0,a]
2
a
2
a
2
b
3
b
Out[]=
a,a
-3-
9+36-4
2
b
4
b
2(3+b)
-3+
9+36-4
2
b
4
b
2(3+b)
In[]:=
ContourPlot[-3a-3-b+3-0,{a,-5,5},{b,-5,5}]
2
a
2
a
2
b
3
b
Out[]=
◼
Find z = a + b * to some imaginary number under transformation. We need image to have zero real part
In[]:=
Solve[+-3b-6ab++a0,b]
2
a
3
a
2
b
2
b
Out[]=
b,b
3+6a-
9+36a+32-8-4
2
a
3
a
4
a
2(1+a)
3+6a+
9+36a+32-8-4
2
a
3
a
4
a
2(1+a)
In[]:=
ContourPlot[+-3b-6ab++a0,{a,-5,5},{b,-5,5}]
2
a
3
a
2
b
2
b
Out[]=
The plots above should be the same as the meshes from complex plot at the beginning.