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

COMPLEX ANALYSIS: for Mathematics and Engineering, 
3rd Edition,  1997,  ISBN: 0-7637-0270-6
Jones & 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/
This free software is compliments of the authors.
mathews@fullerton.edu,  howell@westmont.edu

CHAPTER 1  COMPLEX NUMBERS
Section 1.1  The Origin of Complex Numbers
Section 1.2  The Algebra of Complex Numbers
Section 1.3  The Geometry of Complex Numbers
Section 1.4  The Geometry of Complex Numbers, Continued
Section 1.5  The Algebra of Complex Numbers, Revisited
Section 1.6  The Topology of Complex Numbers
GoTo Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.
GoTo Contents

CHAPTER 1  COMPLEX NUMBERS

<< Graphics`Arrow`Clear[b, bdd, c, eqn, ext, int, k, list, P, r1, r2, set, solset, t, 
      θ, θ1, θ2, values, x, x0, x1, x2, x3, xx, y0, y1, 
      y2, y3, yy, z, z1, z2, z3, z4, Z];

Section 1.1  The Origin of Complex Numbers

The depressed cubic equation is   (x^3) +  b x  +  c  =  0.
Ferro and Tartaglia showed that one solution to this equation is:
x   =   ((((-c)/2) + (Sqrt[((c^2)/4) + ((b^3)/27)]) )^(1/3))   -   (( (c/2) + (Sqrt[((c^2)/4) + ((b^3)/27)]) )^(1/3)).

Example in narrative on Page 2 of Section 1.1.
Consider the simple depressed cubic equation  (x^3) - 15x = 4  =   0.

\(Clear[b, c, eqn, r1, r2, solset, x]; 

    eqn\  = \ x\^3\  - \ 15\ x\  - \ 4\  == \ 0; 

    solset\  = \ Solve[eqn, \ x\ ]; 
Print[eqn]; 
Print[solset]; \)

Using the Ferro-Tartaglia formula we can verify that  z  is a solution, where:

\(b\  = \ \(-15\); 
c\  = \ \(-4\); 

    Print[0, " = ", x\^3\  + \ b\ x\  + \ c]; 

    x\  = \ \@\(\(-c\)\/2\  + \ \@\(c\^2\/4 + b\^3\/27\)\)\%3\  - \ 
        \@\(c\/2\  + \ \@\(c\^2\/4 + b\^3\/27\)\)\%3; 

    Print["x = "\ , \ x]; 

    x\  = \ \@\(2\  + \ \@\(-121\)\)\%3\  - \ \ 
        \@\(\(-2\)\  + \ \@\(-121\)\)\%3; 
Print["x = "\ , \ x]; \)

The first cube root evaluated nicely

\(r1\  = \ 2\  + \ I; 

    Print[\*""\!\(r\_1\) = ""\ , \ r1]; \)

A different choice (or branch) of the cube root must be used to compute the quantity  ((-2 + (Sqrt[-121]))^(1/3)).  It is obtained by multiplying by a "cube root of 1", i.e.  ((-1)^(1/3)) .

\(r2\  = \ 
      Round[N[\@\(\(-2\)\  + \@\(-121\)\)\%3\ \((\(-1\))\)\^\(2/3\)]]; 

    Print[\*""\!\(r\_2\) = ""\ , \ r2]; \)

Now the two cube roots can be subtracted to get the real root.

\(r1\  = \ \ 2\  + \ I; 

    r2\  = \ \(-2\)\  + \ I; 
x\ \  = \ r1\  - r2; 

    Print[\*""\!\(x\^3\) - 15 x - 4 = 0""]; 

    Print[\*""x = \!\(r\_1\) - \!\(r\_2\) = ""\ , \ x]; \)

GoTo Chapter 1

Section 1.2  The Algebra of Complex Numbers

The rules for addition, subtraction, multiplication and division of complex numbers
are extensions of the rules for real numbers.  They obey familiar algebraic properties.

<< Graphics`Arrow`

Example 1.1,  Page 6.  Find  (Subscript[z, 1]) + (Subscript[z, 2])  and  (Subscript[z, 1]) - (Subscript[z, 2]).

(a) Find  (Subscript[z, 1]) + (Subscript[z, 2]).

\(Clear[v1, v2, v3, w1, z, z1, z2]; 
z1 = \ 3\  + \ 7  I; 

    z2\  = \ 5\  - \ 6  I; 
w1\  = \ z1 + z2; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 1, 0], 
          Arrow[{Re[z1], Im[z1]}, {Re[w1], Im[w1]}]}]; 

    v3\  = \ Graphics[{RGBColor[0, 0, 1], 
          Arrow[{0, \ 0}, {Re[w1], Im[w1]}]}]; 

    Show[v1, v2, v3, PlotRange -> {{0, 8}, {0, 7}}, 
      Ticks -> {Range[0, 8, 1], Range[0, 7, 1]}, AspectRatio -> 7\/8, 
      Axes -> True]; 
Print[\*""     \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""     \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(z\_1\) + \!\(z\_2\) = ""\ , \ z1\  + \ z2]; \)

(b) Find  (Subscript[z, 1]) - (Subscript[z, 2]).

