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 5  ELEMENTARY FUNCTIONS

Needs["Graphics`ComplexMap`"]; 
Needs["Graphics`Colors`"]; 
a = b = d = t = u = v = w = x = y = z = Z = 
                            0; 
Clear[a, b, cos, cosZ, d, eq1, eq2, f, f2, n, r, set, sin, S, S12, 
        S13, t, t1, t2, table, θ, u, U, v, v1, v2, v3, v4, v5, v6, V, 
        w, w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, x, x1, x2, y, y1, y2, z, 
        z0, z1, z2, z3, z4, zn, Z];

Section 5.1	The Complex Exponential Function

Section 5.2	Branches of the Complex Logarithm Function

Section 5.3  Complex Exponents

In Section 1.5 we indicated that the complex numbers are complete in the sense that it is possible to make sense out of expressions such as (Sqrt[1 + i]) or (((-1))^i) without appealing to a number system beyond the framework of complex numbers. We will do this by taking note of some rudimentary properties of the complex exponential and logarithm, and then using our imagination.

We begin by generalizing Identity (5-15). Equations (5-12) and (5-14) show that log (z) can be expressed as the set log (z)={Log (z)+i 2 n π: n is an integer}. It is easy to show (we leave as an exercise) that for z ≠ 0, (e^((Subscript[log, α]) (z))) = z, where (Subscript[log, α]) (z) is any branch of the function log (z). But this means that for any ζ ∈ log (z), the identity (e^ζ) = z holds true. Since (e^(log (z))) denotes the set {(e^ζ) :  ζ ∈ 
            log (z)}, we see that (e^((Subscript[log, α]) (z))) = z, for z ≠ 0.

Next, we note that identity (5-17) gives us log ((z^n)) = n log (z), where n is any natural number, so that \(e\^\(log \((z\^n)\)\) = \(e\^\(n\ log \((z)\)\) = z\^n\)\) for z ≠ 0.  With these preliminaries out of the way we are now in a position to come up with a definition of what is meant by a complex number raised to a complex power.

Definition 5.4,  Page 177.  Let  c  be a complex number.   We define  (z^c)  as follows  

			(z^c) =  (e^(c log (z))).

This definition makes sense, since if both  z  and  c  are real numbers with  z > 0, and it gives the familiar (real) definition for  (z^c).

	Since  log (z)  is multivalued, the function  (z^c)  will in general be multivalued.  The function  f  given by  f (z) = exp (c Log (z))  is called the principal branch of the multivalued function  (z^c).  Note that the principal branch of  (z^c)  is obtained from the definition by replacing  log (z)  with the principal branch of the logarithm.

Example 5.6,  Page 177. Find (4^(1/2)).

Solution 5.6.

Enter  (Subscript[z, 0]) = 4  and find the principal value of  (4^(1/2)).

Remove[w]; 
Clear[e, pts, W]; 
(Subscript[w, 0])  =  (4^(1/2)); 
(Subscript[w, 1])  =  (E^((1/2) ( Log[4] + I 2  n π))); 
(Subscript[w, 2])  =  (e^((1/2) 
                Log[4])) (E^((1/2) I 2  n π)); 
Print[""]; 
\(\(Print[\*""\!\(w\_0\) = \!\(4\^\(1/2\)\)""];\)\ \)
\(\(Print[\*""\!\(w\_0\) = "", w\_0];\)\ \)
Print[""]; 
\(\(Print[\*""\!\(w\_1\) = \!\(4\^\(1/2\)\) = "", 
        w\_1];\)\ \)
\(\(Print[\*""\!\(w\_1\) = "", w\_1];\)\ \)
(Subscript[w, 1])  =  ComplexExpand[(Subscript[w, 1])] ; 
\(\(Print[\*""\!\(w\_1\) = "", w\_1];\)\ \)
(Subscript[w, 1])  =  Simplify[(Subscript[w, 1]), Element[n, Integers]]; 
\(\(Print[\*""\!\(w\_1\) = "", w\_1];\)\ \)
Print[""]; 
\(\(Print[\*""(Subscript[w, 2]) = (4^(1/2)) = (e^((1/2) Log[4]))(E^((1/2) I2nπ))""];\)\ \)
\(\(Print[\*""(Subscript[w, 2]) = "", \(e\^\(\(1\/2\) 
                Log[4]\)\) E\^\(\(1\/2\) I\ 2  n\ π\)];\)\ \)
\(\(Print[\*""(Subscript[w, 2]) = "", \(e\^\(\(1\/2\) Log[4]\)\) 
          ComplexExpand[E\^\(\(1\/2\) I\ 2  n\ π\)]];\)\ \)
