COMPLEX ANALYSIS: Maple Worksheets, 2001
(c) John H. Mathews Russell W. Howell
mathews@fullerton.edu howell@westmont.edu

Complimentary software to accompany the textbook:

COMPLEX ANALYSIS: for Mathematics & Engineering, 4th Ed, 2001, ISBN: 0-7637-1425-9
Jones and Bartlett Publishers, Inc., 40 Tall Pine Drive, Sudbury, MA 01776
Tele. (800) 832-0034; FAX: (508) 443-8000, E-mail: mkt@jbpub.com, http://www.jbpub.com/


CHAPTER 10 APPLICATIONS of HARMONIC FUNCTIONS

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

Let D be a domain whose boundary is made up of piecewise smooth contours joined end to end. The Dirichelet problem is to find a function that is harmonic in D takes on prescribed values at points on the boundary.

 

Theorem 10.1 Let Phi(u,v) be harmonic in a domain G in the w-plane. Then Phi satisfies Laplace's equation

Phi[uu]*(u, v)+Phi[vv]*(u, v) = 0

 

at each point w = u+i*v in G . If

 

w = f(z) = u(x,y)+i*v(x,y)

 

is a conformal mapping from a domain D in the z-plane onto G , then the composition

phi(x,y) = Phi(u(x,y),v(x,y))

 

is harmonic in D , and phi satisfies Laplace's equation

 

Phi[uu]*(u, v)+Phi[vv]*(u, v) = 0

 

at each point z = x+i*y in D .

 

Load Maple's "contourplot" and "cylinderplot" procedures.
Make sure this is done only ONCE during a Maple session.

> with(plots):

 

Warning, the name changecoords has been redefined

Example 10.4, Page 390. Show that v(x,y) = arctan(2*x/(x^2+y^2-1)) is harmonic in the disk abs(z) < 1 .

> x:='x': y:='y': v:='v': V:='V':
V := proc(x,y) arctan(2*x/(x^2 + y^2 - 1)) end:
`V(x,y) ` = V(x,y);

`V(x,y) ` = arctan(2*x/(x^2+y^2-1))

Verify that Laplace's equation holds.

> Vx := simplify(diff(V(x,y), x)): v[x](x,y) = Vx;
Vy := simplify(diff(V(x,y), y)): v[y](x,y) = Vy;
Vxx := simplify(diff(V(x,y), x$2)): v[xx](x,y) = Vxx;
Vyy := simplify(diff(V(x,y), y$2)): v[yy](x,y) = Vyy;
` `; v[xx](x,y) + v[yy](x,y) = Vxx + Vyy;

