The geometric interpretation of a function of a complex variable with Mathematica?
How can I write the code in mathematica to see the result like this:
As you see we have the complex function w=f(z)
, where z=x+iy
and w=u+iv
.
In this example w=sin z
, and we see the image of vertical line x=c
is hyperbola. (Left)
and the image of horizontal line y=c
is an elliptic. (Right)
This picture took from the book "Complex Variables开发者_JAVA技巧 and Applications, by James Ward Brown, Ruel Vance Churchill", 8th edition: pages 331 and 333 or third edition pages 96-97
Something like this?
ClearAll[u, v, f];
f[z_] := Sin[z]
u[x_, y_] := Re@f[x + I*y];
v[x_, y_] := Im@f[x + I*y];
EDIT: This just produces the whole thing. If you want to just see what happens for a single path parallel to the imaginary axis, try
ParametricPlot[{u[5, y], v[5, y]}, {y, -3, 3}]
or for the same parallel to the real axis try
ParametricPlot[{u[x, 1], v[x, 1]}, {x, -3, 3}]
EDIT2: Interactive:
ClearAll[u, v, f];
f[z_] := Sin[z]
u[x_, y_] := Re@f[x + I*y];
v[x_, y_] := Im@f[x + I*y];
Manipulate[
Show[
Graphics[{Line[{p1, p2}]}, PlotRange \[Rule] 3, Axes \[Rule] True],
ParametricPlot[
{u[p1[[1]] + t (p2[[1]] - p1[[1]]),
p1[[2]] + t (p2[[2]] - p1[[2]])],
v[p1[[1]] + t (p2[[1]] - p1[[1]]),
p1[[2]] + t (p2[[2]] - p1[[2]])]},
{t, 0, 1},
PlotRange \[Rule] 3]],
{{p1, {0, 1}}, Locator},
{{p2, {1, 2}}, Locator}]
(ugly, yes, but no time to fix it now). Typical output:
or
The idea is that you can vary the line on the left hand side of the figures you give (by clicking around the plot, which amounts to clicking on the Argand diagram...) and see the corresponding images.
Depending on what you want to do with the representations, it might sometimes be helpful to visualize the Riemann surface in 3D. Here's the surface for w=sin(z)
in 3D, neatly showing the branch cuts and the different branches (same as acl's first plot, but in 3D).
ParametricPlot3D[
Evaluate[{Re@Sin[z], Im@Sin[z], y} /. z -> x + I y], {x, -2,
2}, {y, -2, 2}]
精彩评论