\(\(Print[\*""\!\(w\_2\) = "", \(e\^\(\(1\/2\) Log[4]\)\) 
          Simplify[E\^\(\(1\/2\) I\ 2  n\ π\), 
            Element[n, Integers]]];\)\ \)
\(\(Print[\*""\!\(w\_2\) = "", 
        Simplify[e\^\(\(1\/2\) Log[4]\)] 
          Simplify[E\^\(\(1\/2\) I\ 2  n\ π\), 
            Element[n, Integers]]];\)\ \)
\(\(Print[\*""\!\(w\_2\) = "", 
        Simplify[E\^\(\(1\/2\) I\ 2  n\ π\), 
          Element[n, Integers]], " ", 
        Simplify[E\^\(\(1\/2\) Log[4]\)]];\)\ \)

Example 5.7,  Page 178.  (a) Find the principal value of  (((1 + i))^(1/2)),  (b) Find the principal value of  (((-1))^i).

Solution 5.7.

(a) Enter  (Subscript[z, 0]) = 1 + i  and find the principal value of  (((1 + i))^(1/2)).

Remove[z, w]; 
Clear[e]; 
(Subscript[z, 0])  =  1  +  I; 
(Subscript[w, 0])  =  ComplexExpand[Log[(Subscript[z, 0])]]; 
(Subscript[w, 1])  =  
        ComplexExpand[(E^((1/2) Log[(Subscript[z, 0])]))]; 
(Subscript[w, 2])  =  ComplexExpand[(Sqrt[(Subscript[z, 0])])]; 
(Subscript[w, 3])  = N[(Sqrt[(Subscript[z, 0])])]; 
Print["Log[", (Subscript[z, 0]), "] = ", 
        (Subscript[w, 0])]; 
Print[""]; 
Print[(e^((1/2) Log[(Subscript[z, 0])])), " = ", (Subscript[w, 1])]; 
Print[" "]; 
Print["   ", (Sqrt[(Subscript[z, 0])]), " = ", (Subscript[w, 2])]; 
Print["   ", (Sqrt[(Subscript[z, 0])]), " = ", 
        (Subscript[w, 3])];

(b) Find the principal value of  (((-1))^i).

Remove[w]; 
Clear[e]; 
(Subscript[w, 1])  =  (E^(I Log[-1])); 
(Subscript[w, 2])  = ComplexExpand[(((-1))^I)]; 
(Subscript[w, 3])  = 
        Chop[N[(((-1))^I)]]; 
\(\(Print[\*""\!\(E\^\(I\\ Log[\(-1\)]\)\) = "", w\_1];\)\ \)
Print[" "]; 
\(\(Print[\*""  (-1\!\(\()\^I\)\) = "", 
        w\_2];\)\ \)
\(\(Print[\*""  (-1\!\(\()\^I\)\) = "", 
        w\_3];\)\ \)

Let us now consider the various possibilities that may arise in the definition of  (z^c).  

Case (i).  Suppose  c = k  is an integer, i.e.  c  =  k   =   ...  , -2, -1, 0, 1, 
        2,  ...   then  (z^k)= \(\(r\^k\) \((cos\ k\ θ\  + \ i\ sin\ k\ θ)\)\).  

This is easy to establish.  If  z = r (e^(i θ))  then  k log (z) = 
        k ln (r) + i k (θ + 2 π n),  where  n  is an integer, and we have 
\(z\^k = \ \(e\^\(k\ log \((z)\)\) = \ \(e\^\(k\ ln \((r)\)\  + \ i\ k \((θ\  + \ 2\ π\ n)\)\) = \(\(e\^\(\(k\ ln \((r)\)\)\(\ \)\)\) e\^\(i\ k\ θ\  + \ i\ 2\ π\ n\) = \(\(r\^k\) e\^\(i\ k\ θ\) = \(r\^k\) \((cos\ k\ θ\  + \ i\ sin\ kθ)\)\)\)\)\)\).  This is the single valued  (k^th)  power of  z.

Case (ii).  Suppose  c = (1/k)  where k is a positive integer, i.e.  c  =  (1/k)   =  (1/1), (1/2), (1/3), (1/4),  ...   then  (z^((1/k)))= \(\(r\^\(1\/k\)\) \((cos\ \(θ\  + \ 2  π\ n\)\/k\  + \ i\ sin\ \(θ\  + \ 2  π\ n\)\/k)\)\)  for  n  =  0, 1, 2,  ... , k - 1.  

This is easy to establish.  If  z = r (e^(i θ))  then  \(1\/k\ log \((z)\) = 
        1\/k\ ln \((r)\) + \(i\ \((θ\  + \ 2\ π\ n)\)\)\/k\),  where  n  is an integer, and we have 
