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 3 ANALYTIC and HARMONIC FUNCTIONS

Section 3.3 Harmonic Functions

Let phi(x,y) be a real-valued function of the two real variables x and y . The partial differential equation

 

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

 

is known as L aplace's equation and is sometimes referred to as the potential equation. If phi , phi[x] , phi[y] , phi[xx] , phi[xy] , and phi[yy] are all continuous and if phi(x,y) satisfies Laplace's equation, then phi(x,y) is called a harmonic function . Harmonic functions are important in the areas of applied mathematics, engineering, and mathematical physics. They are used to solve problems involving steady state temperatures, two-dimensional electrostatics, and ideal fluid flow. In Chapter 10 we will see how complex analysis techniques can be used to solve some problems involving harmonic functions. We begin with an important theorem relating analytic and harmonic functions.

 

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

> with(plots):

 

Warning, the name changecoords has been redefined

 

 

Theorem 3.8 Let f(x+i*y) = u(x,y)+i*v(x,y) be an analytic function in the domain D . Assume that all of the second-order partial derivatives of u(x,y) and v(x,y) are continuous. Then both u and v are harmonic functions in D . In other words, the real and imaginary parts of an analytic function are harmonic.


Example for Page 115. Show that the complex function
f(z) = x^2+y^2+i*2*x*y is NOWHERE analytic.

> U:='U': V:='V': x:='x': y:='y':
U := proc(x,y) x^2 + y^2 end:
V := proc(x,y) 2*x*y end:
`F(x,y)` = U(x,y) + I*V(x,y);
`U(x,y)` = U(x,y);
`V(x,y)` = V(x,y); ` `;
`Look at the Cauchy-Riemann equations.`;
`Ux(x,y)` = diff(U(x,y),x);
`Vy(x,y)` = diff(V(x,y),y);
print(`Ux = Vy `,diff(U(x,y),x) = diff(V(x,y),y),
evalb(diff(U(x,y),x) = diff(V(x,y),y)));
` `;
`Uy(x,y)` = diff(U(x,y),y);
`Vx(x,y)` = diff(V(x,y),x);
print(`Uy = -Vx `,diff(U(x,y),y) = - diff(V(x,y),x),
evalb(diff(U(x,y),y) = - diff(V(x,y),x)));

`F(x,y)` = x^2+y^2+2*I*y*x

`U(x,y)` = x^2+y^2

`V(x,y)` = 2*y*x

` `

`Look at the Cauchy-Riemann equations.`

`Ux(x,y)` = 2*x

`Vy(x,y)` = 2*x

`Ux = Vy   `, 2*x = 2*x, true

` `

`Uy(x,y)` = 2*y

`Vx(x,y)` = 2*y

`Uy = -Vx   `, 2*y = -2*y, false

>

Therefore, f(z) is differentiable only when y = 0 . Since f(z) is NOT differentiable in any open neighborhood, f(z) is NOWHERE analytic.

 

 

If we are given a function u(x,y) that is harmonic in the domain D and if we can find another harmonic function v(x,y) , such that the partial derivatives for u and v satisfy the Cauchy-Riemann equations throughout D , then we say that v(x,y) is a harmonic conjugate of u(x,y) . It then follows that the function f(x+i*y) = u(x,y)+i*v(x,y) is analytic in D .

 


Example 3.11, Page 115. Show that both U(x,y) = x^2-y^2 and V(x,y) = 2*x*y are harmonic functions, and V is the harmonic conjugate of U .

 

> f:='f': U:='U': V:='V': w:='w': x:='x': y:='y': z:='z':
f := z -> z^2:
`f(z) ` = f(z);
`f(z) is an analytic function.`;
`f(x + I y) ` = f(x+I*y);
`f(x + I y) ` = evalc(f(x+I*y)); ` `;
U := proc(x,y) x^2 - y^2 end:
V := proc(x,y) 2*x*y end:
`The real and imaginary parts are harmonic functions.`;
`Re(f(z) = U(x,y)` = U(x,y);
`Im(f(z) = V(x,y)` = V(x,y);

`f(z) ` = z^2