\(Clear[v1, v2, v3, w2, z, z1, z2]; 
z1 = \ 3\  + \ 7  I; 

    z2\  = \ 5\  - \ 6  I; 
w2\  = \ z1 - z2; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 1, 0], 
          Arrow[{Re[w2], Im[w2]}, {Re[z1], Im[z1]}]}]; 

    v3\  = \ Graphics[{RGBColor[0, 0, 1], 
          Arrow[{0, \ 0}, {Re[w2], Im[w2]}]}]; 

    Show[v1, v2, v3, PlotRange -> {{\(-2\), 3}, {0, 13}}, 
      Ticks -> {Range[\(-2\), 3, 1], Range[0, 13, 1]}, 
      AspectRatio -> 13\/5, Axes -> True]; 

    Print[\*""     \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""     \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(z\_1\) - \!\(z\_2\) = ""\ , \ z1\  - \ z2]; \)

Example 1.2,  Page 6.  Find  (Subscript[z, 1])(Subscript[z, 2]).

\(Clear[v1, v2, v3, w1, z, z1, z2]; 
z1\  = \ 3\  + \ 7  I; 
    
z2\  = \ 5\  - \ 6  I; 
w1 = \ z1\ z2; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 1, 0], Arrow[{0, 0}, {Re[z2], Im[z2]}]}]; 
    
v3\  = \ 
      Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {Re[w1], Im[w1]}]}]; 

    Show[v1, v2, v3, PlotRange -> {{0, 57}, {\(-6\), 17}}, 
      Ticks -> {Range[0, 57, 5], Range[\(-6\), 17, 1]}, 
      AspectRatio -> 1, Axes -> True]; 

    Print[\*""   \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""   \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(z\_1\) \!\(z\_2\) = ""\ , \ z1\ z2]; \)

Example 1.3,  Page 7.  Find (( (Subscript[z, 1]))/((Subscript[z, 2]))).

\(Clear[v1, v2, v3, w1, z, z1, z2]; 
z1\  = \ 3\  + \ 7  I; 
    
z2\  = \ 5\  - \ 6  I; 
w1 = \(\ z1\)\/z2; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 1, 0], Arrow[{0, 0}, {Re[z2], Im[z2]}]}]; 
    
v3\  = \ 
      Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {Re[w1], Im[w1]}]}]; 

    Show[v1, v2, v3, PlotRange -> {{\(-1\), 5}, {\(-6\), 7}}, 
      Ticks -> {Range[\(-1\), 5, 1], Range[\(-6\), 7, 1]}, 
      AspectRatio -> 13\/6, Axes -> True]; 

    Print[\*"" \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*"" \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(z\_1\/z\_2\) = ""\ , \ z1\/z2]; \)

Definition for Multiplication,  Page 6.  Formula (4),  in general we can derive:

\(Clear[x, x1, x2, y, y1, y2, z, z1, z2]; 

    z1\  = \ x\_1\  + \ I\ y\_1; 

    z2\  = \ x\_2\  + \ I\ y\_2; 

    Print[\*""   \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""   \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(z\_1\) \!\(z\_2\) = ""\ , \ z1\ z2]; 

    Print[\*""\!\(z\_1\) \!\(z\_2\) = ""\ , \ ComplexExpand[z1\ z2]]; 
    \)

Definition for Division,  Page 7.  Formula (5),  in general we can derive:

\(Clear[x, x1, x2, y, y1, y2, z, z1, z2]; 

    z1\  = \ x\_1\  + \ I\ y\_1; 

    z2\  = \ x\_2\  + \ I\ y\_2; 

    Print[\*"" \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*"" \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(z\_1\/z\_2\) = ""\ , \ z1\/z2]; 

    Print[\*""\!\(z\_1\/z\_2\) = ""\ , 
      Expand[\((z1*\((x\_2 - I\ y\_2)\))\)]\/Expand[
          \((z2*\((x\_2 - I\ y\_2)\))\)]]; \)

Example 1.4,  Page 10.  Find   Re((Subscript[z, 1]))  and  Re((Subscript[z, 2])).

\(Clear[v1, v2, z, z1]; 
z1\  = \ \(-3\)\  + \ 7  I; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {Re[z1], 0}]}]; 

    Show[v1, v2, PlotRange -> {{\(-3\), 0}, {0, 7}}, 
      Ticks -> {Range[\(-3\), 0, 1], Range[0, 7, 1]}, 
      AspectRatio -> 7\/3, Axes -> True]; 

    Print[\*""    \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""Re[\!\(z\_1\)] = ""\ , \ Re[z1]]; \)

\(Clear[v1, v2, z, z2]; 
z2\  = \ \ 9\  + \ 4  I; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z2], Im[z2]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {Re[z2], 0}]}]; 

    Show[v1, v2, PlotRange -> {{0, 9}, {0, 4}}, 
      Ticks -> {Range[0, 9, 1], Range[0, 4, 1]}, AspectRatio -> 4\/9, 
      Axes -> True]; 
Print[\*""    \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""Re[\!\(z\_2\)] = ""\ , \ Re[z2]]; \)

Example 1.5,  Page 10.  Find   Im((Subscript[z, 1]))  and  Im((Subscript[z, 2])).

