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 6  COMPLEX INTEGRATION

a = b = c = d = R = t = u = U = v = V = w = W = x = y = z = Z = 
                                      0;  
Clear[a, b, c, center, centers, d, dot, dots, f, F, i, int, int1, 
        int2, Int, ImInt, ImVal, label, path, r, R, ReInt, ReVal, soset, 
        solset, t, u, U, U1, U2, v, V, V1, V2, val, Val, w, W, W1, W2, Wint, 
        x, x0, x1, y, y0, y1, z, z1, z2, Z, Z1, Z2, 
        Z3];  
Needs["Graphics`Arrow`"];  
Needs["Graphics`Colors`"];

Section 6.1	Complex Integrals

Section 6.2	Contours and Contour Integrals

Section 6.3  The Cauchy-Goursat Theorem

The Cauchy-Goursat theorem states that within certain domains the integral of an analytic function over a simple closed contour is zero.  An extension of this theorem will allow us to replace integrals over certain complicated contours with integrals over contours that are easy to evaluate.  We will show ow to use the technique of partial fractions together with the Cauchy-Goursat theorem to evaluate certain integrals.  In Section 6.4 we will see that the Cauchy-Goursat theorem implies that an analytic function has an antiderivative.  To start with, we need to introduce a few new concepts.

	We saw in Section 1.6 that with each simple closed contour  C  there associated two disjoint domains, each of which has  C  as its boundary.  The contour  C  divides the plane into two domains.  One domain is bounded and is called the interior of  C, and the other domain is unbounded and is called the exterior of  C.  This result is known as the Jordan Curve Theorem.  

	In Section 1.6 we saw that a domain  D  is an open connected set.  In particular, if  (Subscript[z, 1])  and  (Subscript[z, 2])  are any pair of points in  D,  then they can be joined by a curve that lies entirely in  D.  A domain  D  is said to be simply connected if it has the property that any simply closed contour   C  contained in  D  has its interior contained in  D.  In other words, there are no "holes" in a simply connected domain.  A domain that is not simply connected is said to be a multiply connected domain.  

	Let the simply closed contour  C  have the parameterization  C :  z (t) =  x (t) + i y (t)  for  a ≤ t ≤ b.  If  C  is parameterized so that the interior of  C  is kept on the left as  z(t)  moves around  C,  then we say that  C  is oriented in the positive sense (counterclockwise);   otherwise,  C  is oriented negatively.  If  C  is positively oriented, then  -C  is negatively oriented.

Green's theorem, an important result from the calculus of real variables, tells us how to evaluate the line integral of real-valued functions.

Theorem 6.4,  Page 223.  (Greens Theorem)  Let  C  be a simple closed contour with positive orientation, and let  R  be the domain that forms the interior of  C.  If  P  and  Q  are continuous and have continuous partial derivatives  (Subscript[P, x]), (Subscript[P, y]), (Subscript[Q, x]), and  (Subscript[Q, y])  at all points on  C  and  R, then  

		\(∫\_C P \((x, y)\) dx + ∫\_C 
              Q \((x, y)\) dy = ∫\(∫\_R\([\(Q\_x\) \((x, y)\) - \(P\_y\) \((x, 
                      y)\)]\) dx\ dy\)\).

Proof of Theorem 6.4, see text Page 223.

Theorem 6.3,  Page 226.  (Cauchy-Goursat Theorem)  Let  f(z)  be analytic in a simply connected domain  D.  If  C  is a simple closed contour that lies in  D,  then  

			(∫_C) f (z) dz = 0.

Proof of Theorem 6.3, see text Page 226.

Example 6.12,  Page 229.  Let us recall that  (e^z), cos (z), and  (z^n)  where n is a positive integer, are all entire functions and have continuous derivatives.  Use the Cauchy-Goursat theorem to show that for any simple closed contour we have  
(a)  (∫_C) (e^z) dz = 0,   (b)  (∫_C) cos (z) dz = 0,  and  (c)  (∫_C) (z^n) dz = 0.

Solution 6.12 (a)

For illustration.  We use the function  f (z)=(e^z). Choose the contour C to be the unit circle C: |z| = 1 with positive orientation.

Remove[z];  
Clear[f, F, θ];  
f[z_]  =  (E^z);  
z[θ_]  =  (E^(I θ));  
F[θ_]  = ∫f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
val  =  (∫_0^(2  π))f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
Print["              f[z] = ", f[z]];  
Print["              z[θ] = ", 
        z[θ]];  
Print["           f[z[θ]] = ", 
        f[z[θ]]];  
