COMPLEX ANALYSIS: Mathematica 4.1 Notebooks
(c) John H. Mathews, and
Russell W. Howell, 2002
Complimentary software to accompany our textbook:

COMPLEX ANALYSIS: for Mathematics and Engineering, 
4th Edition,  2001,  ISBN: 0-7637-1425-9
Jones & Bartlett Publishers, Inc.  
40 Tall Pine Drive, Sudbury, MA 01776  
Tele.  (800) 832-0034, FAX:  (508)  443-8000  
E-mail:  mkt@jbpub.com  
Internet:  http://www.jbpub.com/  
This free software is compliments of the authors.
John H. Mathews,   mathews@fullerton.edu 
Russell W. Howell,  howell@westmont.edu

CHAPTER 10  APPLICATIONS of HARMONIC FUNCTIONS

a = A = b = B = c = k = R = T = u = U = v = V = w = W = x = X = y = Y = z = Z = 
                                        0; 
Clear[a, a0, a1, a2, a3, A, b, B, 
        CR, Δx, Δy, eq1, eq2, eqns, f, f1, F, F1, 
        F2, F3, F4, g, G, lines, n, P, Ψ, ϕ, Φ, 
        r, r0, solset, θ, t, T, T1, T2, Q, u, u0, U, U1, v, v0, V, V1, 
        w, w0, W, W1, x, x1, x2, x3, y, z, z1, z2, z3, 
        z4]; 
Needs["Graphics`ComplexMap`"]; 
Needs["Graphics`ParametricPlot3D`"]
Needs["Graphics`Colors`"];

Section 10.1	Preliminaries

Section 10.2	Invariance of Laplace's Equation and the Dirichlet Problem

Section 10.3	Poisson's Integral Formula for the Upper Half Plane

Section 10.4	Two Dimensional Mathematical Models

Section 10.5	Steady State Temperatures

Section 10.6	Two-Dimensional Electrostatics

Section 10.7	Two-Dimensional Fluid Flow

Section 10.8	The Joukowski Airfoil

Section 10.9	The Schwarz-Christoffel Transformation

Section 10.10	Image of a Fluid Flow

Section 10.11  Sources and Sinks

If the two-dimensional motion of an ideal fluid consists of an outward radial flow from a point and is symmetric in all directions, then the point is called a simple source.  A source at the origin can be considered as a line perpendicular to the z-plane along which fluid is being created.  If the rate of emission of volume of fluid per unit length is  2  π m,  then the origin is said to be a source of strength  m,  the complex potential for the flow is

	F (z) = m log (z),  