\(Clear[z, z1]; 
z1\  = \ \(-3\)\  + \ 7  I; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {0, Im[z1]}]}]; 

    Show[v1, v2, PlotRange -> {{\(-3\), 0.1}, {0, 7}}, 
      Ticks -> {Range[\(-3\), 0, 1], Range[0, 7, 1]}, 
      AspectRatio -> 7\/3, Axes -> True]; 

    Print[\*""    \!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""Im[\!\(z\_1\)] = ""\ , \ Im[z1]]; \)

\(Clear[z, z2]; 
z2\  = \ \ 9\  + \ 4  I; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z2], Im[z2]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {0, Im[z2]}]}]; 

    Show[v1, v2, PlotRange -> {{0, 9}, {0, 4}}, 
      Ticks -> {Range[0, 9, 1], Range[0, 4, 1]}, AspectRatio -> 4\/9, 
      Axes -> True]; 
Print[\*""    \!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""Im[\!\(z\_2\)] = ""\ , \ Im[z2]]; \)

Example 1.6,  Page 10.  Find   \(TraditionalForm\`\(z\_1\)\&_\)  and  \(TraditionalForm\`\(z\_2\)\&_\).

\(Clear[v1, v2, v3, z, z1]; 
z1\  = \ \(-3\)\  + \ 7  I; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 0, 1], 
          Arrow[{0, \ 0}, {Re[z1], \(-Im[z1]\)}]}]; 

    Show[v1, v2, PlotRange -> {{\(-3\), 0}, {\(-7\), 7}}, 
      Ticks -> {Range[\(-3\), 0, 1], Range[\(-7\), 7, 1]}, 
      AspectRatio -> 7\/3, Axes -> True]; 

    Print[\*""\!\(z\_1\) = ""\ , \ z1]; 

    Print[\*""\!\(\(z\_1\)\&_\) = ""\ , Conjugate[z1]\ ]; \)

\(Clear[v1, v2, v3, z, z2]; 
z2\  = \ \ 9\  + \ 4  I; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z2], Im[z2]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 0, 1], 
          Arrow[{0, \ 0}, {Re[z2], \(-Im[z2]\)}]}]; 

    Show[v1, v2, PlotRange -> {{0, 9}, {\(-4\), 4}}, 
      AspectRatio -> 8\/9, Axes -> True]; 

    Print[\*""\!\(z\_2\) = ""\ , \ z2]; 

    Print[\*""\!\(\(z\_2\)\&_\) = ""\ , \ Conjugate[z2]]; \)

The Commutative Law for Addition,  Property (P1), Page 9.  
     In general we can derive:

\(Clear[x, x1, x2, y, y1, y2, z, z1, z2]; 

    z1\  = \ x\_1\  + \ I\ y\_1; 

    z2\  = \ x\_2\  + \ I\ y\_2; 

    Print[\*""     (Subscript[z, 1]) = ""\ , \ z1]; 

    Print[\*""     (Subscript[z, 2]) = ""\ , \ z2]; 

    Print[\*""(Subscript[z, 1]) + (Subscript[z, 2]) = ""\ , \ z1 + z2]; 

    Print[\*""(Subscript[z, 2]) + (Subscript[z, 1]) = ""\ , \ z2 + z1]; 

    Print[\*""Is (Subscript[z, 1]) + (Subscript[z, 2]) = (Subscript[z, 2]) + (Subscript[z, 1]) ? "", z1 + z2\  == \ z1 + z2]; \)

The Associative Law for Multiplication,  Property (P6), Page 10.  
     In general we can derive:

\(Clear[x, x1, x2, x3, y, y1, y2, y3, z, z1, z2, z3]; 

    z1\  = \ x\_1\  + \ I\ y\_1; 

    z2\  = \ x\_2\  + \ I\ y\_2; 

    z3\  = \ x\_3\  + \ I\ y\_3; 

    Print[\*""          (Subscript[z, 1]) = ""\ , \ z1]; 

    Print[\*""          (Subscript[z, 2]) = ""\ , \ z2]; 

    Print[\*""          (Subscript[z, 3]) = ""\ , \ z3]; 
Print[""]; 

    Print[\*""  (Subscript[z, 1])((Subscript[z, 2]) + (Subscript[z, 3])) = ""\ , \ 
      z1 \((z2\  + \ z3)\)]; 

    Print[\*""(Subscript[z, 1]) (Subscript[z, 2]) + (Subscript[z, 1]) (Subscript[z, 3]) = ""\ , \ 
      z1\ z2\  + \ z1\ z3]; 
Print[""]; 

    Print[\*""  (Subscript[z, 1])((Subscript[z, 2]) + (Subscript[z, 3])) = ""\ , \ 
      Expand[z1 \((z2\  + \ z3)\)]]; 

    Print[\*""(Subscript[z, 1]) (Subscript[z, 2]) + (Subscript[z, 1]) (Subscript[z, 3]) = ""\ , \ 
      Expand[z1\ z2\  + \ z1\ z3]]; 
Print[""]; 

    Print[\*""Is (Subscript[z, 1])((Subscript[z, 2]) + (Subscript[z, 3])) =  (Subscript[z, 1]) (Subscript[z, 2]) + (Subscript[z, 1]) (Subscript[z, 3]) ?  "", 
      Expand[z1 \((z2\  + \ z3)\)]\ \  == \ \ Expand[z1\ z2\  + \ z1\ z3]]; 
    \)

GoTo Chapter 1

Section 1.3  The Geometry of Complex Numbers

The modulus of  z  is   |z|=(Sqrt[(x^2) + (y^2)]).

The distance between  (Subscript[z, 1])  and  (Subscript[z, 2])  is   |(Subscript[z, 1]) - (Subscript[z, 2])|=(Sqrt[((((Subscript[x, 1])-(Subscript[x, 2])))^2) + ((((Subscript[y, 1])-(Subscript[y, 2])))^2)]).  

The triangle inequality is   |(Subscript[z, 1]) + (Subscript[z, 2]) |   ≤   |(Subscript[z, 1])|  +  |(Subscript[z, 2])|.

The product obeys  |(Subscript[z, 1]) (Subscript[z, 2])|=|(Subscript[z, 1])||(Subscript[z, 2])|.

The quotient obeys  |(((Subscript[z, 1]))/((Subscript[z, 2])))|=((|  (Subscript[z, 1]) |)/(|  (Subscript[z, 2]) |)).

Example  1.7,  Page 15.  Verify the Triangle Inequality for  (Subscript[z, 1]) and (Subscript[z, 2]) .
       |(Subscript[z, 1]) + (Subscript[z, 2]) |   ≤   |(Subscript[z, 1])|  +  |(Subscript[z, 2])|.

\(Clear[z, z1, z2]; 
z1\  = \ 7\  + \ I; 

    z2\  = \ 3\  + \ 5  I; 
w1\  = \ z1 + z2; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 1, 0], 
          Arrow[{Re[z1], Im[z1]}, {Re[w1], Im[w1]}]}]; 

    v3\  = \ Graphics[{RGBColor[0, 0, 1], 
          Arrow[{0, \ 0}, {Re[w1], Im[w1]}]}]; 

    Show[v1, v2, v3, PlotRange -> {{0, 10}, {0, 6}}, 
      Ticks -> {Range[0, 10, 1], Range[0, 6, 1]}, AspectRatio -> 6\/10, 
      Axes -> True]; 

    Print[\*""          (Subscript[z, 1]) = ""\ , \ z1]; 

    Print[\*""          (Subscript[z, 2]) = ""\ , \ z2]; 

    Print[\*""     (Subscript[z, 1]) + (Subscript[z, 2]) = ""\ , \ z1\  + \ z2]; 

    Print[""]; 

    Print[\*""   |(Subscript[z, 1]) + (Subscript[z, 2])| = "", \ Abs[z1\  + \ z2]]; 

    Print[\*"" |(Subscript[z, 1])| + |(Subscript[z, 2])| = "", \ Abs[z1] + Abs[z2]]; 
    
Print[\*""Is |(Subscript[z, 1]) + (Subscript[z, 2])| ≤  |(Subscript[z, 1])| + |(Subscript[z, 2])| ?  "", Abs[z1\  + \ z2]\  <= \ Abs[z1]\  + \ Abs[z2]]; 

    Print[""]; 

    Print[\*""   |(Subscript[z, 1]) + (Subscript[z, 2])| = "", \ 
      N[Abs[z1\  + \ z2]]]; 

    Print[\*"" |(Subscript[z, 1])| + |(Subscript[z, 2])| = "", \ 
      N[Abs[z1] + Abs[z2]]]; 

    Print[\*""Is |(Subscript[z, 1]) + (Subscript[z, 2])| ≤  |(Subscript[z, 1])| + |(Subscript[z, 2])| ?  "", Abs[z1\  + \ z2]\  <= \ Abs[z1]\  + \ Abs[z2]]; \)

Example  1.8,  Page 16.  Verify that   |(Subscript[z, 1])(Subscript[z, 2]) |   =   |z1| |(Subscript[z, 2])|.

\(Clear[z, z1, z2, z3]; 
z1\  = \ 1\  + \ 2  I; 

    z2\  = \ 3\  + \ 2  I; 
z3\  = \ z1\ z2; 

    v1\  = \ Graphics[{RGBColor[1, 0, 0], 
          Arrow[{0, \ 0}, {Re[z1], Im[z1]}]}]; 

    v2\  = \ Graphics[{RGBColor[0, 1, 0], Arrow[{0, 0}, {Re[z2], Im[z2]}]}]; 
    
v3\  = \ 
      Graphics[{RGBColor[0, 0, 1], Arrow[{0, \ 0}, {Re[z3], Im[z3]}]}]; 

    Show[v1, v2, v3, PlotRange -> {{\(-1\), 3}, {0, 8}}, 
      Ticks -> {Range[\(-1\), 3, 1], Range[0, 8, 1]}, AspectRatio -> 2, 
      Axes -> True]; 
Print[\*""(Subscript[z, 1]) = ""\ , \ z1]; 

    Print[\*""(Subscript[z, 2]) = ""\ , \ z2]; 

    Print[\*""(Subscript[z, 1]) (Subscript[z, 2]) = ""\ , \ z3]; 

    Print[\*""|(Subscript[z, 1])| = ""\ , \ Abs[z1]]; 

    Print[\*""|(Subscript[z, 2])| = ""\ , \ Abs[z2]]; 

    Print[\*""|(Subscript[z, 1]) (Subscript[z, 2])| = ""\ , \ Abs[z1\ z2]]; 

    Print[\*""Is |(Subscript[z, 1]) (Subscript[z, 2])| = |(Subscript[z, 1])||(Subscript[z, 2])| ?""]; 
Print[Abs[z1\ z2], \ " = ", \ Abs[z1]\ Abs[z2]]; 

    Print[""]; 

    Print[\*""|(Subscript[z, 1]) (Subscript[z, 2])| = "", \ N[Abs[z1\ z2]]]; 

    Print[\*""|(Subscript[z, 1])||(Subscript[z, 2])| = "", \ N[Abs[z1] Abs[z2]]]; 

    Print[\*""Is |(Subscript[z, 1]) (Subscript[z, 2])| = |(Subscript[z, 1])||(Subscript[z, 2])| ?  "", 
\ \ Abs[z1\ \ z2]\  == \ Abs[z1]\ Abs[z2]]; \)

GoTo Chapter 1

Section 1.4  The Geometry of Complex Numbers, Continued

An argument of  z  is  θ  =  arg(z)  =  arctan((y/x))  if  x ≠ 0,  but we must be careful to specify the choice of  arctan((y/x))  so that the point  z  corresponding to  r  and  θ  lies in the appropriate quadrant.

The principal value of  arg(z)  is denoted by  Arg(z) = θ  where  - π < θ ≤ π.

A famous equation known as Euler's formula is  (e^i)θ =  cos θ  +  i sin θ.

The exponential form of  z  is   z = r (e^i)θ,  where   r  =  |z|   and   θ  =  arg(z).

The product obeys the rule  arg ((Subscript[z, 1]) (Subscript[z, 2])) =  arg ((Subscript[z, 1])) + arg ((Subscript[z, 2])).

Example 1.9,  Page 19.  Find several polar forms of  z.

\(Clear[z, z1, z2, z3]; 
z1\  = \ \@3\  + \ I; 

    z2\  = \ 2\ E\^\(I\ π/6\); 

    z3\  = \ 2\ E\^\(I\ 13\ π/6\); 

    z4\  = \ 2\ E\^\(\(-\ I\)\ 11\ π/6\); 

    Print[\*""(Subscript[z, 1]) = 2 \!\(E\^\(I\\ π/6\)\) = "", z1]; 

    Print[\*""(Subscript[z, 2]) = 2 \!\(E\^\(I\\ π/6\)\) = "", z2, " = ", ComplexExpand[z2]]; 

    Print[\*""(Subscript[z, 3]) = 2 \!\(E\^\(I\\ 13\\ π/6\)\) = "", z3, " = ", ComplexExpand[z3]]; 

    Print[\*""(Subscript[z, 4]) = 2 \!\(E\^\(\(-\\ I\)\\ 11\\ π/6\)\) = "", z4, " = ", ComplexExpand[z4]]; \)

Example 1.10,  Page 19.  Find the polar form of  z, 
by computing  |z|  and  θ = Arg(z).

\(Clear[θ, θ1, θ2, r, z, z1, z2]; 

    z\  = \ \(-\ \@3\)\  - \ I; 
r\  = \ Abs[z]; 

    θ1\  = \ ArcTan[Im[z]\/Re[z]] + \ π; 

    z1\  = \ r\ \((Cos[θ1]\  + \ I\ Sin[θ1])\); 

    θ2\  = \ ArcTan[Im[z]\/Re[z]] + \ 3  π; 

    z2\  = \ r\ \((Cos[θ2]\  + \ I\ Sin[θ2])\); 

    Print["z = ", z]; 
Print["r = |z| = ", r]; 

    Print[\*""\!\(θ\_1\) = Arg[z] = "", θ1]; 

    Print[\*""\!\(z\_1\) = "", z1]; 

    Print[\*""\!\(z\_1\) = "", Expand[z1]]; 

    Print[\*""Is z = \!\(z\_1\) ? "", z\  == \ Expand[z1]]; 

    Print[""]; 
Print["z = ", z]; 
Print["r = |z| = ", r]; 

    Print[\*""\!\(θ\_2\) = Arg[z] = "", θ2]; 

    Print[\*""\!\(z\_2\) = "", z2]; 

    Print[\*""\!\(z\_2\) = "", ComplexExpand[z2]]; 

    Print[\*""Is z =  \!\(z\_2\) ?  "", z\  == \ ComplexExpand[z2]]; 
    \)

Example 1.11,  Page 20.  Write  z  in the  r (e^i)θ  form.

\(Clear[θ, r, z, z1]; 
z\  = \ \(-\ \@3\)\  - \ I; 

    r\  = \ Abs[z]; 
θ\  = \ Arg[z]\  + \ 2  π; 

    z1\  = \ r\ E\^\(I\ θ\); 

    Print["z = ", z]; 
Print["r = |z| = ", r]; 

    Print["θ = Arg[z] = ", θ]; 

    Print[\*""(Subscript[z, 1]) = 2 (E^(I7(π/6)))""]; 
Print[\*""(Subscript[z, 1]) = "", z1]; 

    Print[\*""(Subscript[z, 1]) = "", ComplexExpand[z1]]; 

    Print[\*""Is z =  (Subscript[z, 1]) ?  "", z\  == \ ComplexExpand[z1]]; 
    \)

Example 1.12,  Page 22.  Given  z,  find  |z|  and  (1/z).

\(Clear[r, z, z1, z2, z3]; 
z\  = \ 5\  + \ 12  I; 

    r\  = \ Abs[z]; 
z1\  = \ Conjugate[z]; 
z2\  = \ Conjugate[z]\/r; 

    z3\  = \ 1\/r\ Conjugate[z]\/r; 
Print["z = ", z]; 

    Print["r = |z| = ", r]; 
Print[\*""\!\(z\&_\) = "", z1]; 

    Print[\*""\!\(z\&_\/r\) = "", z2]; 

    Print[\*""\!\(1\/r\)\!\(z\&_\/r\) = "", z3]; 

    Print[\*""\!\(1\/z\) = "", 1\/z]; 

    Print[\*""Is \!\(1\/z\) =  \!\(1\/r\)\!\(z\&_\/r\) ?  "", 
      1\/z\  == \ 1\/r\ Conjugate[z]\/r]; \)

Example 1.13,  Page 22.  Given  (Subscript[z, 1])  and  (Subscript[z, 2]),  compute  (((Subscript[z, 1]))/((Subscript[z, 2])))  using polar computations.

\(Clear[θ, θ1, θ2, r1, r2, w1, w2, z, z1, z2]; 

    z1\  = \ 8  I; 
z2\  = \ 1\  + \ I\ \@3; 

    r1\  = \ Abs[z1]; 
θ1\  = \ Arg[z1]; 

    Print[\*""(Subscript[z, 1]) = "", z1]; 

    Print[\*""(Subscript[r, 1]) = |(Subscript[z, 1])| = "", r1]; 

    Print[\*""(Subscript[θ, 1]) = Arg[(Subscript[z, 1])] = "", θ1]; 

    r2\  = \ Abs[z2]; 
θ2\  = \ Arg[z2]; 

    Print[\*""(Subscript[z, 2]) = "", z2]; 

    Print[\*""(Subscript[r, 2]) = |(Subscript[z, 2])| = "", r2]; 

    Print[\*""(Subscript[θ, 2]) = Arg[(Subscript[z, 2])] = "", θ2]; 

    w1\  = \ z1\/z2; 

    w2\  = \ r1\/r2\ 
        E\^\(I \((θ1\  - \ θ2)\)\); 

    Print[" "]; 
Print[\*""((Subscript[z, 1])/(Subscript[z, 2])) = "", w1]; 

    Print[\*""((Subscript[r, 1])/(Subscript[r, 2]))(E^(I ((Subscript[θ, 1]) - (Subscript[θ, 2])))) = "", w2]; 
Print[""]; 

    Print[\*""((Subscript[z, 1])/(Subscript[z, 2])) = "", ComplexExpand[w1]]; 

    Print[\*""((Subscript[r, 1])/(Subscript[r, 2]))(E^(I ((Subscript[θ, 1]) - (Subscript[θ, 2])))) = "", ComplexExpand[w2]]; 

    Print[\*""Is ((Subscript[z, 1])/(Subscript[z, 2])) = ((Subscript[r, 1])/(Subscript[r, 2]))(E^(I ((Subscript[θ, 1]) - (Subscript[θ, 2])))) ?  "", 
      ComplexExpand[z1\/z2]\  == \ 
        ComplexExpand[
          r1\/r2\ E\^\(I 
                \((θ1\  - \ θ2)\)\)]]; \)

GoTo Chapter 1

Section 1.5  The Algebra of Complex Numbers, Revisited

The  nth  power of  z  is  (z^n)  =  (r^n) (e^in)θ. 

A famous formula known as De Moivre's formula is  (((cos θ  + i sin θ))^n) =  
        cos nθ  + i sin nθ.

Corollary 1.1,  Page 25.  (Corollary to the fundamental theorem of algebra)  If  P(z)  is a polynomial of degree n  (n > 0)  with complex coefficients, then the equation  P(z) = 0  has precisely  n  (not necessarily distinct) solutions.

The solutions to  (z^n) = 1  are called the nth roots of unity and can be expressed as  (Subscript[z, k])=(e^(i 2 π k/n))  for  k = 0, 1, ⋯, n - 1.

Example 1.14,  Page 24.  Show that (((-(Sqrt[3]) - i))^3)  =  - 8i  in two ways.

\(Clear[θ, r, z, Z]; 
z\  = \ \(-\ \@3\)\  - \ I; 

    r\  = \ Abs[z]; 
θ\  = \ Arg[z]; 

    Z\  = \ ComplexExpand[r\ E\^\(I\ θ\)]; 

    Print["z = ", z]; 
Print["r = |z| = ", r]; 

    Print["θ = Arg[z] = ", θ]; 

    Print[\*""z = r(E^I)θ = "", 
      Z]; 
Print[\*""(z^3) = "", \ Expand[z\^3]]; 

    Print[\*""(z^3) = (r^3)(E^I)3θ = "", \ r\^3\ E\^\(I\ 3\ θ\)]; 
    \)

Example 1.15,  Page 25.  Evaluate  (((-(Sqrt[3]) - i))^(-6))  =  ((-1)/64)  in two ways.

\(Clear[θ, r, z, Z]; 
z\  = \(-\ \@3\)\  - \ I; 

    r\  = \ Abs[z]; 
θ\  = \ Arg[z]; 

    Z\  = \ ComplexExpand[r\ E\^\(I\ θ\)]; 

    Print["z = ", z]; 
Print["r = |z| = ", r]; 

    Print["θ = Arg[z] = ", θ]; 

    Print[\*""z = r(E^I)θ = "", 
      Z]; 
Print[\*""(z^(-6)) = "", \ Expand[z\^\(-6\)], \ 
      " = "\ , \ ExpandAll[z\^\(-6\)]]; 

    Print[\*""(z^(-6)) = (r^(-6))(E^(-I6θ)) = "", \ 
      r\^\(-6\)\ E\^\(\(-I\)\ 6\ θ\)]; \)

Example 1.16,  Page 25.  Use Demoivre's formula to show that
      cos(5θ)  =  (cos^5)(θ)  -  10 (cos^3)(θ)(sin^2)(θ)  +  5 cos(θ) (sin^4)(θ).

\(Clear[θ, z1, z2, z3]; 

    z1\  = \ Cos[5  θ]\  + \ I\ Sin[5  θ]; 

    z2\  = \ \((Cos[θ]\  + \ I\ Sin[θ])\)\^5; 

    z3\  = \ ComplexExpand[z2]; 
Print[z1, " = ", z2]; 
Print[" "]; 
    
Print[z1, " = ", z3]; 
Print[" "]; 

    Print["Take the real part of both sides."]; 

    Print[ComplexExpand[Re[z1]]\  == \ ComplexExpand[Re[z3]]]; \)

Example 1.17,  Page 25. Factor the polynomial  P(z) = (z^3) + (2 - 2i)(z^2) + (-1-4i)z - 2.

\(Clear[P, z]; 

    P[z_]\  = \ 
      z\^3\  + \ \((2 - 2  I)\)\ z\^2\  + \ 
        \((\(-1\) - 4  I)\)\ z\  - \ 2; 

    Print["P[z] = ", P[z]]; 
Print["P[z] = ", Factor[P[z]]]; 

    Print["Solve P[z] = 0"]; 
Print[Solve[P[z] == 0, z]]; \)

Example 1.18,  Page 26.  Find all the solutions to the equation  (z^8) = 1.

\(Clear[k, list, set, solset, values, xx, yy, z]; 

    solset\  = \ Solve[z\^8\  == \ 1\ , \ z]; 

    values\  = \ solset[\([Table[k, {k, Length[solset]}], 1, 2]\)]; 

    set\  = \ N[solset[\([Table[k, {k, Length[solset]}], 1, 2]\)]]; 

    set\  = \ \ ReplaceAll[set, xx_Real -> {xx, 0}]; 

    list\  = \ \ ReplaceAll[set, Complex[xx_, yy_] -> {xx, yy}]; 

    Print[\*""The roots of  \!\(z\^8\) = 1  are:""]; 
Print[values]; 

    Print[" "]; 
Print[ComplexExpand[values]]; 

    ListPlot[list, Prolog -> {PointSize[0.03], RGBColor[1, 0, 0]}, 
      AspectRatio -> 1, AxesLabel -> {"x", "y"}, 
      Ticks -> {Range[\(-1\), 1, 1], Range[\(-1\), 1, 1]}, 
      PlotRange -> {{\(-1.5\), 1.5}, {\(-1.5\), 1.5}}, 
      Prolog -> PointSize[0.03]]; \)

Example 1.19,  Page 28.  Find all the cube roots of  8i,
i.e. find all solutions to the equation  (z^3) = 8i.

\(Clear[k, list, set, solset, values, xx, yy, z]; 

    solset\  = \ Solve[z\^3\  == \ 8  I\ , \ z]; 

    values\  = \ solset[\([Table[k, {k, Length[solset]}], 1, 2]\)]; 

    set\  = \ N[solset[\([Table[k, {k, Length[solset]}], 1, 2]\)]]; 

    set\  = \ ReplaceAll[set, xx_Real -> {xx, 0}]; 

    list\  = \ \ ReplaceAll[set, Complex[xx_, yy_] -> {xx, yy}]; 

    Print["The cube roots of  8I  are:"]; 
Print[values]; 

    Print[" "]; 
Print[ComplexExpand[values]]; 

    ListPlot[list, Prolog -> {PointSize[0.03], RGBColor[1, 0, 0]}, 
      AspectRatio -> 1, AxesLabel -> {"x", "y"}, 
      Ticks -> {Range[\(-2\), 2, 1], Range[\(-2\), 2, 1]}, 
      PlotRange -> {{\(-2.1\), 2.1}, {\(-2.1\), 2.1}}]; \)

GoTo Chapter 1

Section 1.6  The Topology of Complex Numbers

In this section we investigate some basic ideas concerning sets of points in the plane.  The first concept is that of a curve.
Definition,  Page 30.  A curve in the complex plane is  C:  z(t)  =  x(t)  + i y(t)   for  a ≤ t ≤ b.

Example in the narrative, Page 30.  If  (Subscript[z, 0]) = (Subscript[x, 0]) + i (Subscript[y, 0])  and  (Subscript[z, 1]) = (Subscript[x, 1]) + i (Subscript[y, 1])  are two given points, then the straight line segment joining  (Subscript[z, 0])  to  (Subscript[z, 1])  is:
C:  z(t)  =  (Subscript[x, 0]) + ((Subscript[x, 1]) - (Subscript[x, 0])) t + i ( (Subscript[y, 0]) + ((Subscript[y, 1]) - (Subscript[y, 0]))t )  for  0 ≤ t ≤ 1.

\(Clear[t, x0, x1, y0, y1, z]; 

    z[t_]\  = \ 
      x0\  + \ \((x1 - x0)\) t\  + \ 
        I \((y0\  + \ \((y1 - y0)\) t)\); 

    Print["z[t] = ", z[t]]; \)

Example for,  Page 30.  Find the equation of the line segment with 
the initial point  (Subscript[z, 0]) = - 3 + 2i  and the terminal point  (Subscript[z, 1]) = 1 + i .

Options[ParametricPlot]

\(Clear[t, x0, x1, y0, y1, z]; 
z0\  = \ \(-\ 3\)\  + \ 2*I; 
    
z1\  = \ 1\  + \ I; 
x0\  = \ Re[z0]; \ y0\  = \ Im[z0]; \ 
    x1\  = \ Re[z1]; \ y1\  = \ Im[z1]; 

    z[t_]\  = \ 
      x0\  + \ \((x1 - x0)\) t\  + \ 
        I \((y0\  + \ \((y1 - y0)\) t)\); 

    ParametricPlot[{Re[z[t]], Im[z[t]]}, {t, 0, 1}, 
      PlotRange -> {{\(-3\), 1}, {0, 2}}, 
      Ticks -> {Range[\(-3\), 1, 1], Range[0, 2, 1]}, 
      AspectRatio -> 1\/2, Prolog -> RGBColor[0, 0, 1]]; 

    Print["Equation of a line segment:"]\)\(Print["z[t] = ", z[t]]; 

    Print["Initial  point    z(0) = ", \ z[0]]; 

    Print["Terminal point    z(1) = ", \ z[1]]; \)

Example for,  Page 31.  The curve  x(t) = sin 2t cos t,  y(t) = sin 2t sin t  for  0 ≤ t ≤ 2π  forms a four-leafed rose.

ParametricPlot[{Sin[2  t] Cos[t], Sin[2  t] Sin[t]}, {t, 0, 
        2  π}, PlotRange -> {{-1, 1}, {-1, 1}}, 
      Ticks -> {Range[-1, 1, 1], Range[-1, 2, 1]}, 
      AspectRatio -> 1, Prolog -> RGBColor[0, 0, 1]];

Example 1.20,  Page 33.  Let  S  =  {z: |z| < 1}.  Find the interior, exterior, and boundary of  S.

\(int\  = \ Graphics[{RGBColor[1, 0, 0], Disk[{0, 0}, 1]}]; 

    Print["The interior of the set S = {z: |z|<1}."]; 

    Show[int, \ PlotRange -> {{\(-1.5\), 1.5}, {\(-1.5\), 1.5}}, 

      \ \ \ \ \ \ \ \ \ \ AspectRatio -> 1, Axes -> True]; \)

\(ext\  = \ 
      Graphics[{{RGBColor[0, 1, 0], Disk[{0, 0}, 3]}, 

          \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {GrayLevel[1.0], 
            Disk[{0, 0}, 1]}}]; 

    Print["The exterior of the set S = {z: |z|<1}."]; 

    Show[ext, \ PlotRange -> {{\(-1.5\), 1.5}, {\(-1.5\), 1.5}}, 

      \ \ \ \ \ \ \ \ \ \ AspectRatio -> 1, Axes -> True]; \)

\(bdd\  = \ 
      Graphics[{RGBColor[0, 0, 1], Thickness[0.015], Circle[{0, 0}, 1]}]; 

    Print["The boundary of the set S = {z: |z|<1}."]; 

    Show[bdd, \ PlotRange -> {{\(-1.5\), 1.5}, {\(-1.5\), 1.5}}, 

      \ \ \ \ \ \ \ \ \ \ AspectRatio -> 1, Axes -> True]; \)

Theorem 1.1, Page 35.  (The Jordan Curve Theorem)  The compliment of any simple closed curve  C  can be partitioned into two mutually exclusive domains  I  and  E  in such a way that  I  is bounded,  E  is unbounded, and  C  is the boundary for both  I  and  E.   In addition  I ⋃ E ⋃ C  is the entire complex plane.  (The domain  I  is called the interior of  C,  and  the domain  E  is called the exterior of  C).

GoTo Chapter 1