Print["             z'[θ] = ", z'[θ]];  
Print["     f[z[θ]] z'[θ] = ", 
        f[z[θ]],  z'[θ]];  
Print[""];  
Print["F[θ] = ∫f[z[θ]]z'[θ]\
\[DifferentialD]θ = ", F[θ]];  
Print["F[2π] = ", F[2  π], ",    F[0] = ", 
        F[0]];  
Print[""];  
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", \*""(∫_0^(2  π))"", 
        f[z[θ]], \(z'\)[θ], " \[DifferentialD]θ = ", 
        F[2  π], " - ", F[0], " = ", 
        F[2  π] - F[0]];\)\ \ \)
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", 
        val];\)\ \ \)
contour  =  Graphics[{Blue, Circle[{0, 0}, 1]}];  
Show[contour, 
        PlotRange -> {{((-3)/2), (3/2)}, {((-3)/2), (3/2)}}, 
        Ticks -> {Range[((-3)/2), (3/2), (1/2)], 
            Range[((-3)/2), (3/2), 
              (1/2)]}, 
AspectRatio -> 1, 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) "", 
      f[z], " \[DifferentialD]z = ", val]\)
Print["The contour is the unit circle  C: |z| = 1."];

Solution 6.12 (b)

For illustration.  We use the function  f (z) = Cos[z]. Choose the contour C to be the unit circle C: |z| = 1 with positive orientation.

Remove[z];  
Clear[f, F, θ];  
f[z_]  =  Cos[z];  
z[θ_]  =  (E^(I θ));  
F[θ_]  = ∫f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
val  =  (∫_0^(2  π))f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
Print["              f[z] = ", f[z]];  
Print["              z[θ] = ", 
        z[θ]];  
Print["           f[z[θ]] = ", 
        f[z[θ]]];  
Print["             z'[θ] = ", z'[θ]];  
Print["     f[z[θ]] z'[θ] = ", 
        f[z[θ]] z'[θ]];  
Print[""];  
Print["F[θ] = ∫f[z[θ]]z'[θ]\
\[DifferentialD]θ = ", F[θ]];  
Print["F[2π] = ", F[2  π], ",    F[0] = ", 
        F[0]];  
Print[""];  
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", \*""(∫_0^(2  π))"", 
        f[z[θ]], \(z'\)[θ], " \[DifferentialD]θ = ", 
        F[2  π], " - ", F[0], " = ", 
        F[2  π] - F[0]];\)\ \ \)
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", 
        val];\)\ \ \)
contour  =  Graphics[{Green, Circle[{0, 0}, 1]}];  
Show[contour, 
        PlotRange -> {{((-3)/2), (3/2)}, {((-3)/2), (3/2)}}, 
        Ticks -> {Range[((-3)/2), (3/2), (1/2)], 
            Range[((-3)/2), (3/2), 
              (1/2)]}, 
AspectRatio -> 1, 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) "", 
      f[z], " \[DifferentialD]z = ", val]\)
Print["The contour is the unit circle  C: |z| = 1."];

Solution 6.12 (c)

For illustration.  We use  n=5  and use the function  f (z)=(z^5).  Choose the contour C to be the unit circle C: |z| = 1 with positive orientation.

Remove[z];  
Clear[f, F, θ];  
f[z_]  =  (z^5);  
z[θ_]  =  (E^(I θ));  
F[θ_]  = ∫f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
val  =  (∫_0^(2  π))f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
Print["              f[z] = ", f[z]];  
Print["              z[θ] = ", 
        z[θ]];  
Print["           f[z[θ]] = ", 
        f[z[θ]]];  
Print["             z'[θ] = ", z'[θ]];  
Print["     f[z[θ]] z'[θ] = ", 
        f[z[θ]] z'[θ]];  
Print[""];  
Print["F[θ] = ∫f[z[θ]]z'[θ]\
\[DifferentialD]θ = ", F[θ]];  
Print["F[2π] = ", F[2  π], ",    F[0] = ", 
        F[0]];  
Print[""];  
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", \*""(∫_0^(2  π))"", 
        f[z[θ]] \(z'\)[θ], " \[DifferentialD]θ = ", 
        F[2  π], " - ", F[0], " = ", 
        F[2  π] - F[0]];\)\ \ \)
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", 
        val];\)\ \ \)
