Mapping Complex Functions

Analytic complex functions have the convenient property of solving Laplace's equation. This is useful because many physical systems obey Laplace's equation, thus a graph of a complex function can illustrate the behavior of a physical system. The picture shown above illustrates the magnetic field lines around a superconducting cylinder, which is also the laminar fluid flow around a solid cylinder.

Using this application, you can plot your own complex functions. Note that this is fairly memory and compute intensive. I recommend using Chrome to generate the plots. This application was written by David Bau and modified by me (Derin Sherman) with his permission.

If you want to skip over the introduction, click here to run the applet.

The applet has many features, including the ability to animate complex maps. You can discover some of these features on your own by opening the complex mapping application and letting your mouse hover over the top left and bottom right corners of the applet. Let's start with the default function, f(z) = z and see what it looks like. You should see a colored square grid with a circle in the middle. This image represents the complex plane. There are 16 squares in one unit of distance. The 1st quadrant squares are shades of green, the 2nd quadrant squares are shade of yellow, the 3rd quadrant squares are shades of red, and the 4th quadrant squares are shades of blue. Let's change the function to f(z)=z^2 and see what happens. Notice that the unit circle remained the same size: squaring the complex function didn't change the size of complex numbers with the size of 1. But now there are more colored dots around the edge of the circle. When you plotted f(z)=z, the green dot on the unit circle was located on the positive y-axis (the imaginary z-axis). But now it's located at a point 45 degrees between the x and y axes. This means that, if you were to square the complex number located at any point in the f(z)=z^2 picture, it would get you back to the same color point in the f(z)=z picture.

Let's go back to the f(z)=z image and click on the "change map" button (circle with cross) to view f(z)=z with a different map. In this case, all you see are a set of horizontal lines. This is a map that colors the complex plane based only on the imaginary value of z. We can think of this as showing the streamlines of a uniform flow of water, or the equipotential lines of a uniform electric field between two parallel plates. Let's see what happens when we view f(z)=z^2 using the uniform field line map. Now we see a set of curved lines. The 1st quadrant could represent the equipotential lines near a metal sheet bent at a right angle. Or the 1st quadrant field lines could represent the streamlines of fluid encountering the corner of a wall.

Let's try a more complicated function: f(z)=i*log(z). Now we see a set of concentric circles. These represent the equipotentials of a charged wire pointing perpendicular to the computer screen. We can displace the charge by changing "z" to "z+1" resulting in the function f(z)=i*log(z+1) which displaces the charge to the left. We can also have two charges, one displaced to the left and one displaced to the right f(z)=i*log(z+1)+i*log(z-1). Close to each line of charge, the potential looks like the potential of a line, but far away, the two potentials merge together to form a large series of ellipse-like curves centered on the origin. This is because the potential far away from the two lines of charge appears to be just a single line of charge.

Incidentally, we can change the sign of one of the two charges to create the field due to a physical dipole: just subtract the potential from the second line of charge from the potential due to the first line of charge f(z)=i*log(z+1)-i*log(z-1). This resembles the magnetic field lines between two antiparallel lines of current.

You can move the two charges closer together by changing the distance "1" to some other value, say "a". In the limit that "a" approaches zero, the function turns from a difference of two logs into the derivative of the log, which is 1/z. When we plot f(z)=i/z we find the potential of a point dipole. The electric field lines are perpendicular to the equipotential lines, and we can plot these by getting rid of the factor of i, thus f(z)=1/z. Now, something unusual happens if we combine the point dipole potential with the uniform electric field potential: f(z)=z+1/z we see a set of field lines that swirl around the unit circle. This is easier to see if we zoom in a bit f(z)=(z+1/z)/8. Far from the unit circle, the potential is uniform, but the unit circle itself is an equipotential. Outside the unit circle, the figure represents the equipotential lines near a metal cylinder.

Just for fun, here are field lines of water flowing down a drain f(z)=(0.438+i)log(z)*.25. Feel free to explore more complex potentials.