\(z\^\(1\/k\) = \ \(e\^\(1\/k\ log \((z)\)\) = \ \(e\^\(1\/k\ ln \((r)\)\  + \ i\ \((\(θ\  + \ 2\ π\ n\)\/k)\)\) = \(\(e\^\(\(1\/k\ ln \((r)\)\)\(\ \)\)\) e\^\(i\ \((\(θ\  + \ 2\ π\ n\)\/k)\)\) = \(r\^\(1\/k\)\) \((cos\ \(θ\  + \ 2  π\ n\)\/k\  + \ i\ sin\ \(θ\  + \ 2  π\ n\)\/k)\)\)\)\)\)  for  n  =  0, 1, 2,  ... , k - 1.  This is the multi valued  (k^th)  root of  z.

Case (iii).  Suppose  c = (j/k)  where j and k are a positive integers that have no common factors, i.e.  then  (z^((j/k)))= \(\(r\^\(j\/k\)\) \((cos\ \(\((θ\  + \ 2  π\ n)\) j\)\/k\  + \ i\ sin\ \(\((θ\  + \ 2  π\ n)\) j\)\/k)\)\)  for  n  =  0, 1, 2,  ... , k - 1.  

This is easy to establish.  If  z = r (e^(i θ))  then  \(j\/k\ log \((z)\) = 
        j\/k\ ln \((r)\) + i\ \((\(\((θ\  + \ 2  π\ n)\) j\)\/k)\)\),  where  n  is an integer, and we have 
\(z\^\(j\/k\) = \ \(e\^\(j\/k\ log \((z)\)\) = \ \(\(e\^\(\(j\/k\ ln \((r)\)\)\(\ \)\)\) e\^\(i\ \((\(\((θ\  + \ 2  π\ n)\) j\)\/k)\)\) = \(r\^\(j\/k\)\) \((cos\ \(\((θ\  + \ 2  π\ n)\) j\)\/k\  + \ i\ sin\ \(\((θ\  + \ 2  π\ n)\) j\)\/k)\)\)\)\)  for  n  =  0, 1, 2,  ... , k - 1.  

Case (iv).  Suppose  c  is not a rational number, then there are infinitely many values for  (z^c).

Example 5.8,  Page 179.  Find all the values of  (2^(1/9  +  i/50)).

Solution 5.8.

(a) Enter  (Subscript[w, 0]) = (2^(1/9  +  i/50))  and find the principal value.

Remove[w]; 
Clear[e, pts, W]; 
W  =  
        (e^(((1/9) + (I/50)) Log[2])); 
(Subscript[w, 0])  =  
        (2^(1/9  +  I/50)); 
(Subscript[w, 1])  =  (E^(((1/9)  + (( I)/50)) Log[2])); 
\(\(Print[\*""\!\(w\_0\) = "", W];\)\ \)
\(\(Print[\*""\!\(w\_0\) = "", 
        ComplexExpand[w\_0]];\)\ \)
\(\(Print[\*""\!\(w\_0\) = "", \ 
        N[w\_0]];\)\ \)
Print[""]; 
\(\(Print[\*""\!\(w\_1\) = "", 
        w\_1];\)\ \)
\(\(Print[\*""\!\(w\_1\) = "", 
        N[w\_1]];\)\ \)
Print[""]; 
\(\(Print[\*""Does \!\(w\_0\) = \!\(w\_1\) ? "", 
        w\_0 == w\_1];\)\ \)

(b) Enter  (Subscript[w, 0]) = (2^(1/9  +  i/50))  and find some of its values.

Remove[w]; 
(Subscript[w, 0]) = (E^(((1/9)  + (( I)/50)) (Log[2] + 2  π I n))); 
table = 
        Table[ComplexExpand[(Subscript[w, 0])], {n, -9, 9, 
            1}]; 
table = 
        Prepend[Append[
            table, "..."], "..."]; 
\(\(Print[\*""\!\(2\^\(1/9 + I/50\)\) = "", 
        w\_0];\)\ \)
Print["        = ", table];

Use Mathematica to plot some of the values of  (2^(1/9  +  i/50)).

\(
\(Remove[w];\)\ \)
w = (E^(((1/9)  + (( I)/50)) (Log[2] + 2  π I n))); 
pts = Table[{Re[w], Im[w]}, {n, -9, 9, 1}]; 
ListPlot[pts, PlotRange -> {{-2, 3.5}, {-2, 3.5}}, 
        Ticks -> {Range[-2, 3, 1], Range[-2, 3, 1]}, 
        AxesLabel -> {"x", "y"}, AspectRatio -> 1, 
        Prolog -> {PointSize[0.02], Red}]; 