contour  =  Graphics[{Magenta, Circle[{0, 0}, 1]}];  
Show[contour, 
        PlotRange -> {{((-3)/2), (3/2)}, {((-3)/2), (3/2)}}, 
        Ticks -> {Range[((-3)/2), (3/2), (1/2)], 
            Range[((-3)/2), (3/2), 
              (1/2)]}, 
AspectRatio -> 1, 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) "", 
      f[z], " \[DifferentialD]z = ", val]\)
Print["The contour is the unit circle  C: |z| = 1."];

Example 6.13,  Page 229.  If  C  is a simple closed contour such that the origin does not lie interior to  C,  then there is a simply connected domain  D  that contains  C  in which  f (z) = (1/(z^n))  is analytic.  The Cauchy-Goursat theorem implies that  (∫_C) (1/(z^n)) dz = 0,  provided that the origin does not lie interior to  C.
Solution.  The solution is given in the textbook.

We want to be able to replace integrals over certain complicated contours with integrals that are easy to evaluate. If (Subscript[C, 1]) is a simple closed contour that can be "continuously deformed'' into another simple closed contour (Subscript[C, 2]) without passing through a point where f is not analytic, then the value of the contour integral of f over (Subscript[C, 1]) is the same as the value of the integral of f over (Subscript[C, 2]). To be precise, we state the following result.

Theorem 6.4 (Deformation of Contour), Page 230.  Let  (Subscript[C, 1])  and  (Subscript[C, 2])  be two simple closed positively oriented contours such that  (Subscript[C, 1])  lies interior to (Subscript[C, 2]).  If   f(z)  is analytic in a domain  D  that contains both  (Subscript[C, 1])  and (Subscript[C, 2])  and the region between them, then  

			\(∫\_\(C\_1\)f \((z)\) dz = ∫\_\(C\_2\)f \((z)\) dz\).

Proof of Theorem 6.4, see text Page 230.

We now state an important result that is implied by the deformation\ of contour theorem. This result will occur several times in the theory to be developed and is an important tool for computations. You may want to compare the proof of Corollary 6.1 with your solution to Exercise 23 at the end of Section 6.2.

Corollary 6.1,  Page 232.  Let  (Subscript[z, 0])  denote a fixed complex value.  If  C  is a simple closed contour with positive orientation such that  (Subscript[z, 0])  lies interior to C, then

	(a)  (∫_C) (1/(z  -  (Subscript[z, 0]))) dz = 
        2  π i,  
	and  
	(b)  (∫_C) (1/(((z  -  (Subscript[z, 0])))^n)) dz = 
        0, where n is any integer except n = 1.

Proof of Corollary 6.1, see text Page 232.

Demonstration for Solution (a).

(a)   Show that (∫_C) (1/(z  -  (Subscript[z, 0]))) dz = 
        2  π i.  
For illustration.  We use a circle of radius 1 centered at  (Subscript[z, 0]).

Remove[z];  
Clear[f, F, θ, z0];  
f[z_]  =  (1/(z - z0));  
z[θ_]  =  
        z0  +  (E^(I θ));  
F[θ_]  = ∫f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
val  =  (∫_0^(2  π))f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
Print["              f[z] = ", f[z]];  
Print["              z[θ] = ", 
        z[θ]];  
Print["           f[z[θ]] = ", 
        f[z[θ]]];  
Print["             z'[θ] = ", z'[θ]];  
Print["     f[z[θ]] z'[θ] = ", 
        f[z[θ]] z'[θ]];  
Print[""];  
Print["F[θ] = ∫f[z[θ]]z'[θ]\
\[DifferentialD]θ = ", F[θ]];  
Print["F[2π] = ", F[2  π], ",    F[0] = ", 
        F[0]];  
Print[""];  
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", \*""(∫_0^(2  π))"", 
        f[z[θ]] \(z'\)[θ], " \[DifferentialD]θ = ", 
        F[2  π], " - ", F[0], " = ", 
        F[2  π] - F[0]];\)\ \ \)
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", 
        val];\)\ \ \)
dot = 
        Graphics[{Cyan, PointSize[0.03], 
            Point[{2, (5/3)}]}];  
\(\(center = 
        Graphics[{Text[\*""
\!\(z\_0\)"", {2, 1.6}, {0, 
                1}]}];\)\ \ \)
contour  =  Graphics[{Blue, Circle[{2, (5/3)}, 1]}];  
Show[center, contour, dot, PlotRange -> {{0, 4}, {0, 3}}, 
        Ticks -> None, 
AspectRatio -> (3/4), 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) "", 
      f[z], " \[DifferentialD]z = ", val]\)
\(\(Print[\*""The contour is the unit circle C: |z - (Subscript[z, 0])| = 1,""];\)\ \ \)
Print["with positive orientation."];

