Mathematica examples of conformal maps
Solutions to 2-d Laplace from analytic functions
Real part
In[28]:=
realplot = ContourPlot[{ComplexExpand[Re[Log[x + ⅈ y]]]},
{x, -− 50, 50}, {y, -− 50, 50}, Contours → 10, ColorFunction → "Pastel"]
Out[28]=
Imaginary part
2
Map.nb
In[29]:=
implot = ContourPlot[{ComplexExpand[Im[Log[x + ⅈ y]]]}, {x, -− 50, 50},
{y, -− 50, 50}, Contours → 13, ContourStyle → {Thick}, ContourShading → None]
40
20
Out[29]=
0
-−20
-−40
-−40
In[30]:=
-−20
0
20
40
Show[realplot, implot]
Out[30]=
ContourPlot[{}, {x, -− 50, 50}, {y, -− 50, 50}, Contours → 10, ColorFunction → "Pastel"]
Another example: f(z)=z^2
Potential and electric field lines for hyperbolic electrodes
Map.nb
{ComplexExpand[Re[(x + I y) ^ 2]], ComplexExpand[Im[(x + I y) ^ 2]]}
x2 -− y2 , 2 x y
replot2 = ContourPlot[ComplexExpand[Re[(x + I y) ^ 2]],
{x, -− 50, 50}, {y, -− 50, 50}, Contours → 10, ColorFunction → "Pastel"];
implot2 = ContourPlot[{ComplexExpand[Im[(x + I y) ^ 2]]}, {x, -− 50, 50},
{y, -− 50, 50}, Contours → 13, ContourStyle → {Thick}, ContourShading → None];
Show[replot2, implot2]
Another example: fringing fields
This plot shows equipotentials at the end of a semi-infinite capacitor.
The plates are at y= Pi and -Pi and run from x= - Infinity to -1.
The plots show only the y>0 equipotentials---the y<0 ones are obtained by reflection in the x axis.
3
4
Map.nb
In[34]:=
potplot =
ParametricPlot{u + Exp[u], 0}, u + Exp[u] CosPi 6, Pi 6 + Exp[u] SinPi 6,
u + Exp[u] CosPi 3, Pi 3 + Exp[u] SinPi 3,
u + Exp[u] CosPi 2, Pi 2 + Exp[u] SinPi 2,
u + Exp[u] Cos2 Pi 3, 2 Pi 3 + Exp[u] Sin2 Pi 3,
u + Exp[u] Cos5 Pi 6, 5 Pi 6 + Exp[u] Sin5 Pi 6,
{u + Exp[u] Cos[Pi], Pi + Exp[u] Sin[Pi]}, {u, -− 5, 2.01}, PlotStyle → {Thick}
8
6
Out[34]=
4
2
5
-−5
10
Similarly, the Electric field lines
In[32]:=
eplot = ParametricPlot[{{-− 4 + Exp[-− 4] Cos[v], v + Exp[-− 4] Sin[v]},
{-− 3 + Exp[-− 3] Cos[v], v + Exp[-− 3] Sin[v]}, {-− 2 + Exp[-− 2] Cos[v], v + Exp[-− 2] Sin[v]},
{-− 1 + Exp[-− 1] Cos[v], v + Exp[-− 1] Sin[v]}, {0 + Exp[0] Cos[v], v + Exp[0] Sin[v]},
{1 + Exp[1] Cos[v], v + Exp[1] Sin[v]}, {2 + Exp[2] Cos[v], v + Exp[2] Sin[v]}},
{v, 0, Pi}, PlotStyle → {{Thick, Dashed}, {Thick, Dashed}}]
8
6
Out[32]=
4
2
-−5
5
10
Equipotentials and field lines combined (showing they are always perpendicular to each other).
Map.nb
In[35]:=
Show[potplot, eplot]
8
6
Out[35]=
4
2
-−5
5
10
5
© Copyright 2026 Paperzz