`f(z) is an analytic function.`

`f(x + I y) ` = (x+I*y)^2

`f(x + I y) ` = x^2+2*I*x*y-y^2

` `

`The real and imaginary parts are harmonic function...

`Re(f(z) = U(x,y)` = x^2-y^2

`Im(f(z) = V(x,y)` = 2*x*y

 

And we can show that both U(x,y) and V(x,y) satisfy Laplace's equation.

 

> `U(x,y) ` = U(x,y); `V(x,y) ` = V(x,y);
`Verify Laplace's equation.`;
`Uxx(x,y) ` = diff(U(x,y),x$2);
`Uyy(x,y) ` = diff(U(x,y),y$2);
print(`0 = Uxx + Uyy `,
0 = diff(U(x,y),x$2) + diff(U(x,y),y$2),
evalb(0 = diff(U(x,y),x$2) + diff(U(x,y),y$2)));
`Vxx(x,y) ` = diff(V(x,y),x$2);
`Vyy(x,y) ` = diff(V(x,y),y$2);
print(`0 = Vxx + Vyy `,
0 = diff(V(x,y),x$2) + diff(V(x,y),y$2),
evalb(0 = diff(V(x,y),x$2) + diff(V(x,y),y$2)));

`U(x,y) ` = x^2-y^2

`V(x,y) ` = 2*x*y

`Verify Laplace's equation.`

`Uxx(x,y) ` = 2

`Uyy(x,y) ` = -2

`0 = Uxx + Uyy   `, 0 = 0, true

`Vxx(x,y) ` = 0

`Vyy(x,y) ` = 0

`0 = Vxx + Vyy   `, 0 = 0, true

 

Hence, both U(x,y) and V(x,y) are harmonic functions.


Example 3.12, Page 115. Show that both U(x,y) = x^3-3*x*y^2 and V(x,y) = 3*x^2*y-y^3 are harmonic functions, and V is the harmonic conjugate of U .

 

> f:='f': U:='U': V:='V': w:='w': x:='x': y:='y': z:='z':
f := z -> z^3:
`f(z) ` = f(z);
`f(z) is an analytic function.`;
`f(x + I y) ` = f(x+I*y);
`f(x + I y) ` = evalc(f(x+I*y)); ` `;
U := proc(x,y) x^3 - 3*x*y^2 end:
V := proc(x,y) 3*x^2*y - y^3 end:
`The real and imaginary parts are harmonic functions.`;
`Re(f(z)) = U(x,y)` = U(x,y);
`Im(f(z)) = V(x,y)` = V(x,y);

`f(z) ` = z^3

`f(z) is an analytic function.`

`f(x + I y) ` = (x+I*y)^3

`f(x + I y) ` = x^3-3*x*y^2+I*(3*x^2*y-y^3)

` `

`The real and imaginary parts are harmonic function...

`Re(f(z)) = U(x,y)` = x^3-3*x*y^2

`Im(f(z)) = V(x,y)` = 3*x^2*y-y^3

 

And we can show that both U(x,y) and V(x,y) satisfy Laplace's equation

 

> `U(x,y) ` = U(x,y); `V(x,y) ` = V(x,y);
`Verify Laplace's equation.`;
`Uxx(x,y) ` = diff(U(x,y),x$2);
`Uyy(x,y) ` = diff(U(x,y),y$2);
print(`0 = Uxx + Uyy `,
0 = diff(U(x,y),x$2) + diff(U(x,y),y$2),
evalb(0 = diff(U(x,y),x$2) + diff(U(x,y),y$2)));
`Vxx(x,y) ` = diff(V(x,y),x$2);
`Vyy(x,y) ` = diff(V(x,y),y$2);
print(`0 = Vxx + Vyy `,
0 = diff(V(x,y),x$2) + diff(V(x,y),y$2),
evalb(0 = diff(V(x,y),x$2) + diff(V(x,y),y$2)));

`U(x,y) ` = x^3-3*x*y^2

`V(x,y) ` = 3*x^2*y-y^3

`Verify Laplace's equation.`

`Uxx(x,y) ` = 6*x

`Uyy(x,y) ` = -6*x

`0 = Uxx + Uyy   `, 0 = 0, true

`Vxx(x,y) ` = 6*y

`Vyy(x,y) ` = -6*y

`0 = Vxx + Vyy   `, 0 = 0, true

 

Hence, both U(x,y) and V(x,y) are harmonic functions.

 

 

Theorem 3.9 (Construction of a conjugate)

 

Let u(x,y) be harmonic in an epsilon -neighborhood of the point ( x[0], y[0] ). Then there exists a conjugate harmonic function v(x,y) defined in this neighborhood such that f(x+i*y) = u(x,y)+i*v(x,y) is an analytic function.

 


METHOD. Construction of the harmonic conjugate of U(x,y) .
Activate the following procedure before doing Example 3.13, Page 117.

> conj:='conj': U:='U': V:='V': x:='x': y:='y':
conj := proc(U)
local lap,v1,v2,v3,v4;
lap := diff(U,x$2)+diff(U,y$2);
v1 := int(diff(U,x), y);
v2 := - diff(U,y) - diff(v1,x);
v3 := int(v2,x);
v4 := v1 + v3;
if lap=0 then
RETURN(v4)
else
RETURN(`U(x,y) was Not harmonic.`)
fi
end:

 

 

Example 3.13, Page 117. Show that U(x,y) = x*y^3-x^3*y is a harmonic function and find the harmonic conjugate V(x,y) .

> U := proc(x,y) x*y^3 - x^3*y end:
`U(x,y) ` = U(x,y);
`Verify Laplace's equation.`;
`Uxx(x,y) ` = diff(U(x,y),x$2);
`Uyy(x,y) ` = diff(U(x,y),y$2);
print(`0 = Uxx + Uyy `,
0 = diff(U(x,y),x$2) + diff(U(x,y),y$2),
evalb(0 = diff(U(x,y),x$2) + diff(U(x,y),y$2)));
` `; `The harmonic conjugate is:`;
V := conj(U(x,y)):
`V(x,y) ` = V;

`U(x,y) ` = x*y^3-x^3*y

`Verify Laplace's equation.`

`Uxx(x,y) ` = -6*x*y

`Uyy(x,y) ` = 6*x*y

`0 = Uxx + Uyy   `, 0 = 0, true

` `

`The harmonic conjugate is:`

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

 

 

Example 3.14, Page 119. Show that U(x,y) = x^2-y^2 is the scalar potential function for the fluid flow: V(x,y) = 2*x-i*2*y .

> f:='f': F:='F': U:='U': V:='V': x:='x':
X:='X': y:='y': Y:='Y': z:='z': Z:='Z':
assume(X,real); assume(Y,real);
F := z -> z^2:
`F(z) ` = F(z);
f := z -> subs(Z=z, diff(F(Z), Z)):
`f(z) = F '(z)`;
`f(z) ` = f(z);
`f(x + I y) ` = f(x+I*y);
v := conjugate(f(X+I*Y)):
V := proc(x,y) subs({X=x,Y=y},v) end:
`V(x,y) ` = V(x,y);
`F(x + I y) ` = F(x+I*y);
`F(x + I y) ` = evalc(F(x+I*y));
U := proc(x,y) x^2-y^2 end:
`U(x,y) ` = U(x,y);

`F(z) ` = z^2

`f(z) = F '(z)`

`f(z) ` = 2*z

`f(x + I y) ` = 2*x+2*I*y

`V(x,y) ` = 2*x-2*I*y

`F(x + I y) ` = (x+I*y)^2

`F(x + I y) ` = x^2+2*I*x*y-y^2

`U(x,y) ` = x^2-y^2

 

> v:='v': x:='x': y:='y':
v := proc(x,y) 2*x*y end:
`v(x,y) ` = v(x,y);
contourplot(v(x,y), x=0..5, y=0..5,
title=`The streamlines 2xy = C`,
scaling=constrained,
axes=boxed, grid=[30,30]);

`v(x,y) ` = 2*x*y

[Maple Plot]

 

End of Section 3.3.