Demonstration for Solution (b).

(b)   Show that  (∫_C) (1/(((z  -  (Subscript[z, 0])))^n)) dz = 
        0.  
For illustration.  We use n = 5 and a circle of radius 1 centered at  (Subscript[z, 0]).

Remove[z];  
Clear[f, F, θ, z0];  
f[z_]  =  (1/(((z - z0))^5));  
z[θ_]  =  
        z0  +  (E^(I θ));  
F[θ_]  = ∫f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
val  =  (∫_0^(2  π))f[
              z[θ]] z'[θ] \[DifferentialD]θ;  
Print["              f[z] = ", f[z]];  
Print["              z[θ] = ", 
        z[θ]];  
Print["           f[z[θ]] = ", 
        f[z[θ]]];  
Print["             z'[θ] = ", z'[θ]];  
Print["     f[z[θ]] z'[θ] = ", 
        f[z[θ]] z'[θ]];  
Print[""];  
Print["F[θ] = ∫f[z[θ]]z'[θ]\
\[DifferentialD]θ = ", F[θ]];  
Print["F[2π] = ", F[2  π], ",    F[0] = ", 
        F[0]];  
Print[""];  
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", \*""(∫_0^(2  π))"", 
        f[z[θ]] \(z'\)[θ], " \[DifferentialD]θ = ", 
        F[2  π], " - ", F[0], " = ", 
        F[2  π] - F[0]];\)\ \ \)
\(\(Print[\*""(∫_0^(2  π))"", "f[z[θ]]z'[θ]\[DifferentialD]θ = ", 
        val];\)\ \ \)
dot = 
        Graphics[{Red, PointSize[0.03], 
            Point[{2, (5/3)}]}];  
\(\(center = 
        Graphics[{Text[\*""\!\(z\_0\)"", {2, 1.6}, {0, 
                1}]}];\)\ \ \)
contour  =  
        Graphics[{Magenta, Circle[{2, (5/3)}, 1]}];  
Show[center, contour, dot, PlotRange -> {{0, 4}, {0, 3}}, 
        Ticks -> None, 
AspectRatio -> (3/4), 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) "", 
      f[z], " \[DifferentialD]z = ", val]\)
\(\(Print[\*""The contour is the unit circle C: |z - (Subscript[z, 0])| = 1,""];\)\ \ \)
Print["with positive orientation."];

The deformation of contour theorem is an extension of the Cauchy-Goursat theorem to a doubly connected domain in the following sense. Let D be a domain that contains (Subscript[C, 1]) and (Subscript[C, 2]) and the region between them. Then the contour C = (Subscript[C, 2]) - (Subscript[C, 1]) is a parametrization of the boundary of the region R that lies between (Subscript[C, 1])and (Subscript[C, 2]) so that the points of R lie to the left of C as a point z(t) moves around C. Hence C is a positive orientation of the boundary of R, and Theorem 6.6 implies that (∫_C) f (z) dz = 0.  
	
	We can extend Theorem 6.6 to multiply connected domains with more than one "hole.'' The proof, which is left for the reader, involves the introduction of several cuts and is similar to the proof of Theorem 6.6.

Theorem 6.5 (Extended Cauchy-Goursat Theorem), Page 233.  Let  C, (Subscript[C, 1]), (Subscript[C, 2]), ⋯, (Subscript[C, n])  be simple closed positively oriented contours with the property that  (Subscript[C, k])  lies interior to  C  for   k = 1, 2, ⋯, n  and the set of interior to  (Subscript[C, k])  has no points in common with the set interior to  (Subscript[C, j])  if  k ≠ j.  Let  f(z)  be analytic on a domain  D  that contains all the contours and the region between  C  and  (Subscript[C, 1]) + (Subscript[C, 2]) + ⋯ + (Subscript[C, n]), then  

			\(∫\_C 
            f \((z)\) dz = ∑\+\(k = 1\)\%n∫\_\(C\_k\)f \((z)\) dz\).

Proof of Theorem 6.5, see text Page 233.

Example 6.14,  Page 234.  Show that  (∫_C)(( 2  z)/((z^2)  +  2)) dz = 
        4 π i,  where C is the circle  C : |z| = 2  taken with positive orientation.

Solution 6.14.

Enter the function  f[z] = ((2  z)/((z^2)  +  2)).

Remove[R, W, z, 
        Z];  
Clear[f, F, i, p, solset];  
f[z_]  =  ((2  z)/((z^2)  +  2));  
Print["f[z] = ", f[z]];