\(\(Print[\*""Some of the values of \!\(2\^\(1/9\\  + \\ I/50\)\)""];\)\ \)
Print[NumberForm[N[table], 3]];

The Rules for exponents, Page 180.  Some of the rules for exponents carry over from the real case.  If  c  and  d are complex numbers and  z ≠ 0,  then  

			(z^(-c)) = (1/(z^c))  ,

			(z^c) (z^d) = (z^(c + d)),

			((z^c)/(z^d)) = (z^(c - d)),

			((((z^c)))^n) = (z^(c n)), where n is an integer.  


	The following example shows that the last identity does not hold if n is replaced with an arbitrary complex value.

Example 5.9,  Page 180.  (a) Find all the values of  ((((i^2)))^i),  (b) Find all the values of  (i^(2  i)).

Solution 5.9.

First, enter  (Subscript[w, 1])=\(e\^\(i\ Log[i\^2]\)\)   and   (Subscript[w, 2])=\(e\^\(2  i\ Log[i]\)\)  and find the principal values.

Remove[t, w]; 
(Subscript[w, 1])  =  (E^(I Log[(I^2)])); 
(Subscript[w, 2])  =  (E^(2  I Log[I])); 
(Subscript[w, 3])  = 
        N[(E^(I Log[(I^2)]))]; 
(Subscript[w, 4])  =  
        N[(E^(2  I Log[I]))]; 
Print[((((I^2)))^I), " = ", 
        (Subscript[w, 1])]; 
Print["  ", (I^(2  I)), " = ", 
        (Subscript[w, 2])]; 
Print[""]; 
Print[((((I^2)))^I), " = ", 
        (Subscript[w, 3])]; 
Print["  ", (I^(2  I)), " = ", 
        (Subscript[w, 4])];

Second, find the other values in the solution sets.

(Subscript[t, 1])  =  
        Table[(E^(I (Log[(I^2)] + 2  π I n))), {n, -4, 4, 1}]; 
(Subscript[t, 2])  =  
        Table[(E^(2  I ( Log[I]   + 2  π I n))), {n, -4, 4, 
            1}]; 
(Subscript[set, 1])  =  
        Append[Prepend[
            (Subscript[t, 1]), "..."], "..."]; 
(Subscript[set, 2])  =  
        Append[Prepend[(Subscript[t, 2]), "..."], "..."]; 
Print[((((I^2)))^I), " = ", 
        (Subscript[set, 1])]; 
Print[""]; 
Print["  ", (I^(2  I)), " = ", 
        (Subscript[set, 2])];

Remark.  The two solution sets are different.  Therefore, in general ,  ((((z^a)))^b) ≠ (z^(a b)).  

The following computation is also interesting.

(Subscript[w, 1]) =  (E^(I (Log[(I^2)] + 2  π I n))); 
\(\(Print[\*""\!\(w\_1\) = "", 
        w\_1];\)\ \)
(Subscript[w, 1]) =  
        Simplify[(E^(I (Log[(I^2)] + 2  π I n))), 
          Element[n, Integers]]; 
\(\(Print[\*""\!\(w\_1\) = "", 
        w\_1];\)\ \)
Print[""]; 
(Subscript[w, 2]) =  (E^(2  I ( Log[I]   + 2  π I n))); 
\(\(Print[\*""\!\(w\_2\) = "", 
        w\_2];\)\ \)
(Subscript[w, 2]) =  
        Simplify[(E^(2  I ( Log[I]   + 2  π I n))), 
          Element[n, Integers]]; 
\(\(Print[\*""\!\(w\_2\) = "", 
        w\_2];\)\ \)
Print[""]; 
\(\(Print[\*""Does \!\(w\_1\) = \!\(w\_2\) ? ""];\)\ \)
Print[""]; 
eqn = (Subscript[w, 1])  ==  (Subscript[w, 2]); 
Print[eqn]; 
eqn = 
        Thread[eqn (E^((1 + 2 n) π)), 
          Equal]; 
Print[eqn]; 
eqn = MapAll[Simplify, eqn]; 
Print[eqn];

Since  n  is an arbitrary integer,the last equation does not hold true, hence (Subscript[w, 1])  ≠  (Subscript[w, 2]).

Section 5.3  Exercises for Complex Exponents
See textbook page 181.

Section 5.4	Trigonometric and Hyperbolic Functions

Section 5.5	Inverse Trigonometric and Hyperbolic Functions

GO TO  THE  Table of Contents