Mathematica Tutor
Part 14: Graphical representations of complex functions
In this part we examine various graphical tools for representing complex functions of a complex variable. Our test function will be
f(z) = z2.
Since both the domain and the range of such a function have dimension two -- as a real space -- the graph will be an object in real 4-space. Thus, it cannot be represented directly. We will have to use other devices.
-
We begin by thinking of the function
f(z) = z2 as a map of one copy of the complex plane into another.
Enter the following command to define a vertical line in the complex plane,
then plot the segment of the line connecting the points
z1=-0.5-I to z2=-0.5+I. Enter
p=-0.5
h[t_] := p + t*I
ParametricPlot[{Re[h[t]], Im[h[t]]}, {t,-1,1},
PlotRange -> {{-1, 1}, {-2, 2}},
PlotStyle -> RGBColor[0, 0, 1],
AspectRatio -> Automatic]
To see where the squaring function maps this short vertical line
segment, enter the following command:
ParametricPlot[{Re[h[t]^2], Im[h[t]^2]}, {t,-1,1},
PlotRange -> {{-1, 1}, {-2, 2}},
PlotStyle -> RGBColor[1, 0, 0],
AspectRatio -> Automatic]
Experiment by making new graphs using various values
of p between -1 and 1 in the definition of the vertical line.
- Alter the code to see how the
squaring function maps short horizontal segments.
- Mathematica has a graphics
command called "CartesianMap" that shows what happens to a mesh of short
horizontal and vertical line
segments under a complex function. First, we must load a package containing the command.
Enter:
<< Graphics`ComplexMap`
Now, enter the following to see the line segments themselves.
CartesianMap[Identity, {-1, 1}, {-2, 2}]
Now, define the squaring function and enter the command to see the image of the mesh of
vertical and horizontal line segments under the squaring function. Enter:
f[z_]:= z^2
CartesianMap[f, {-1, 1}, {-2, 2}]
See if you can identify where each line segment is mapped. Why are there fewer curves than there were line segments?
- Another representation option is to reduce the number of dimensions to three by plotting z=|f(x + y*I)| against (x,y).
The command "Plot3D" does this.
Enter the following:
Plot3D[ Abs[ f[x + y*I] ], {x, -1, 1}, {y, -1, 1} ]
- For still another representation,
we'll concentrate on how the squaring function maps pieces of the unit circle.
First we define a function
parametrizing the unit circle. Then we plot a segment of the circle. Enter:
w[t_]:= Cos[t]+Sin[t]*I
theta = Pi/4
ParametricPlot[{Re[w[t]], Im[w[t]]}, {t, 0, theta},
PlotRange -> {{-1, 1}, {-1, 1}},
PlotStyle -> RGBColor[1, 0, 0],
AspectRatio -> Automatic]
To see where the squaring function maps this circular segment, enter the
following commands:
ParametricPlot[{Re[w[t]^2], Im[w[t]^2]}, {t, 0, theta},
PlotRange -> {{-1, 1}, {-1, 1}},
PlotStyle -> RGBColor[1, 0, 0],
AspectRatio -> Automatic]
Now increase theta. As you see, eventually the image starts to draw over itself.
To indicate more clearly what is going on, we'll increase the vertical component as
the curve is drawn out and plot in three dimensions using "ParametricPlot3D". Enter:
p=Pi
ParametricPlot3D[{Re[w[t]^2], Im[w[t]^2], t/4}, {t, 0, p},
PlotRange->{{-1,1},{-1,1},{0,Pi/2}} ]
Now increase p from Pi to 2Pi and study the resulting plots.
- Give a word description of the square function.
- Use your description to explain why every nonzero complex number has exactly two square roots. Give a geometric method of finding them, i.e., if you have located a non-zero complex number in the plane, where should you look for the square roots?