First, split the function up into partial fractions involving linear terms in the denominators. Don't worry about the subroutine.  It splits f(z) up into partial fractions.  The result will be an equivalent function named F[z].  The list of terms added to form F[z] have singularities in the same order in the list of points Z.

solset  =  
        Sort[Solve[Denominator[f[z]] == 0, z]];  
Z  =  Table[0, {Length[solset]}];  
W  =  Table[0, {Length[solset]}];  
R  =  Table[0, {Length[solset]}];  
F[z_]  =  0;  
\(\(For[i = 1, 
        i ≤ 
          Length[solset], \(i++\), 
Z\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          ReplaceAll[z, 
            solset\_\(\([[\)\(i\)\(]]\)\)]; \ \ \ 
If[1 == i, 
          p\  = \ 1]; \ \ 
If[
          1 < i; \ \ Z\_\(\([[\)\(i - 1\)\(]]\)\) == 
            Z\_\(\([[\)\(i\)\(]]\)\), 
          p\  = \ p + 1, 
          p\  = \ 1]; \ \ 
R\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          Residue[\(\((z - 
                      Z\_\(\([[\)\(i\)\(]]\)\))\)\^\(p - 1\)\) f[z], {z, 
              Z\_\(\([[\)\(i\)\(]]\)\)}]; \ \ 
W\_\(\([[\)\(i\)\(]]\)\) = \ 
          R\_\(\([[\)\(i\)\(]]\)\)\/\((z - Z\_\(\([[\)\(i\)\(]]\)\))\)\^p; \ \ 
\ \ \ F[z_]\  = \ 
          F[z]\  + 
            R\_\(\([[\)\(i\)\(]]\)\)\/\((z - Z\_\(\([[\)\(i\)\(]]\)\))\)\^p;\ \ ];\)\ \ \)
\(\(For[i = 1, 
        i ≤ Length[F[z]], \(i++\), 
\ \ \ soset\  = \ 
          Solve[Denominator[
                W\_\(\([[\)\(i\)\(]]\)\)] == 0, 
            z]; \ \ 
\ \ \ Z\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          ReplaceAll[z, 
            soset\_\(\([[\)\(1\)\(]]\)\)]; \ \ 
\ \ \ R\_\(\([[\)\(i\)\(]]\)\)\  = \ Residue[
            f[z], {z, 
              Z\_\(\([[\)\(i\)\(]]\)\)}];\ \ ];\)\ \ \)
Print["f[z] = ", f[z]];  
Print["f[z] = ", F[z]];

Determine which singularities lie inside  C : |z| = 2.

\(

\(Print[\*""(Subscript[z, 1]) = "", Z\_\(\([[\)\(1\)\(]]\)\), ",  Is |", Z\_\(\([[\)\(1\)\(]]\)\), "| < 2 ?  ", 
        N[Abs[Z\_\(\([[\)\(1\)\(]]\)\)]] < 2];\)\ \ \)
\(\(Print[\*""(Subscript[z, 2]) = "", 
        Z\_\(\([[\)\(2\)\(]]\)\), ",   Is |", Z\_\(\([[\)\(2\)\(]]\)\), "| < 2 ?   ", 
        N[Abs[Z\_\(\([[\)\(2\)\(]]\)\)]] < 2];\)\ \ \)

Since both singularities lie inside C, add the corresponding term in the sum forming F[z] times constant in the numerator that term times 2  π i.

val  =  
        2  π I Numerator[(Subscript[(F[z]), [[1]]])] + 
          2  π I Numerator[(Subscript[(F[z]), [[2]]])];  
dots = 
        Graphics[{{Cyan, PointSize[0.03], 
              Point[{Re[
                    (Subscript[Z, [[1]]])], Im[
                    (Subscript[Z, [[1]]])]}]}, {Cyan, PointSize[0.03], 
              Point[{Re[
                    (Subscript[Z, [[2]]])], Im[
                    (Subscript[Z, [[2]]])]}]}}];  
\(\(centers = 
        Graphics[{Text[\*""(Subscript[z, 1])"", {Re[
                  Z\_\(\([[\)\(1\)\(]]\)\)], Im[Z\_\(\([[\)\(1\)\(]]\)\)] - 
                  0.15}, {\(-1\), 0}], 
            Text[\*""(Subscript[z, 2])"", {Re[
                  Z\_\(\([[\)\(2\)\(]]\)\)], Im[Z\_\(\([[\)\(2\)\(]]\)\)] - 
                  0.15}, {\(-1\), 0}]}];\)\ \ \)