v[x](x,y) = -2*(x^2-y^2+1)/(x^4+2*x^2*y^2+2*x^2+y^4...

v[y](x,y) = -4*x*y/(x^4+2*x^2*y^2+2*x^2+y^4-2*y^2+1...

v[xx](x,y) = 4*(x^4-2*x^2*y^2+2*x^2+2*y^2+1-3*y^4)*...

v[yy](x,y) = -4*(x^4-2*x^2*y^2+2*x^2+2*y^2+1-3*y^4)...

` `

v[xx](x,y)+v[yy](x,y) = 0

 

Show that v(x,y) is the real part of a certain analytic function.

> w:='w': z:='z': Z:='Z':
Z := (I+z)/(I-z):
w := log(Z): `f(z) ` = w;
z := x + I*y:
Z := simplify(evalc(Z)):
w := log(Z): `f(z) ` = w;
w := simplify(evalc(log(Z))): `f(z) ` = w;

`f(z) ` = ln((I+z)/(I-z))

`f(z) ` = ln(-(x^2+y^2-1+2*I*x)/(x^2-2*y+1+y^2))

`f(z) ` = 1/2*ln((x^2+1+y^2+2*y)/(x^2-2*y+1+y^2))+I...

 

Check out the imaginary part of f(z) .

> x:='x': y:='y': v:='v':
v := proc(x,y)
arctan(2*x,(x^2 + y^2 - 1));
end:
`v(x,y) ` = v(x,y);
`V(x,y) ` = V(x,y);
`v(-1,1) ` = v(-1,1);
`V(-1,1) ` = V(-1,1);

`v(x,y) ` = arctan(2*x,x^2+y^2-1)

`V(x,y) ` = arctan(2*x/(x^2+y^2-1))

`v(-1,1) ` = -arctan(2)

`V(-1,1) ` = -arctan(2)

 

Example 10.5, Page 391. Show that F(u,v) = Arg(w-u[0])/pi = F(u,v) = arctan(v/(u-u[0]))/pi
is harmonic in the upper half plane 0 < Im(w) and has boundary values:
F(u,0) = 0 for u[0] < u ,
F(u,0) = 1 for u < u[0] .

> f:='f': F:='F': u:='u': u0:='u0': U:='U': v:='v': V:='V': w:='w':
f := proc(w,u0) 1/Pi * log(w - u0) end:
F := proc(u,v,u0) 1/Pi * evalc(log(u + I*v - u0)) end:
`f(w,u0) ` = f(w,u0);
`F(u,v,u0) ` = F(u,v,u0);

`f(w,u0) ` = 1/Pi*ln(w-u0)

`F(u,v,u0) ` = 1/Pi*(1/2*ln((u-u0)^2+v^2)+I*arctan(...

 

> P:='P': Q:='Q': U:='U': V:='V':
P := proc(w,u0) 1/Pi * log(abs(w - u0)) end:
Q := proc(w,u0) 1/Pi * argument(w - u0) end:
U := proc(u,v,u0) 1/(2*Pi) * log((u-u0)^2+v^2) end:
V := proc(u,v,u0) 1/Pi * arctan(v, u - u0) end:
`P(w,u0) ` = P(w,u0);
`Q(w,u0) ` = Q(w,u0);
`U(u,v,u0) ` = U(u,v,u0);
`V(u,v,u0) ` = V(u,v,u0);

`P(w,u0) ` = 1/Pi*ln(abs(-w+u0))

`Q(w,u0) ` = 1/Pi*argument(w-u0)

`U(u,v,u0) ` = 1/2/Pi*ln((u-u0)^2+v^2)

`V(u,v,u0) ` = 1/Pi*arctan(v,u-u0)

Check out the imaginary parts of V(u,v,u[0]) . For example, set u[0] = 1 .

> print(`u ` = 2,` v ` = 0,` u0 ` = 1);
`V(2,0,1) ` = V(2,0,1);
print(`u ` = 0,` v ` = 0,` u0 ` = 1);
`V(0,0,1) ` = V(0,0,1);

`u ` = 2, ` v ` = 0, ` u0 ` = 1

`V(2,0,1) ` = 0

`u ` = 0, ` v ` = 0, ` u0 ` = 1

`V(0,0,1) ` = 1

 

> u:='u': u0:='u0': v:='v': V:='V':
V := proc(u,v,u0) 1/Pi * arctan(v, u - u0) end:
`V(u,v,1) ` = V(u,v,1);
plot3d(V(u,v,1), u=0..2, v=0..1,
title=`s = 1/Pi * arctan(v, u-1)`,
labels=['u','v','s'],
orientation=[-70,50], axes=normal,
grid=[21,11], tickmarks=[5,5,5],
scaling=constrained);

`V(u,v,1) ` = 1/Pi*arctan(v,u-1)

[Maple Plot]

 


Example 10.6, Page 393. Find a function f(x,y) that is harmonic in the
upper half-plane
0 < Re*z , which takes on the boundary values:
f(x,0) = 4 , when `x < -1` ,
f(x,0) = 1 , when `-1 < x < 0` ,
f(x,0) = 3 , when `0 < x < 1` ,
f(x,0) = 2 , when `1 < x` .

> x1 := -1: x2 := 0: x3 := 1:
a0 := 4: a1 := 1: a2 := 3: a3 := 2:
x:='x': y:='y': v:='v':
v := proc(x,y)
a3 + (a0-a1)*argument(x+I*y-x1)/Pi +
(a1-a2)*argument(x+I*y-x2)/Pi +
(a2-a3)*argument(x+I*y-x3)/Pi;
end:
`x1 `=x1, ` x2 `=x2, ` x3 `=x3;
`a0 `=a0, ` a1 `=a1, ` a2 `=a2, ` a3 `=a3;
`v(x,y) ` = v(x,y);

`x1 ` = -1, ` x2 ` = 0, ` x3 ` = 1

`a0 ` = 4, ` a1 ` = 1, ` a2 ` = 3, ` a3 ` = 2

`v(x,y) ` = 2+3*argument(x+I*y+1)/Pi-2*argument(x+I...

 

> `v(x,y) ` = v(x,y);
contourplot(v(x,y), x=-2..2, y=0.0001..1.5,
title=`v(x,y) = 2+(3Arg(z+1)-2Arg(z)+Arg(z-1))/Pi`,
axes=boxed, grid=[30,20],
scaling=constrained);

`v(x,y) ` = 2+3*argument(x+I*y+1)/Pi-2*argument(x+I...

[Maple Plot]

 


Example 10.7, Page 393. Find a function f(x,y) that is harmonic in the
upper half-plane
0 < Re(z) , which takes on the boundary values:
f(x,0) = 1 when abs(x) < 1 ,
f(x,0) = 0 when 1 < abs(x) .

> x1 := -1: x2 := 1:
a0 := 0: a1 := 1: a2 := 0:
x:='x': y:='y': v:='v':
v := proc(x,y)
a2 + (a0-a1)*argument(x+I*y - x1)/Pi +
(a1-a2)*argument(x+I*y - x2)/Pi;
end:
`x1 `=x1, ` x2 `=x2;
`a0 `=a0, ` a1 `=a1, ` a2 `=a2;
`v(x,y) ` = v(x,y);

`x1 ` = -1, ` x2 ` = 1

`a0 ` = 0, ` a1 ` = 1, ` a2 ` = 0

`v(x,y) ` = -argument(x+I*y+1)/Pi+argument(x+I*y-1)...

> `v(x,y) ` = v(x,y);
plot3d(v(x,y), x=-2..2, y=0..1,
labels=['x','y','v'],
orientation=[-70,50], axes=normal,
grid=[21,11], tickmarks=[5,2,2],
scaling=constrained);

`v(x,y) ` = -argument(x+I*y+1)/Pi+argument(x+I*y-1)...

[Maple Plot]

 

 

When we use Theorem 10.1, we see that the mapping in equation 10-7 gives rise to a new N-value Dirichlet problem in the upper half plane Im(w)*` > 0` for which the solution is given by Theorem 10.2. If we set a[0] = a[N] , then the solution to the Dirichlet problem in D with boundary values from equation 10-6 is

phi(x,y) = a[N-1] + 1/pi sum((a[k-1]-a[k])*Arg(f(z)-u[k]),k = 1 .. N-1) ,

or

phi(x,y) = a[N-1] + 1/pi sum((a[k-1]-a[k])*Arctan(v(x,y)/(u(x,y)-u[k])),k = ... ,

 

This method relies on our ability to construct a conformal mapping from D onto the upper half plane Im(w)*` > 0` . Theorem 9.4 guarantees the existence of such a conformal mapping.


Example 10.8, Page 395. Find a function f(x,y) that is harmonic in the
unit disk
abs(z) < 1 , which takes on the boundary values:
f(x,y) = 0 when z = exp(i*theta) and 0 < theta < pi ,
f(x,y) = 1 when z = exp(i*theta) and pi < theta < 2*pi .

> f:='f': F:='F': U:='U': V:='V': w:='w': x:='x': y:='y': z:='z':
w := I*(1 - z)/(1 + z): `w ` = w;
w := subs(z=x+I*y, w): `w ` = w;
w := simplify(evalc(w)): `w ` = w;
U := 2*y/((x+1)^2+y^2):
V := (1-x^2-y^2)/((x+1)^2+y^2): `w ` = U+I*V;
`Log(w) ` = log(w);
`Log(w) ` = evalc(log(w));
f := proc(x,y) arctan((1-x^2-y^2)/(2*y))/Pi end:
F := proc(x,y) arctan((1-x^2-y^2),(2*y))/Pi end:
`Take the imaginary part:`;
`f(x,y) ` = f(x,y);
`f(x,y) ` = F(x,y);

`w ` = I*(1-z)/(1+z)

`w ` = I*(1-x-I*y)/(x+I*y+1)

`w ` = -(-2*y+I*x^2+I*y^2-I)/(x^2+2*x+1+y^2)

`w ` = 2*y/((x+1)^2+y^2)+I*(-x^2-y^2+1)/((x+1)^2+y^...

`Log(w) ` = ln(-(-2*y+I*x^2+I*y^2-I)/(x^2+2*x+1+y^2...

`Log(w) ` = 1/2*ln(4*y^2/(x^2+2*x+1+y^2)^2+(-x^2-y^...

`Take the imaginary part:`

`f(x,y) ` = arctan(1/2*(-x^2-y^2+1)/y)/Pi

`f(x,y) ` = arctan(-x^2-y^2+1,2*y)/Pi

 


Example 10.9, Page 396. Find a function f(x,y) that is harmonic in the
upper half disk
H : 0 < y , abs(z) < 1 , which takes on the boundary values:
f(x,y) = 0 when z = exp(i*theta) and 0 < theta < pi ,
f(x,0) = 1 for `-1 < x < 1` .

> f:='f': u:='u': U:='U': V:='V': w:='w': x:='x': y:='y': z:='z':
w := I*(1 - z)/(1 + z): `w ` = w;
w := subs(z=x+I*y, w): `w ` = w;
w := simplify(evalc(w)): `w ` = w;
U := 2*y/((x+1)^2+y^2):
V := (1-x^2-y^2)/((x+1)^2+y^2): `w ` = U+I*V;
`Log(w) ` = log(w);
`Log(w) ` = evalc(log(w));
u := proc(x,y) arctan((1-x^2-y^2)/(2*y))/Pi end:
f := proc(r,t) simplify(u(r*cos(t),r*sin(t))) end:
`Take the imaginary part:`;
`u(x,y) ` = u(x,y);
`f(r,t) ` = f(r,t);

`w ` = I*(1-z)/(1+z)

`w ` = I*(1-x-I*y)/(x+I*y+1)

`w ` = -(-2*y+I*x^2+I*y^2-I)/(x^2+2*x+1+y^2)

`w ` = 2*y/((x+1)^2+y^2)+I*(-x^2-y^2+1)/((x+1)^2+y^...

`Log(w) ` = ln(-(-2*y+I*x^2+I*y^2-I)/(x^2+2*x+1+y^2...

`Log(w) ` = 1/2*ln(4*y^2/(x^2+2*x+1+y^2)^2+(-x^2-y^...

`Take the imaginary part:`

`u(x,y) ` = arctan(1/2*(-x^2-y^2+1)/y)/Pi

`f(r,t) ` = -arctan(1/2*(-1+r^2)/r/sin(t))/Pi

 


Example 10.10, Page 397. Find a function f(x,y) that is harmonic in the
upper half disk
G : 0 < x , 0 < y , abs(z) < 1 , which takes on the boundary values:
f(x,y) = 0 when z = exp(i*theta) and 0 < theta < pi/2 ,
f(x,0) = 1 for 0 <= x < 1 ,
f(0,y) = 1 for 0 <= y < 1 .

> f:='f': u:='u': U:='U': V:='V': w:='w': x:='x': y:='y': z:='z':
w := I*(1 - z^2)/(1 + z^2): `w ` = w;
w := subs(z=x+I*y, w): `w ` = w;
w := simplify(evalc(w)): `w ` = w;
`Log(w) ` = log(w);
`Log(w) ` = evalc(log(w));
u := proc(x,y) 2*arctan((1-(x^2+y^2)^2)/(4*x*y))/Pi end:
f := proc(r,t) simplify(u(r*cos(t),r*sin(t))) end:
`Take the imaginary part:`;
`u(x,y) ` = u(x,y);
`f(r,t) ` = f(r,t);

`w ` = I*(1-z^2)/(1+z^2)

`w ` = I*(1-(x+I*y)^2)/(1+(x+I*y)^2)

`w ` = -(-4*y*x-I+I*x^4+2*I*x^2*y^2+I*y^4)/(x^4+2*x...

`Log(w) ` = ln(-(-4*y*x-I+I*x^4+2*I*x^2*y^2+I*y^4)/...

`Log(w) ` = 1/2*ln(16*x^2*y^2/(x^4+2*x^2*y^2+2*x^2+...
`Log(w) ` = 1/2*ln(16*x^2*y^2/(x^4+2*x^2*y^2+2*x^2+...

`Take the imaginary part:`

`u(x,y) ` = 2*arctan(1/4*(1-(y^2+x^2)^2)/y/x)/Pi

`f(r,t) ` = -2*arctan(1/4*(-1+r^4)/r^2/sin(t)/cos(t...

 

End of Section 10.2.