and the velocity  V  at the point  (x,y)  is given by

	V(x, y)  =  \(\(F' \((z)\)\)\&_\  = \ m\/\(\(z\)\(\ \)\)\&_\).  

For fluid flows, a sink is a negative source and is a point of inward radial flow at which the fluid is considered to be absorbed or annihilated.

	In the case of electrostatics a source will correspond to a uniformly charged line perpendicular to the z-plane at the point  (Subscript[z, 0]).  If the line  L  is located at  (Subscript[z, 0]) = 0  and carries a charge density of  (q/2)  coulombs per unit length, then the magnitude of the electric field is  |E(x, y)|=(q/(Sqrt[(x^2) + (y^2)])),  hence  E  is given by  

	E(x, y) = \(\(q\ z\)\/\(\(|\)\(z\^2\)\(|\)\)\  = \ 
          q\/\(\(z\)\(\ \)\)\&_\),  

and the complex potential is

	F (z) = -q log (z),  and  E(x, y)  = \(\(-\ \(F' \((z)\)\)\&_\)\(\ \)\).  

A sink for electrostatics is a negatively charged line perpendicular to the z-plane.  The electrostatic field for electrostatic problems corresponds to the velocity field for fluid flow problems, except that their corresponding potentials differ by a sign change.

Example 10.30,  Page 471.  Show that the complex potential for a fluid flowing from the source  at  (Subscript[z, 1]) = +1  to the sink at  (Subscript[z, 2]) = -1  is  F[z] = Log[((z - 1)/(z + 1))].

Solution 10.30.

Enter the formula for the complex potential F[z].

Remove[W, x, y, z, 
        Z]; 
Clear[f, F, ϕ, φ]; 
F[Z_]  =  
        Log[((Z  -  1)/(Z  +  1))]; 
ϕ[x_, y_] = 
        ComplexExpand[Re[F[x + I y]], 
          TargetFunctions -> {Re, Im}]; 
φ[x_, y_] = 
        Simplify[
          ComplexExpand[Im[F[x + I y]], 
            TargetFunctions -> {Re, Im}]]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = Re[F[x + \[ImaginaryI]y]]"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print[""]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]]; 
Print[""]; 
Print["The stream function is:"]; 
Print["φ[x,y] = Im[F[x + \[ImaginaryI]y]]"]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print["φ[x,y] = ", φ[x, 
          y]]; 
φ[x_, y_] = 
        ArcTan[-1 + (x^2) + (y^2), 2 y]; 
Print[""]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a density plot of the velocity potential.

DensityPlot[ϕ[x, y], {x, -1.5, 
          1.5}, {y, -1.5, 1.5}, 
PlotPoints -> 
          100, Mesh -> False, 
        ColorFunction -> Hue]; 
Print["The velocity potential for the"]; 
\(\(Print[\*""source at (Subscript[z, 1])=+1 and sink at (Subscript[z, 2])=-1.""];\)\ \)
Print["ϕ[x,y] = ", Re[F[z]]]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Use Mathematica to make a contour plot of the stream function.

gr1 = 
        ContourPlot[φ[x, y], {x, -1.5, 1.5}, {y, 0, 
            1.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr2 = 
        ContourPlot[φ[x, y], {x, -1.5, 
            1.5}, {y, -1.50001, -0.00001}, 
Contours -> 11, PlotPoints -> 40, 
          ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
Show[gr1, gr2, AspectRatio -> 1, 
        DisplayFunction -> $DisplayFunction]; 
Print["The stream function for the"]; 
\(\(Print[\*""source at (Subscript[z, 1])=+1 and sink at (Subscript[z, 2])=-1.""];\)\ \)
Print["φ[x,y] = ", 
        Im[F[z]]]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a contour plot of the velocity potential.

ContourPlot[ϕ[x, y], {x, -1.5, 
          1.5}, {y, -1.5, 1.5}, 
Contours -> 11, 
        PlotPoints -> 40, 
AspectRatio -> 1, 
        ColorFunction -> Hue]; 
Print["The velocity potential for the"]; 
\(\(Print[\*""source at (Subscript[z, 1])=+1 and sink at (Subscript[z, 2])=-1.""];\)\ \)
Print["ϕ[x,y] = ", Re[F[z]]]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Find the inverse of the function F[Z].

solset  =  
        Solve[F[Z]  ==  W, Z]; 
f[x_, y_]  =   ReplaceAll[
          (Subscript[solset, [[1, 1, 2]]]), 
          W -> x  +  I y]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The inverse function is:"]; 
Print["f[x,y] = ", f[x, y]];

Use Mathematica to graph the stream functions using  f[x,y].

n  =  8; 
Clear[k]; 
eqns  =  
        N[Table[{Re[f[x, (( k π)/n)]], 
              Im[f[x, ((k π)/n)]]}, {k, 1, 2  n}]]; 
ParametricPlot[Evaluate[eqns], {x, -4, 4}, 
        PlotRange -> {{-2.5, 2.5}, {-2.5, 2.5}}, 
        AspectRatio -> 1, Axes -> None, Ticks -> None, 
        DefaultColor -> Blue]; 
Print["The streamlines for the"]; 
\(\(Print[\*""source at (Subscript[z, 1])=+1 and sink at (Subscript[z, 2])=-1.""];\)\ \)
Print["w = f[x,y] = ", f[x, y]];

The stream function for a fluid flowing from the source at  z = +1  to the sink at  z = -1.

Example 10.31,  Page 472.  Let two sources of unit strength be located at the points  (Subscript[z, 1]) = 1  and  (Subscript[z, 2]) = -1.  The resulting complex potential for a fluid flow is  F[z] = Log[(z^2) - 1].

Solution 10.31.

Enter the formula for the complex potential F[z].

Remove[W, x, y, z, 
        Z]; 
Clear[f, f1, f2, F, ϕ, φ]; 
F[Z_]  =  Log[(Z^2)  -  1]; 
ϕ[x_, y_] = 
        ComplexExpand[Re[F[x + I y]], 
          TargetFunctions -> {Re, Im}]; 
φ[x_, y_] = 
        ComplexExpand[Im[F[x + I y]], 
          TargetFunctions -> {Re, Im}]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = Re[F[x + \[ImaginaryI]y]]"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print[""]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]]; 
Print[""]; 
Print["The stream function is:"]; 
Print["φ[x,y] = Im[F[x + \[ImaginaryI]y]]"]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print[""]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a density plot of the velocity potential.

DensityPlot[ϕ[x, y], {x, -1.5, 
          1.5}, {y, -1.5, 1.5}, 
PlotPoints -> 
          100, Mesh -> False, 
        ColorFunction -> Hue]; 
Print["The velocity potential for two sources"]; 
\(\(Print[\*""of unit strength at (Subscript[z, 1])=+1 and (Subscript[z, 2])=-1.""];\)\ \)
Print["ϕ[x,y] = ", Re[F[z]]]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Use Mathematica to make a contour plot of the stream function.

gr1 = 
        ContourPlot[φ[x, y], {x, 0.00001, 1.5}, {y, 0.00001, 
            1.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr2 = 
        ContourPlot[φ[x, y], {x, -1.5, -0.00001}, {y, 
            0.00001, 1.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr3 = 
        ContourPlot[φ[x, y], {x, 0.00001, 
            1.5}, {y, -1.5, -0.00001}, 
Contours -> 11, PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr4 = 
        ContourPlot[φ[x, 
            y], {x, -1.5, -0.00001}, {y, -1.5, -0.00001}, 
Contours -> 11, PlotPoints -> 40, 
          ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
Show[gr1, gr2, gr3, gr4, AspectRatio -> 1, 
        DisplayFunction -> $DisplayFunction]; 
Print["The stream function for two sources"]; 
\(\(Print[\*""of unit strength at (Subscript[z, 1])=+1 and (Subscript[z, 2])=-1.""];\)\ \)
Print["φ[x,y] = ", 
        Im[F[z]]]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a contour plot of the velocity potential.

ContourPlot[ϕ[x, y], {x, -1.5, 
          1.5}, {y, -1.5, 1.5}, 
Contours -> 11, 
        PlotPoints -> 40, 
AspectRatio -> 1, 
        ColorFunction -> Hue]; 
Print["The velocity potential for two sources"]; 
\(\(Print[\*""of unit strength at (Subscript[z, 1])=+1 and (Subscript[z, 2])=-1.""];\)\ \)
Print["ϕ[x,y] = ", Re[F[z]]]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Find the inverse of the function F[Z].

solset  =  
        Solve[F[Z]  ==  W, Z]; 
f[x_, y_]  =   ReplaceAll[
          (Subscript[solset, [[1, 1, 2]]]), 
          W -> x  +  I y]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The inverse function is:"]; 
Print["f[x,y] = ", f[x, y]];

Use Mathematica to graph the stream functions using  f[x,y].

n  =  12; 
Clear[k]; 
eqns1  =  
        N[Table[{Re[f[x, ((k π)/n)]], Im[f[x, ((k π)/n)]]}, {k, 
              1, n - 1}]]; 
eqns2  =  
        N[Table[{Re[f[x, ((k π)/n)]], Im[f[x, ((k π)/n)]]}, {k, 
              12 + 1, 12 + n - 1}]]; 
eqns3  =  
        N[Table[{Re[-f[x, ((k π)/n)]], 
              Im[-f[x, ((k π)/n)]]}, {k, 1, n - 1}]]; 
eqns4  =  
        N[Table[{Re[-f[x, ((k π)/n)]], 
              Im[-f[x, ((k π)/n)]]}, {k, 12 + 1, 
              12 + n - 1}]]; 
eqns   =  Union[eqns1, eqns2, eqns3, eqns4]; 
ParametricPlot[Evaluate[eqns], {x, -3, 3}, AspectRatio -> 1, 
        Ticks -> None, PlotRange -> {{-2, 2}, {-2, 2}}, 
        AspectRatio -> 1, Axes -> None, Ticks -> None, 
        DefaultColor -> Blue]; 
Print["The streamlines for two sources"]; 
\(\(Print[\*""of unit strength at (Subscript[z, 1])=+1 and (Subscript[z, 2])=-1.""];\)\ \)
Print["w = f[x,y] = ", f[x, y]];

The stream function for a fluid with two sources of unit strength be located at the points  z = 1  and  z = -1.

We can use the technique of conformal mapping can be used to determine the fluid flow in a domain D in the z plane that is produced by sources and sinks. If a conformal mapping w=S(z) can be constructed so that the image of sources, sinks, and boundary curves for the flow in D are mapped onto sources, sinks, and boundary curves in a domain G where the complex potential is known to be (Subscript[F, 1]) (w), then the complex potential in D is given by (Subscript[F, 2]) (z) = (Subscript[F, 1]) (S (z)).

Example 10.32,  Page 473.  Show that the complex potential for a fluid flow in the infinite strip  ((-π)/2) < Re[z] < (π/2)  with a single source at the origin is  F[z] = Log[Sin[z]].

Solution 10.32.

Enter the formula for the complex potential F[z].

Remove[W, x, y, z, 
        Z]; 
Clear[f, F, ϕ, φ]; 
F[Z_]  =  Log[Sin[Z]]; 
ϕ[x_, y_] = 
        ComplexExpand[Re[F[x + I y]], 
          TargetFunctions -> {Re, Im}]; 
φ[x_, y_] = 
        ComplexExpand[Im[F[x + I y]], 
          TargetFunctions -> {Re, Im}]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = Re[F[x + \[ImaginaryI]y]]"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print[""]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]]; 
Print[""]; 
Print["The stream function is:"]; 
Print["φ[x,y] = Im[F[x + \[ImaginaryI]y]]"]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print[""]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a density plot of the velocity potential.

DensityPlot[ϕ[x, 
          y], {x, ((-π)/2), (π/2)}, {y, -2.5, 
          2.5}, 
PlotPoints -> 100, 
        Mesh -> False, 
AspectRatio -> (5/π), 
        ColorFunction -> Hue]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Use Mathematica to make a density plot of the stream function.

gr1 = 
        ContourPlot[φ[x, y], {x, ((-π)/2), (π/2)}, {y, 
            0.00001, 2.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr2 = 
        ContourPlot[φ[x, 
            y], {x, ((-π)/2), (π/2)}, {y, -2.50001, -0.00001}, 
Contours -> 11, PlotPoints -> 40, 
          ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
Show[gr1, gr2, AspectRatio -> (5/π), 
        DisplayFunction -> $DisplayFunction]; 
Print["The stream function"]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a contour plot of the velocity potential.

gr1 = 
        ContourPlot[ϕ[x, y], {x, ((-π)/2), (π/2)}, {y, 0, 
            2.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr2 = 
        ContourPlot[ϕ[x, 
            y], {x, ((-π)/2), (π/2)}, {y, -2.50001, -0.00001}, 
Contours -> 11, PlotPoints -> 40, 
          ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
Show[gr1, gr2, AspectRatio -> (5/π), 
        DisplayFunction -> $DisplayFunction]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Find the inverse of the function F[Z].

solset  =  
        Solve[F[Z]  ==  W, Z]; 
f[x_, y_]  =   ReplaceAll[
          (Subscript[solset, [[1, 1, 2]]]), 
          W -> x  +  I y]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The inverse function is:"]; 
Print["f[x,y] = ", f[x, y]];

Use Mathematica to graph the stream functions using  f[x,y].

n  =  12; 
Clear[k]; 
eqns  =  
        Table[{Re[f[x, ((k π)/n)]], Im[f[x, ((k π)/n)]]}, {k, 1, 
            2  n}]; 
ParametricPlot[Evaluate[eqns], {x, -3, 3}, 
        AspectRatio -> (5/π), 
Ticks -> None, 
        Axes -> None, 
        DefaultColor -> 
          Blue, 
PlotRange -> {{((-π)/2), (π/2)}, {-2.5, 2.5}}]; 
Print["    w = f[x,y] = ", 
        f[x, y]];

The stream function for a fluid flow in the infinite strip  ((-π)/2) < Re[z] < (π/2)  with a single source at the origin.

Example 10.33,  Page 474.  Show that the complex potential for a fluid flow in the infinite strip  ((-π)/2) < Re[z] < (π/2)  with a two sources at  (Subscript[z, 1]) = (π/2)  and  (Subscript[z, 2]) = ((-π)/2)  is   F[z] = Log[((Sin[z] - 1)/(Sin[z] + 1))].

Solution 10.33.

Enter the formula for the complex potential F[z].

Remove[W, x, y, z, 
        Z]; 
Clear[f, F, ϕ, φ]; 
F[Z_]  =  
        Log[((Sin[Z] - 1)/(Sin[Z] + 1))]; 
ϕ[x_, y_] = 
        ComplexExpand[Re[F[x + I y]], 
          TargetFunctions -> {Re, Im}]; 
φ[x_, y_] = 
        MapAll[Together, 
          ComplexExpand[Im[F[x + I y]], 
            TargetFunctions -> {Re, Im}]]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = Re[F[x + \[ImaginaryI]y]]"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print[""]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]]; 
Print[""]; 
Print["The stream function is:"]; 
Print["φ[x,y] = Im[F[x + \[ImaginaryI]y]]"]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print["φ[x,y] = ", φ[x, 
          y]]; 
φ[x_, y_] = 
        ArcTan[-1 + Cosh[y]^2 Sin[x]^2 + Cos[x]^2 Sinh[y]^2, 
          2 Cos[x] Sinh[y]]; 
Print[""]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a density plot of the velocity potential.

DensityPlot[ϕ[x, 
          y], {x, ((-π)/2), (π/2)}, {y, -2.5, 
          2.5}, 
PlotPoints -> 100, 
        Mesh -> False, 
AspectRatio -> (5/π), 
        ColorFunction -> Hue]; 
Print["The velocity potential"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Use Mathematica to make a density plot of the stream function.

gr1 = 
        ContourPlot[φ[x, y], {x, ((-π)/2), (π/2)}, {y, 
            0.00001, 2.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr2 = 
        ContourPlot[φ[x, 
            y], {x, ((-π)/2), (π/2)}, {y, -2.50001, -0.00001}, 
Contours -> 11, PlotPoints -> 40, 
          ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
Show[gr1, gr2, AspectRatio -> (5/π), 
        DisplayFunction -> $DisplayFunction]; 
Print["The stream function"]; 
Print["φ[x,y] = ", 
        Im[F[x  +  Iy]]]; 
Print["φ[x,y] = ", φ[x, 
          y]];

Use Mathematica to make a contour plot of the velocity potential.

gr1 = 
        ContourPlot[ϕ[x, y], {x, ((-π)/2), (π/2)}, {y, 0.00001, 
            2.5}, 
Contours -> 11, 
          PlotPoints -> 40, ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
gr2 = 
        ContourPlot[ϕ[x, 
            y], {x, ((-π)/2), (π/2)}, {y, -2.50001, -0.00001}, 
Contours -> 11, PlotPoints -> 40, 
          ColorFunction -> Hue, 
          DisplayFunction -> Identity]; 
Show[gr1, gr2, AspectRatio -> (5/π), 
        DisplayFunction -> $DisplayFunction]; 
Print["The velocity potential is:"]; 
Print["ϕ[x,y] = ", 
        Re[F[x  +  Iy]]]; 
Print["ϕ[x,y] = ", ϕ[x, 
          y]];

Find the inverse of the function F[Z].

solset  =  
        Solve[F[Z]  ==  W, Z]; 
f[x_, y_]  =   ReplaceAll[
          (Subscript[solset, [[1, 1, 2]]]), 
          W -> x  +  I y]; 
Print["W = F[Z] = ", F[Z]]; 
Print[""]; 
Print["The inverse function is:"]; 
Print["f[x,y] = ", f[x, y]];

Use Mathematica to graph the stream functions using  f[x,y].

n  =  8; 
Clear[k]; 
\(\(eqns\  = \ 
        Table[{Re[f[x, \(k\ π\)\/n]], 
            Im[f[x, \(k\ π\)\/n]]}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ {k, 1, 
            2  n}];\)\ \)
ParametricPlot[Evaluate[eqns], {x, -6, 6}, 
        AspectRatio -> (2/1.6), Ticks -> None, Axes -> None, 
        PlotRange -> {{((-π)/2), (π/2)}, {-2.5, 2.5}}, 
        DefaultColor -> Blue]; 
Print["     f[x,y] = ", f[x, y]];

The stream function for a fluid flow in the infinite strip  ((-π)/2) < Re[z] < (π/2)  with a two sources at  (Subscript[z, 1]) = ((-π)/2)  and  (Subscript[z, 2]) = (π/2).

Example 10.34,  Page 475.  Consider the conformal mapping F[
          z] =  (2/π) (Sqrt[((z^2) - 1)]) + (2/π) 
            ArcSin[(1/z)].  Show that the upper half-plane Im[z] > 0 is mapped onto the domain consisting of the upper half-plane Im[w] > 0 joined to the channel -1 ≤ x ≤ 1, v ≤ 0.

Solution 10.34.

When Mathematica is used we must use a different branch of the square root.

Clear[f]; 
f[
          z_]  =  ((2  I)/π) (Sqrt[(1 - (z^2))]) + (2/π) ArcSin[(1/z)]; 
Print["f[z] = ", f[z]];

Use Mathematica to graph conformal mapping  w = f(z).

PolarMap[f, {0.1, 3.01, 1.5}, {0.0001, 3.14149, (3.14139/24)}, 
        PlotStyle -> {Magenta, Pink}, 
        Ticks -> {Range[-2, 2, 1], 
            Range[-2, 2, 1]}];

Section 10.11  Exercises for Sources and Sinks
See textbook page 476.

GO TO  THE  Table of Contents