contour  =  Graphics[{Blue, Circle[{0, 0}, 2]}];  
Show[dots, centers, contour, 
        PlotRange -> {{-2.1, 2.1}, {-2.1, 2.1}}, 
        Ticks -> {Range[-2, 2, 1], 
            Range[-2, 2, 1]}, 
AspectRatio -> 1, 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) ("", 
      f[z], ") \[DifferentialD]z = ", val]\)
Print["The contour is the circle  C: |z| = 2,"];  
Print["with positive orientation."];

Example 6.15,  Page 234.  Show that  (∫_C)(( 2  z)/((z^2)  +  2)) dz = 
        2 π i,  where C is the circle  C : |z - i| = 1  taken with positive orientation.

Solution 6.15.

Enter the function  f[z] = ((2  z)/((z^2)  +  2)).

Remove[R, W, z, 
        Z];  
Clear[f, F, i, p, solset];  
f[z_]  =  ((2  z)/((z^2)  +  2));  
Print["f[z] = ", f[z]];

First, split the function up into partial fractions involving linear terms in the denominators.  Don't worry about the subroutine. It splits f(z) up into partial fractions.  The result will be an equivalent function named F[z].  The list of terms added to form F[z] have singularities in the same order in the list of points Z.

solset  =  
        Sort[Solve[Denominator[f[z]] == 0, z]];  
Z  =  Table[0, {Length[solset]}];  
W  =  Table[0, {Length[solset]}];  
R  =  Table[0, {Length[solset]}];  
F[z_]  =  0;  
\(\(For[i = 1, 
        i ≤ 
          Length[solset], \(i++\), 
Z\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          ReplaceAll[z, 
            solset\_\(\([[\)\(i\)\(]]\)\)]; \ \ \ 
If[1 == i, 
          p\  = \ 1]; \ \ 
If[
          1 < i; \ \ Z\_\(\([[\)\(i - 1\)\(]]\)\) == 
            Z\_\(\([[\)\(i\)\(]]\)\), 
          p\  = \ p + 1, 
          p\  = \ 1]; \ \ 
R\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          Residue[\(\((z - 
                      Z\_\(\([[\)\(i\)\(]]\)\))\)\^\(p - 1\)\) f[z], {z, 
              Z\_\(\([[\)\(i\)\(]]\)\)}]; \ \ 
W\_\(\([[\)\(i\)\(]]\)\) = \ 
          R\_\(\([[\)\(i\)\(]]\)\)\/\((z - Z\_\(\([[\)\(i\)\(]]\)\))\)\^p; \ \ 
\ \ \ F[z_]\  = \ 
          F[z]\  + 
            R\_\(\([[\)\(i\)\(]]\)\)\/\((z - Z\_\(\([[\)\(i\)\(]]\)\))\)\^p;\ \ ];\)\ \ \)
\(\(For[i = 1, 
        i ≤ Length[F[z]], \(i++\), 
\ \ \ soset\  = \ 
          Solve[Denominator[
                W\_\(\([[\)\(i\)\(]]\)\)] == 0, 
            z]; \ \ 
\ \ \ Z\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          ReplaceAll[z, 
            soset\_\(\([[\)\(1\)\(]]\)\)]; \ \ 
\ \ \ R\_\(\([[\)\(i\)\(]]\)\)\  = \ Residue[
            f[z], {z, 
              Z\_\(\([[\)\(i\)\(]]\)\)}];\ \ ];\)\ \ \)
Print["f[z] = ", f[z]];  
Print["f[z] = ", F[z]];

Determine which singularities lie inside  C : |z - i| = 1.

\(
\(Print[\*""(Subscript[z, 1]) = "", 
        Z\_\(\([[\)\(1\)\(]]\)\), ",  Is |", Z\_\(\([[\)\(1\)\(]]\)\), " - I| < 1 ?   ", 
        N[Abs[Z\_\(\([[\)\(1\)\(]]\)\) - \ I]] < 1];\)\ \ \)
\(\(Print[\*""(Subscript[z, 2]) = "", 
        Z\_\(\([[\)\(2\)\(]]\)\), ",    Is |", 
        Z\_\(\([[\)\(2\)\(]]\)\), " - I| < 1 ?   ", 
        N[Abs[Z\_\(\([[\)\(2\)\(]]\)\) - \ I]] < 1];\)\ \ \)

Since only the second singularity lies inside C, add the first term in the sum forming F[z] times constant in the numerator that term times 2  π i.

val  =  
        2  π I Numerator[(Subscript[(F[z]), [[2]]])];  
