An excursion to the visual world of
complex functions and dynamics 
Zoltán Kovács, Bolyai
Institute, University of Szeged,
Hungary




1.General overview
However complex analysis seems to be an extremal discipline of
teaching of mathematics, many areas of introductory education at
university level are much easier to understand if the student has some
overview of behavior of complex functions. Many problems to be solved
in real variable are specializations of the complex case, including
dynamic systems, numerical analysis and differential equations. The
workshop will summarize the benefit of using complex numbers for these
usual areas of mathematics education.
Three different pieces of software will be shown applicable for the
teacher's use: WebMathematics Interactive 2 (WMI2, http://matek.hu),
RealTime Zooming Math Engine (RTZME, http://rtzme.sf.net)
and XaoS (http://xaos.sf.net). Surprisingly enough, we
will also use a regular spreadsheet editor for basic visualizations.
2.Technical overview of the
workshop
This workshop is planned to an audience having personal computers
(laptops) for each individual. The workshop consists of 3 separated
parts:

During the first part we will use WMI2. The participant only have to
use a simple web browser (Google Chrome, Mozilla Firefox or Internet
Explorer should work “out of the box”). This first part
will be closed showing the “complex variable function
graphs” in WMI2 which can be extended to a realtime
demonstration. This will be covered in the second part.

In the second part we need to have a Linux workstation to run
RTZME.

If you have Linux on your laptop running, and it is available to
use Debian repositories (in other words, you have a Debian based
distribution, e.g. Ubuntu), then you could add the
“deb http://matek.hu/linux linuxversioncodename
main” line to /etc/apt/sources.list (for
example, for Ubuntu Karmic Koala this line is “deb
http://matek.hu/linux karmic main”). Then run
“aptget update; aptget install rtzme”
from command line. The “rtzme” executable
is the appropriate software you need now (it is also available
from command line).

If you don't have Linux on your laptop, or it is incompatible
with Debian repositories, please take an Xubuntu or Ubuntu
Live CD from the lecturer with a 1 page description on what
to do. Don't worry — no software
will be installed on your laptop, only the memory will be used
for the time of the workshop presentation. The Xubuntu CD is
faster, but gives less user experience features than Ubuntu. If
you have an older laptop, please ask an Xubuntu from the
lecturer. If you have a fast, new model, you can use Ubuntu as
well.

In the third part we need an arbitrary type of workstation to run
XaoS, and, in addition, we also need a spreadsheet program. To run
XaoS, do the following:

If you have Linux on your laptop running, and you were able it
during the second part without any problems, you should install
the “xaos” package as you usually do.

If you restarted your laptop and tried the Xubuntu (or Ubuntu)
Live CD during the second part, you should install the
“xaos” package by pressing ALTF2 and typing
“sudo aptget install xaos”.

If you rebooted your laptop since the second part and you are
now using Windows (or Mac), the please visit http://matek.hu/xd
to download the installer executable for XaoS which fits to your
current operating system.
You can use your favourite spreadsheet program, but the lecturer
will show everything in OpenOffice Calc (or Gnumeric, depending on
the participants). So, if you are in a doubt, just use OpenOffice,
too.
3.The workshop
3.1.Complex numbers
everywhere
Expressions and their factorization is a normal problem in secondary
school. Many tricks are to be learned to have usual skills to
transform a^{2} + 2 a b +
b^{2} to (a + b)^{2}.
But what to do with a^{2} +
b^{2}? An easy question! The answer is:
(a + b i)(a  b
i), and, unfortunately, there is no easier answer.
Invoking WMI2, we do not get this “complex” answer: “factors of a^2+b^2” give nothing special. (You
may also have a look at the web URL.) The usual computer algebra
systems give the possibility to define the domain of the symbolic
calculation, but here it is not allowed. (Exercise: do the
factorization in your favourite CAS. Solution for Maxima, WMI2's
backend is factor(a^2+b^2,i^2+1).) Is this a good result from
the teacher's point of view? Probably yes, in secondary school.
Probably no, at university level. (→WMI 2.2)
Of course, such a problem can be written to an essentially same
question: to find the roots of x^{2} + 1 = 0. WMI2's solution does not give any result, but here you can
fine tune the calculation with a different button. These
buttons are installed in different layouts in WMI2 to prevent young
students from catching bogus output.
Solving third order polynomials are also a kind of bitter. Adding
x^{3} to the above equation, we gain a terrible
result for most human being (try both buttons on your own!). A good
example of modern handling of this general problem is Wolfram's
approach in WolframAlpha. This also shows the graph of
the function in real variable, the roots symbolically and numerically,
and also visualizes the roots in the complex plane. Luckily, WMI2 has
a builtin function to make even more visualization of complex roots.
To see that, try this. To understand the graph, we need
to learn about domain coloring (see this
page for another explanation). (→Merge the articles + add
link to WMI2.)
Now let's do some experiments. Try the complex color wheel graph of
the following functions:

z, z^{2}, z^{3},
z^{6},

1/z, 1/z^{2},
1/z^{6},

z(z + 3)(z + 5), (z 
i)(z + i)/((z 
1)(z + 1)), (z  i)(z 
1)/((z + i)(z + 1)).
It's worthy to zoom in and out and try to switch the grid on and off.
Before continuing experiments in the second part, some more
“easy” examples which lead to complex arithmetics:

(Continuing the introductory example.) Factorization of higher order
polynomials in real variable. It is very helpful to know the
factorization over the field of complex number fields. As the final
step, pairing the complex conjugate roots lead to the factorization
over the field of real numbers.

General solution of arbitrary polynomial (or nonpolynomial)
equation. Elementary calculus exercises can rely on stable methods
for equation solving. Zeroes, extremas, convexity questions all lead
to equations which “sometimes” cannot be solved
symbolically.

Eigenvalues. Basic application of linear algebra methods can already
lead to 2×2, 3×3 (and larger) matrix eigenvalue problems
which can make undergraduate feel miserable on having complex roots
on calculation. Hint: if symbolic calculation gives bogus output,
search for graphical solutions first.
3.2.Understanding by
exploring
In this second part we will use RTZME. Our aim is to

enjoy the beauty of complex graphs in their colorfullness,

visualize zeroes and poles,

study periodicity of trigonometric and exponential functions,

study branches and branch cuts in logarithmic functions,

understand function behavior at essential singularities,

get disappointed on graphing Re z  i Im
z,

prepare for the third part by the example iteration
z_{n +
1}≔(z_{n})^{2} +
z_{0}.
3.3.Granny and the Mandelbrot
Set
You don't need extraordinary tools to visualize basic chaotic behavior
on the real line. All you need is a spreadsheet software and 2
minutes:

Enter “1” into cell A1.

Enter “=A1^2+A$1” into A2.

“Pull down” A2.

Create a graph.
Now you can illustrate all of the following:

divergence,

convergence (change A1 to be ∈[0,0.25] or even below this
interval),

periodicity (A1:=  1),

accumulation points (A1:=  1.25),

chaos (A1≈  1,4).
To see more, you need a fractal explorer software. Now we will try
XaoS, written by Jan Hubicka (and other contributors).
Try the following:

The Mandelbrot fractals (keys 1–5).

Go to Fractal→User formula and enter
“z^2+c”, “z^1.5+c”,
“z^2+i+c”.

Newton's formula (keys 6–7).