dots = 
        Graphics[{{Red, PointSize[0.03], 
              Point[{Re[
                    (Subscript[Z, [[2]]])], Im[
                    (Subscript[Z, [[2]]])]}]}}];  
\(\(centers = 
        Graphics[{Text[\*""(Subscript[z, 2])"", {Re[
                  Z\_\(\([[\)\(2\)\(]]\)\)], Im[Z\_\(\([[\)\(2\)\(]]\)\)] - 
                  0.1}, {\(-1\), 0}]}];\)\ \ \)
contour  =  Graphics[{Magenta, Circle[{0, 1}, 1]}];  
Show[dots, centers, contour, 
        PlotRange -> {{-1.1, 1.1}, {-0.1, 2.1}}, 
        Ticks -> {Range[-2, 2, 1], 
            Range[-2, 2, 1]}, 
AspectRatio -> 1, 
        Axes -> True, 
        AxesLabel -> {"x", "y"}];  
\(Print[\*""\!\(∮\+C\) ("", 
      f[z], ") \[DifferentialD]z = ", val]\)
\(\(Print["The contour is the circle  C: |z-I| = 1,"];\)\ \ \)
Print["with positive orientation."];

Example 6.16,  Page 234.  Show that  (∫_C)(( z  -  2)/((z^2)  -  
                  z)) dz = -6 π i,  where C is the figure eight shown in the text.

Solution 6.16.

Enter the function  f[z] = ((z  -  2)/((z^2)  -  z)).

Remove[R, W, z, 
        Z];  
Clear[f, F, i, p, solset];  
f[z_]  =  ((z  -  2)/((z^2)  - z));  
Print["f[z] = ", f[z]];

First, split the function up into partial fractions involving linear terms in the denominators.  Don't worry about the subroutine. It splits f(z) up into partial fractions.  The result will be an equivalent function named F[z].  The list of terms added to form F[z] have singularities in the same order in the list of points Z.

solset  =  
        Sort[Solve[Denominator[f[z]] == 0, z]];  
Z  =  Table[0, {Length[solset]}];  
W  =  Table[0, {Length[solset]}];  
R  =  Table[0, {Length[solset]}];  
F[z_]  =  0;  
\(\(For[i = 1, 
        i ≤ 
          Length[solset], \(i++\), 
Z\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          ReplaceAll[z, 
            solset\_\(\([[\)\(i\)\(]]\)\)]; \ \ \ 
If[1 == i, 
          p\  = \ 1]; \ \ 
If[
          1 < i; \ \ Z\_\(\([[\)\(i - 1\)\(]]\)\) == 
            Z\_\(\([[\)\(i\)\(]]\)\), 
          p\  = \ p + 1, 
          p\  = \ 1]; \ \ 
R\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          Residue[\(\((z - 
                      Z\_\(\([[\)\(i\)\(]]\)\))\)\^\(p - 1\)\) f[z], {z, 
              Z\_\(\([[\)\(i\)\(]]\)\)}]; \ \ 
W\_\(\([[\)\(i\)\(]]\)\) = \ 
          R\_\(\([[\)\(i\)\(]]\)\)\/\((z - Z\_\(\([[\)\(i\)\(]]\)\))\)\^p; \ \ 
\ \ \ F[z_]\  = \ 
          F[z]\  + 
            R\_\(\([[\)\(i\)\(]]\)\)\/\((z - Z\_\(\([[\)\(i\)\(]]\)\))\)\^p;\ \ ];\)\ \ \)
\(\(For[i = 1, 
        i ≤ Length[F[z]], \(i++\), 
\ \ \ soset\  = \ 
          Solve[Denominator[
                W\_\(\([[\)\(i\)\(]]\)\)] == 0, 
            z]; \ \ 
\ \ \ Z\_\(\([[\)\(i\)\(]]\)\)\  = \ 
          ReplaceAll[z, 
            soset\_\(\([[\)\(1\)\(]]\)\)]; \ \ 
\ \ \ R\_\(\([[\)\(i\)\(]]\)\)\  = \ Residue[
            f[z], {z, 
              Z\_\(\([[\)\(i\)\(]]\)\)}];\ \ ];\)\ \ \)
Print["f[z] = ", f[z]];  
Print["f[z] = ", F[z]];

Determine which singularities corresponds to the contour (Subscript[C, 1])  and (Subscript[C, 2]).  The first term will correspond to the singularity at z = 1 used with contour (Subscript[C, 2]) and the second term corresponds to the singularity at z = 0 used with contour (Subscript[C, 1]).  

Since (Subscript[C, 2]) has positive orientation, we add the first term in the sum forming  F(z)  times constant in the numerator of that term times 2 π i.  And since the (Subscript[C, 1]) has negative orientation, we subtract the second term in the sum forming  F(z)  times constant in the numerator of that term times 2 π i.

val1  =  
        2 π I Numerator[(Subscript[(F[z]), [[1]]])];  
val2  =  
        2 π I Numerator[(Subscript[(F[z]), [[2]]])];  
val  =  val1 - val2;  
dots = 
        Graphics[{{Red, PointSize[0.03], 
              Point[{Re[
                    (Subscript[Z, [[1]]])], Im[
                    (Subscript[Z, [[1]]])]}]}, {Cyan, PointSize[0.03], 
              Point[{Re[
                    (Subscript[Z, [[2]]])], Im[
                    (Subscript[Z, [[2]]])]}]}}];  
\(\(centers = 
        Graphics[{Text[\*""(Subscript[z, 1])"", {Re[
                  Z\_\(\([[\)\(1\)\(]]\)\)], Im[Z\_\(\([[\)\(1\)\(]]\)\)] + 
                  0.2}, {0, 1}], 
            Text[\*""(Subscript[z, 2])"", {Re[
                  Z\_\(\([[\)\(2\)\(]]\)\)], Im[Z\_\(\([[\)\(2\)\(]]\)\)] + 
                  0.2}, {0, 1}]}];\)\ \ \)
\(\(label = 
        Graphics[{Text[\*""\!\(C\_1\)"", {0.25, 0.8}, {0, 1}], 
            Text[\*""\!\(C\_2\)"", {0.75, 0.8}, {0, 
                1}]}];\)\ \ \)
contour = 
        ParametricPlot[{{0.5 + Cos[t], Sin[2  t]}, {0.5 + Cos[t + π], 
              Sin[2 (t + π)]}}, {t, ((-π)/2), (π/2)}, 
          PlotStyle -> {Blue, Magenta}, 
          Ticks -> {Range[0, 1, 1], Range[-1, 1, 1]}, 
          DisplayFunction -> Identity];  
Show[dots, centers, label, contour, 
        PlotRange -> {{-0.6, 1.6}, {-1.0, 1.0}}, 
        Ticks -> {Range[-2, 2, 1], Range[-2, 2, 1]}, 
        Axes -> True, AxesLabel -> {"x", "y"}, 
        DisplayFunction -> $DisplayFunction];  
\(\(Print[\*""(∮_((Subscript[C, 1]))) ("", 
        W\_\(\([[\)\(1\)\(]]\)\), ") \[DifferentialD]z = ", val1];\)\ \ \)
\(\(Print[\*""(∮_((Subscript[C, 2]))) ("", 
        W\_\(\([[\)\(2\)\(]]\)\), ") \[DifferentialD]z = ", val2];\)\ \ \)
Print[""];  
\(\(Print[\*""\!\(∮\+C\) ("", 
        F[z], ") \[DifferentialD]z = ", 
        val];\)\ \ \)
\(\(Print[\*""\!\(∮\+C\) ("", 
        f[z], ") \[DifferentialD]z = ", 
        val];\)\ \ \)
\(\(Print[\*""The contour (Subscript[C, 1]) has negative orientation.""];\)\ \ \)
\(\(Print[\*""The contour (Subscript[C, 2]) has positive orientation.""];\)\ \ \)

Library Research Experience for Undergraduates

Project I. Write a report on the Cauchy-Goursat theorem.

1. Berresford, Geoffrey C. ''Cauchy's Theorem,'' Am. Math. M., Vol. 88, No. 10. (Dec., 1981), pp. 741-744, Jstor.   

2. Lass, Harry, ''A Note on Cauchy's Theorem (in Classroom Notes),'' Am. Math. M., Vol. 60, No. 2. (Feb., 1953), pp. 110-112., Jstor.   

3. Moore, Eliakim Hastings, ''A Simple Proof of the Fundamental Cauchy-Goursat Theorem,'' Trans. of the Am. Math. Soc., Vol. 1, No. 4. (Oct., 1900), pp. 499-506., Jstor.

Section 6.3  Exercises for The Cauchy-Goursat Theorem
See textbook page 236.

Section 6.4	The Fundamental Theorem of Integration

Section 6.5	Integral Representations for Analytic Functions

Section 6.6	The Theorems of Morera and Liouville and Some Applications

GO TO  THE  Table of Contents