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

In Section 6.1 we learned how to evaluate integrals of the form  (∫_a^b) f (t) dt,  where  f  was complex-valued and  [a, b]  was an interval on the real axis (so that t was real, with  t ∈ [a, b]).  In this section we shall define and evaluate integrals of the form  (∫_C) f (z) dz,  where  f  is complex-valued and  C  is a contour in the plane (so that   z  is complex, with  z ∈ C).  Our main result is Theorem 6.1, which will show how to transform the latter type of integral into the kind we investigated in Section 6.1.  

	We will use concepts first introduced in Section 1.6, where we define the concept of a curve in the plane.  Recall that to represent a curve  C  we used the parametric notation

	C :  z (t) =  x (t) + i y (t)  for  a ≤ t ≤ b,

where  x(t)  and  y(t)  are continuous functions.  We now want to place a few more restrictions on the type of curve that we will be studying.  The following discussion will lead to the concept of a contour, which is a type of curve that is adequate for the study of integration. 

	Recall that  C  is said to be simple if it does not cross itself, which is expressed by requiring that  z ((Subscript[t, 1])) ≠ z ((Subscript[t, 2]))  whenever  (Subscript[t, 1]) ≠ (Subscript[t, 2]).  A curve  C  with the property that z (a) = z (b)  is said to be a closed curve.  If   z (a) = z (b)  is the only point of intersection, then we say that  C  is a simple closed curve.  As the parameter  t  increases from the value  a  to the value  b,  the point  z(t)  starts at the initial point  z(a),  moves along the curve  C,  and ends up at the terminal point  z(b).  If  C  is simple, then  z(t)  moves continuously from  z(a)  to  z(b)  as  t  increases, and the curve is given an orientation, which we indicate by drawing arrows along the curve.  

	The complex-valued function  z(t)  is said to be differentiable if both  x(t)  and  y(t)  are differentiable for  a ≤ t ≤ b.  Here the one-sided derivatives of  x(t)  and  y(t)  are required to exist at the endpoints of the interval.  The derivative  z' (t)  with respect to  t  is defined by the equation  

	z'[t] =  x'[t] + i y'[t]  for  a ≤ t ≤ b.  

	The curve  C  is said to be smooth if  z' (t),  is continuous and nonzero on the interval.  If  C  is a smooth curve, then  C  has a nonzero tangent vector at tach point  z(t),  which is given by the vector  z' (t).

If  C  is a smooth curve, then  ds,  the differential of arc length, is given by  \(ds = \(\@\(\([x' \((t)\)]\)\^2 + \([y' \((t)\)]\)\^2\)\) dt\).  Since  x' (t)  and  y' (t)  are continuous functions, then so is the function  (Sqrt[(([x' (t)])^2) + (([y' (t)])^2)]),  and the Length  L  of the curve  C is given by the definite integral  

	\(L \((C)\)\  = \(∫\_a\%b\ \(\@\(\([x' \((t)\)]\)\^2 + \([y' \((t)\)]\)\^2\)\) dt\  = \ ∫\_a\%b\ \(\(|\)\(z' \((t)\)\)\(|\)\(dt\)\)\)\).  


	Now consider  C  to be a curve with parameterization  C :  (Subscript[z, 1]) (t) =  
        x (t) + i y (t)  for  a ≤ 
          t ≤ b,  The opposite curve  -C  traces out the same set of points in the plane, but in the reverse order, and it has the parameterization

	-C :  (Subscript[z, 2]) (t) =  
        x (-t) + i y (-t)  for   - 
            b ≤ t ≤ -a.

Since  (Subscript[z, 2]) (t) = (Subscript[z, 1]) (-t),  it is easy to see that  -C  is merely  C  traversed in the opposite sense.  

	A curve  C  that is constructed by joining finitely many smooth curves end to end is called a contour.  Let  (Subscript[C, 1]), (Subscript[C, 2]),  ... , (Subscript[C, n])  denote  n  smooth curves such that the terminal point of  (Subscript[C, k])  coincides with the initial point of  (Subscript[C, k + 1])  for  k = 1, 2,  ... , n - 1.  Then the contour  C  is expressed by the equation

	C = (Subscript[C, 1]) + (Subscript[C, 2]) +  ...  + (Subscript[C, n]).

A synonym for contour is path.

Example 6.5,  Page 208.  Find a parameterization of the polygonal path  C  from  - 1 + i  to  3 - i  consisting of the three line segments:
Line segment #1 from  - 1 + i  to  - 1 ,
Line segment #2 from  - 1  to  1 + i ,
Line segment #3 from  1 + i  to  3 - i .

Solution 6.5.

Enter the four points and construct the three line segments.

Remove[t, x, y, z]; 
Clear[V1, V2, V3, Z1, Z2, Z3]; 
(Subscript[z, 0])  =  - 1  +  I; 
(Subscript[z, 1])  =  - 1; 
(Subscript[x, 0]) = Re[(Subscript[z, 0])];  (Subscript[y, 0]) = Im[(Subscript[z, 0])];  (Subscript[x, 1]) = Re[(Subscript[z, 1])];  
    (Subscript[y, 1]) = Im[(Subscript[z, 1])]; 
Z1[t_]  =  
        (Subscript[x, 0])  +  ((Subscript[x, 1]) - (Subscript[x, 0])) 
            t  +  I ((Subscript[y, 0])  +  ((Subscript[y, 1]) - (Subscript[y, 0])) 
                  t); 
(Subscript[z, 0])  =  - 1; 
(Subscript[z, 1])  =  1  +  I; 
(Subscript[x, 0]) = Re[(Subscript[z, 0])];  (Subscript[y, 0]) = Im[(Subscript[z, 0])];  (Subscript[x, 1]) = Re[(Subscript[z, 1])];  
    (Subscript[y, 1]) = Im[(Subscript[z, 1])]; 
Z2[t_]  =  
        (Subscript[x, 0])  +  ((Subscript[x, 1]) - (Subscript[x, 0])) 
            t  +  I ((Subscript[y, 0])  +  ((Subscript[y, 1]) - (Subscript[y, 0])) 
                  t); 
(Subscript[z, 0])  =  1  +  I; 
(Subscript[z, 1])  =  3  -  I; 
(Subscript[x, 0]) = Re[(Subscript[z, 0])];  (Subscript[y, 0]) = Im[(Subscript[z, 0])];  (Subscript[x, 1]) = Re[(Subscript[z, 1])];  
    (Subscript[y, 1]) = Im[(Subscript[z, 1])]; 
Z3[t_]  =  
        (Subscript[x, 0])  +  ((Subscript[x, 1]) - (Subscript[x, 0])) 
            t  +  I ((Subscript[y, 0])  +  ((Subscript[y, 1]) - (Subscript[y, 0])) 
                  t); 
\(\(Print[\*""\!\(Z\_1\)[t] = "", 
        Z1[t], ",     for 0 ≤ t ≤ 1."];\)\ \)
\(\(Print[\*""\!\(Z\_2\)[t] = "", 
        Z2[t], ",     for 0 ≤ t ≤ 1."];\)\ \)
\(\(Print[\*""\!\(Z\_3\)[t] = "", 
        Z3[t], ", for 0 ≤ t ≤ 1."];\)\ \)
Print[""]; 
\(\(Print[\*""\!\(Z\_1\)[0] = "", Z1[0]];\)\ \)
\(\(Print[\*""\!\(Z\_1\)[1] = "", 
        Z1[1]];\)\ \)
Print[""]; 
\(\(Print[\*""\!\(Z\_2\)[0] = "", Z2[0]];\)\ \)
\(\(Print[\*""\!\(Z\_2\)[1] = "", 
        Z2[1]];\)\ \)
Print[""]; 
\(\(Print[\*""\!\(Z\_3\)[0] = "", Z3[0]];\)\ \)
\(\(Print[\*""\!\(Z\_3\)[1] = "", 
        Z3[1]];\)\ \)

We can use Mathematica to graph these line segments.

V1[t_] = 
        ComplexExpand[{Re[Z1[t]], Im[Z1[t]]}]; 
V2[t_] = ComplexExpand[{Re[Z2[t]], Im[Z2[t]]}]; 
V3[t_] = ComplexExpand[{Re[Z3[t]], Im[Z3[t]]}]; 
ParametricPlot[Evaluate[{V1[t], V2[t], V3[t]}], {t, 0, 1}, 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> {Red, Blue, Green}]; 
\(\(Print[\*""C: \!\(Z\_1\)[t] = "", 
        Z1[t], ",     for 0 ≤ t ≤ 1."];\)\ \)
\(\(Print[\*""   \!\(Z\_2\)[t] = "", 
        Z2[t], ",     for 0 ≤ t ≤ 1."];\)\ \)
\(\(Print[\*""   \!\(Z\_3\)[t] = "", 
        Z3[t], ", for 0 ≤ t ≤ 1."];\)\ \)

We are now ready to define the integral of a complex function along a contour  C  in the complex plane with initial point  A  and terminal point  B.  Our approach is to mimic what is done in calculus.  We create a partition  (Subscript[P, n]) = {(Subscript[z, 0]) = A, (Subscript[z, 1]), (Subscript[z, 2]),  ... , (Subscript[z, n]) = B}  of points that proceed along  C  from  A  to  B  and form the differences  Δ(Subscript[z, k]) = (Subscript[z, k]) - (Subscript[z, k - 1])  for  k = 1, 
      2,  ... , n.  Between each pair of partition points  (Subscript[z, k - 1])  and  (Subscript[z, k])  we select a point  (Subscript[c, k])  on  C,  where the function  f ((Subscript[c, k]))  is evaluated.  These values are used to make a Riemann Sum for the partition:  

	S ((Subscript[P, n]))  =  (∑_(k = 1)^n) 
              f ((Subscript[c, k])) ((Subscript[z, k]) - 
                  (Subscript[z, k - 1]))  =  (∑_(k = 1)^n) 
              f ((Subscript[c, k])) Δ(Subscript[z, k])

	Assume now that there exists a unique number  L  that is the limit of every sequence {S ((Subscript[P, n]))} of Riemann sums, where the maximum of  |Δ(Subscript[z, k])|  tends toward  0, for the sequence of partitions.  We define the number  L  as the value of the integral of  f(z)  taken along the contour  C.  We thus have the following.

Definition 6.2 (Contour Integral),  Page 209.  Let  C  be a contour. Then  

			(∫_C) f (z) dz =  
        (lim_(n  ->  ∞)) (∑_(k = 1)^n) 
              f ((Subscript[c, k])) Δ(Subscript[z, k]),  

provided that the limit exists in the sense previously discussed.

Notice that in definition 6.2 the value of the integral depends on the contour. In Section 6.3 the Cauchy-Goursat theorem will establish the remarkable fact that if f is analytic, then (∫_C) f (z) dz is independent of the contour.

Example 6.6,  Page 209.  Use a Riemann sum to construct an approximation for the contour integral  (∫_C) (e^z) dz  where  C  is a the line segment joining the point  a  = 0   to   b = 2 + ((i π)/4).

Solution 6.6.

Enter the function  f[z] = (e^z)  and compute the approximating Riemann sum.  
For illustration.  We use n = 8 terms in the sum.

Remove[a, b, c, z]; 
Clear[dz, f, k, n, RiemannSum]; 
f[z_]  =  (E^z); 
a  =  0; 
b  =  2  + (( I π)/4); 
n  =  8; 
dz  =  ((b - a)/n); 
(Subscript[z, k])_  =  Expand[a  +  k dz]; 
(Subscript[c, k])_  =  Expand[(((Subscript[z, k - 1])  +  (Subscript[z, k]))/2)]; 
RiemannSum  = (∑_(k = 1)^n) f[(Subscript[c, k])] dz ; 
Print["f[z] = ", f[z]]; 
Print[""]; 
Print["n = ", n]; 
\(\(Print[\*""{\!\(z\_k\)} = "", 
        Table[z\_k, {k, 1, n}]];\)\ \)
\(\(Print[\*""{\!\(c\_k\)} = "", 
        Table[c\_k, {k, 1, n}]];\)\ \)
Print[""]; 
\(\(Print[\*""(∑_(k = 1))""\&n, \*""f[(Subscript[c, k])](Subscript[dz, k]) = ""];\)\ \)
Print[RiemannSum]; 
Print[""]; 
\(\(Print[\*""(∑_(k = 1))""\&n, \*""f[(Subscript[c, k])](Subscript[dz, k]) = ""];\)\ \)
Print[((∑_(k = 1)^n) f[(Subscript[c, k])]) dz]; 
Print[""]; 
\(\(Print[\*""(∑_(k = 1))""\&n, \*""f[(Subscript[c, k])](Subscript[dz, k]) = "", N[RiemannSum]];\)\ \)

Theorem 6.1,  Page 211.  Suppose  f(z) is a continuous complex-valued function defined on a set containing the contour  C.  Let  z(t)  be any parameterization of  C  for  a ≤ t ≤ b.  Then  

	(∫_C) 
          f (z) dz = (∫_a^b) 
            f (z (t)) z' (t) dt.

Proof of Theorem 6.1, see text Page 211.  We omit the proof of this theorem since it involves ideas (such as the theory of the Riemann-Stieltjes integral) that are beyond the scope of this book. A more rigorous development of the contour integral based on Riemann sums is found in advanced texts such as Lars Valerian Ahlfors, Complex Analysis, 3rd ed. (New York: McGraw-Hill, 1979).

There are two important facets of Theorem 6.1 that are worth mentioning. First, the theorem makes the problem of evaluating complex-valued functions along contours easy since it reduces our task to one that requires the evaluation of complex-valued functions over real intervals---a procedure we studied in Section 6.1. Second, according to the theorem this transformation yields the same answer regardless of the parametrization we choose for C.

Example 6.7,  Page 212.  Give an exact the contour integral  (∫_C) (e^z) dz  where C is a the line segment joining the point  a  = 0   to   b = 2 + ((i π)/4).

Solution 6.7.

Enter the function  f[z] = (e^z)  and set up the parameterization for the computing a contour integral.

Remove[a, b, t, u, v, z, 
        Z]; 
Clear[f, int, val]; 
a  =  0; 
b  =  2  + (( I π)/4); 
z[t_]  =   a  +  (b  -  a) t; 
F[Z_]  =  (E^Z); 
f[t_]  =  (E^z)[t]; 
u[t_]  =  ComplexExpand[Re[f[t]]]; 
v[t_]  =  ComplexExpand[Im[f[t]]]; 
Print["        F[z] = ", F[z]]; 
Print["        z[t] = ", z[t]]; 
Print[""]; 
Print["     F[z[t]] = ", f[t]]; 
Print["        u[t] = ", u[t]]; 
Print["        v[t] = ", v[t]]; 
Print[""]; 
Print["       z'[t] = ", z'[t]]; 
Print["f[z[t]]z'[t] = ", 
        f[t] z'[t]];

Method (i). The first method uses a complex integrand  f[z[t]] z'[t].

Clear[int, val]; 
int  = ∫f[t] z'[t] \[DifferentialD]t; 
val  =  (∫_0^1) f[t] z'[
              t] \[DifferentialD]t; 
V[t_] = 
        ComplexExpand[{Re[z[t]], Im[z[t]]}]; 
Print["f[z[t]]z'[t] = ", 
        f[t] z'[t]]; 
Print[""]; 
Print[" ∫f[z[t]]z'[t]\[DifferentialD]t = ", 
        int]; 
Print[""]; 
\(\(Print[\*""(∫_0^1)f[z[t]]z'[t]\[DifferentialD]t = "", val];\)\ \)
val = ComplexExpand[FullSimplify[val]]; 
\(\(Print[\*""(∫_0^1)f[z[t]]z'[t]\[DifferentialD]t = "", val];\)\ \)
\(\(Print[\*""(∫_0^1)f[z[t]]z'[t]\[DifferentialD]t = ("", ComplexExpand[Re[val]], ") + I (", 
        ComplexExpand[Im[val]], ")"];\)\ \)
\(\(Print[\*""(∫_0^1)f[z[t]]z'[t]\[DifferentialD]t = "", N[val]];\)\ \)
ParametricPlot[Evaluate[V[t]], {t, 0, 1}, 
        PlotRange -> {{0, 2}, {0, 1}}, AspectRatio -> (1/2), 
        Ticks -> {Range[-1, 2, 1], Range[0, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        F[z], "\[DifferentialD]z = ", 
        ComplexExpand[FullSimplify[val]]];\)\ \)
\(\(Print[\*""\!\(∫\_C\) "", 
        F[z], "\[DifferentialD]z = (", 
        ComplexExpand[Re[val]], ") + I(", 
        ComplexExpand[Im[val]], ")"];\)\ \)
\(\(Print[\*""\!\(∫\_C\) "", 
        F[z], "\[DifferentialD]z = ", 
        N[val]];\)\ \)
Print["C: z[t] = ", 
        z[t], ",  for  0 ≤ t ≤ 1."];

Method (ii). The second method uses a integrals of  u[t] z'[t] and  v[t] z'[t].

Clear[ImInt, ImVal, ReInt, ReVal, V, 
        Val]; 
ReInt  =  ∫u[t] z'[
              t] \[DifferentialD]t; 
ImInt  =  ∫v[t] z'[
              t] \[DifferentialD]t; 
ReVal  =   (∫_0^1) u[t] z'[
              t] \[DifferentialD]t; 
ImVal  =   (∫_0^1) v[t] z'[
              t] \[DifferentialD]t; 
Val  =   ReVal  +  I ImVal; 
V[t_] = 
        ComplexExpand[{Re[z[t]], Im[z[t]]}]; 
Print["u[t]z'[t] = ", u[t] z'[t]]; 
Print["v[t]z'[t] = ", 
        v[t] z'[t]]; 
Print[""]; 
Print["∫u[t]z'[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]z'[t]\[DifferentialD]t"]; 
Print["= ", ReInt, " + \[ImaginaryI](", 
        ImInt, ")"]; 
Print[" "]; 
\(\(Print[\*""(∫_0^1)u[t]z'[t]\[DifferentialD]t + I (∫_0^1)v[t]z'[t]\[DifferentialD]t""];\)\ \)
Print["= ", ReVal, " + \[ImaginaryI](", 
        ImVal, ")"]; 
Print["= ", ComplexExpand[Val]]; 
Print["= ", 
        Apart[ComplexExpand[Val]]]; 
Val = 
        ComplexExpand[FullSimplify[Val]]; 
Print["= ", Val]; 
Print["= (", ComplexExpand[Re[Val]], ") + \[ImaginaryI] (", 
        ComplexExpand[Im[Val]], ")"]; 
Print["= ", 
        N[ComplexExpand[Val]]]; 
ParametricPlot[Evaluate[V[t]], {t, 0, 1}, 
        PlotRange -> {{0, 2}, {0, 1}}, AspectRatio -> (1/2), 
        Ticks -> {Range[-1, 2, 1], Range[0, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        F[z], "\[DifferentialD]z = ", 
        ComplexExpand[FullSimplify[val]]];\)\ \)
\(\(Print[\*""\!\(∫\_C\) "", 
        F[z], "\[DifferentialD]z = (", 
        ComplexExpand[Re[val]], ") + I(", 
        ComplexExpand[Im[val]], ")"];\)\ \)
\(\(Print[\*""\!\(∫\_C\) "", 
        F[z], "\[DifferentialD]z = ", 
        N[val]];\)\ \)
Print["C: z[t] = ", 
        z[t], ",  for  0 ≤ t ≤ 1."];

Example 6.8,  Page 212.  Evaluate the contour integral  (∫_C) (1/(z  -  2)) dz  where C is a the upper semicircle with radius 1 centered at  x = 2.

Solution 6.8.

Enter the function  f[z] = (1/(z  -  2))  and set up the parameterization and compute the contour integral.

Remove[t, z]; 
Clear[f, int, val, V]; 
f[z_]  =  (1/(z  -  2)); 
z[t_]  =  
        2  +  (E^(I t)); 
int  =  ∫f[z[t]] z'[
              t] \[DifferentialD]t; 
val  =  (∫_0^π) f[z[t]] z'[
              t] \[DifferentialD]t; 
V[t_] = ComplexExpand[{Re[z[t]], Im[z[t]]}]; 
Print["               f[z] = ", f[z]]; 
Print["               z[t] = ", z[t]]; 
Print["            f[z[t]] = ", f[z[t]]]; 
Print["              z'[t] = ", z'[
          t]]; 
Print[""]; 
Print["       f[z[t]]z'[t] = ", 
        f[z[t]], z'[t]]; 
Print["       f[z[t]]z'[t] = ", 
        f[z[t]] z'[t]]; 
Print[""]; 
Print["    ∫f[z[t]]z'[t]\[DifferentialD]t = ", 
        int]; 
Print[""]; 
\(\(Print[\*""   (∫_0^π)f[z[t]]z'[t]\[DifferentialD]t = "", val];\)\ \)
ParametricPlot[Evaluate[V[t]], {t, 0, π}, 
        PlotRange -> {{0, 3}, {0, 1}}, AspectRatio -> (1/3), 
        Ticks -> {Range[-1, 3, 1], Range[0, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", 
        val];\)\ \)
Print["C: z[t] = ", 
        z[t], ",  for  0 ≤ t ≤ π."];

Suppose   f (z) = u (z) + i v (t) , and  z (t) = x (t) + i y (t)  is a parametrization for the contour C. Then

		(∫_C) 
          f (z) dz = (∫_a^b) f (z (t)) 
            z' (t) dt  

		\(\(\(=\)\(∫\_a\%b\((u \((z \((t)\))\) + i\ v \((z \((t)\))\))\) \((x' \((t)\) + i\ y' \((t)\))\) dt\)\)\)  

		\(\(\(=\)\(∫\_a\%b\([u \((z \((t)\))\)\ x' \((t)\) - 
                v \((z \((t)\))\)\ y' \((t)\)]\) \(\(dt\)\(\ \)\)\)\)\)  

		\(\(\(\ \ \ \ \ \)\(\(+\ i\)\ \(∫\_a\%b\([v \((z \((t)\))\) x' \((t)\) + 
                u \((z \((t)\))\) y' \((t)\)]\) dt\)\)\)\)  
		
		\(\(\(=\)\(∫\_a\%b\((u\ x' - 
                  v\ \ y')\) dt\  + \ i\ \(∫\_a\%b\((v\ x' + u\ y')\) dt\)\)\)\)  

where we are equating u with u(z(t)), x' with x'(t), and so on.

If we use the differentials, then the above equation can be written in terms of line integrals of the real-valued functions u and v, giving  

			(∫_C) f (z) dz==(∫_a^b) u dx  - 
          v dy  +  i (∫_a^b) 
                v dx  + u dy,

which is easy to remember if we recall that symbolically

			\(f \((z)\)\ dz\  = \ \((u + i\ v)\) \((dx + i dy)\)\).

We emphasize that Equation (6-16) is merely a notational device for applying Theorem 6.1. You should carefully apply Theorem 6.1as illustrated in Examples 6.7 and 6.8 before using any shortcuts suggested by the latter.

Example  6.9,  Page 214.  Evaluate the contour integrals  of  f (z) = z  starting at the points   (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i.  
(a) Use the line segment joining the points.  (b) Use a portion of a parabola joining the points.

Solution 6.9 (a)

(a)  Use the straight line segment connecting the points  (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i,  set up the parameterization and compute the contour integral.  Enter the function  f[z] = z.

Remove[t, u, U, v, V, w, W, 
        z]; 
Clear[f, U1, U2, V1, V2, W1, W2, z1, z2]; 
f[z_]  =  z ; 
z1[t_]  =  2  t  +  1  +  I t; 
w[t_]  =  ComplexExpand[f[z1[t]] z1'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
Print["           f[z] = ", f[z]]; 
Print[""]; 
\(\(Print[\*""          \!\(z\_1\)[t] = "", z1[t]];\)\ \)
\(\(Print[\*""       f[\!\(z\_1\)[t]] = "", 
        f[z1[t]]];\)\ \)
\(\(Print[\*""         \!\(z\_1\)'[t] = "", \(z1'\)[
          t]];\)\ \)
Print[""]; 
\(\(Print[\*""f[\!\(z\_1\)[t]] \!\(z\_1\)'[t] = "", 
        w[t]];\)\ \)
Print[""]; 
Print["           u[t] = ", u[t]]; 
Print["           v[t] = ", v[t]];

Method (i).  The integral can be computed using the real and imaginary parts.

U1  = (∫_(-1)^1) u[
              t] \[DifferentialD]t; 
V1  = (∫_(-1)^1) v[t] \[DifferentialD]t; 
W1  =  U1  +  I V1; 
U[t_]  =  ∫u[t] \[DifferentialD]t; 
V[
          t_]  =  ∫v[
              t] \[DifferentialD]t; 
reint  =  ∫u[
              t] \[DifferentialD]t; 
imint  =  ∫v[
              t] \[DifferentialD]t; 
P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
Print["u[t] = ", u[t]]; 
Print["v[t] = ", v[t]]; 
Print["∫u[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]\[DifferentialD]t = ", reint, " + \[ImaginaryI] (", 
        imint, ")"]; 
Print[""]; 
Print["U[t] = ", U[t], ",     V[t] = ", V[t]]; 
Print["U[1] = ", U[1], ",     V[1] = ", V[1]]; 
Print["U[-1] = ", U[-1], ",   V[-1] = ", 
        V[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = U[1]-U[-1] + I(V[1]-V[-1])""];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        U[1] - U[\(-1\)], " + I (", 
        V[1] - V[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I (∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        W1];\)\ \)
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Method (ii).  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W1  = (∫_(-1)^1) w[
              t] \[DifferentialD]t; 
P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
Print["w[t] = ", w[t]]; 
Print[""]; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        ComplexExpand[W[t]]]; 
Print["W[1] = ", W[1], ",  W[-1] = ", 
        W[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = W[1]-W[-1] = "", W[1], " - (", W[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = "", W1];\)\ \)
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Solution 6.9 (b)

(b)  Use the portion of a parabola connecting the points  (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i,  set up the parameterization and compute the contour integral.

z2[t_]  =  
        (t^2)  +  2  t  +  I t; 
w[t_]  =  ComplexExpand[f[z2[t]] z2'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
\(\(Print[\*""          \!\(z\_2\)[t] = "", z2[t]];\)\ \)
\(\(Print[\*""       f[\!\(z\_2\)[t]] = "", 
        f[z2[t]]];\)\ \)
\(\(Print[\*""         \!\(z\_2\)'[t] = "", \(z2'\)[
          t]];\)\ \)
\(\(Print[\*""f[\!\(z\_2\)[t]] \!\(z\_2\)'[t] = "", 
        w[t]];\)\ \)
Print["           u[t] = ", u[t]]; 
Print["           v[t] = ", v[t]];

Method (i).  The integral can be computed using the real and imaginary parts.

U2  = (∫_(-1)^1) u[
              t] \[DifferentialD]t; 
V2  = (∫_(-1)^1) v[t] \[DifferentialD]t; 
W2  =  U2  +  I V2; 
U[t_]  =  ∫u[t] \[DifferentialD]t; 
V[
          t_]  =  ∫v[
              t] \[DifferentialD]t; 
reint  =  ∫u[
              t] \[DifferentialD]t; 
imint  =  ∫v[
              t] \[DifferentialD]t; 
P2[t_] = 
        ComplexExpand[{Re[z2[t]], Im[z2[t]]}]; 
Print["u[t] = ", u[t]]; 
Print["v[t] = ", v[t]]; 
Print["∫u[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]\[DifferentialD]t = ", reint, " + \[ImaginaryI] (", 
        imint, ")"]; 
Print[""]; 
Print["U[t] = ", U[t], ",     V[t] = ", V[t]]; 
Print["U[1] = ", U[1], ",     V[1] = ", V[1]]; 
Print["U[-1] = ", U[-1], ",   V[-1] = ", 
        V[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = U[1]-U[-1] + I(V[1]-V[-1])""];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        U[1] - U[\(-1\)], " + I (", 
        V[1] - V[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I (∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        W2];\)\ \)
ParametricPlot[Evaluate[P2[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Green]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
\(\(Print[\*""C: \!\(z\_2\)[t] = "", 
        z2[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Method (ii).  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W2  = (∫_(-1)^1) w[
              t] \[DifferentialD]t; 
P2[t_] = 
        ComplexExpand[{Re[z2[t]], Im[z2[t]]}]; 
Print["w[t] = ", w[t]]; 
Print[""]; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        ComplexExpand[W[t]]]; 
Print["W[1] = ", W[1], ",  W[-1] = ", 
        W[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = W[1]-W[-1] = "", W[1], " - (", W[\(-1\)], ")"];\)\ \)
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
ParametricPlot[Evaluate[P2[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Green]; 
\(\(Print[\*""(∫_C) (z^2) \[DifferentialD]z = "", W2];\)\ \)
\(\(Print[\*""C: \!\(z\_2\)[t] = "", 
        z2[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Which is the same as the value along the other path because  f (z) = (z^2)  is an analytic function

P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Extra Example (i) for Page 214.  Evaluate the contour integrals  of  f (z) = (z^2)  starting at the points   (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i.  
(a) Use the line segment joining the points.  (b) Use a portion of a parabola joining the points.
Remark. The example in the text used the function f (z) = z  which is difficult for hand computations but it is not a challenge for Mathematica, hence we choose to use the function f (z) = (z^2).

Solution for Extra Example (i) Page 214 part (a)

(a)  Use the straight line segment connecting the points  (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i,  set up the parameterization and compute the contour integral.  Enter the function  f[z] = (z^2).

Remove[t, u, U, v, V, w, W, 
        z]; 
Clear[f, U1, U2, V1, V2, W1, W2, z1, z2]; 
f[z_]  =  (z^2) ; 
z1[t_]  =  2  t  +  1  +  I t; 
w[t_]  =  ComplexExpand[f[z1[t]] z1'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
Print["           f[z] = ", f[z]]; 
Print[""]; 
\(\(Print[\*""          \!\(z\_1\)[t] = "", z1[t]];\)\ \)
\(\(Print[\*""       f[\!\(z\_1\)[t]] = "", 
        f[z1[t]]];\)\ \)
\(\(Print[\*""         \!\(z\_1\)'[t] = "", \(z1'\)[
          t]];\)\ \)
Print[""]; 
\(\(Print[\*""f[\!\(z\_1\)[t]] \!\(z\_1\)'[t] = "", 
        w[t]];\)\ \)
Print[""]; 
Print["           u[t] = ", u[t]]; 
Print["           v[t] = ", v[t]];

Method (i).  The integral can be computed using the real and imaginary parts.

U1  = (∫_(-1)^1) u[
              t] \[DifferentialD]t; 
V1  = (∫_(-1)^1) v[t] \[DifferentialD]t; 
W1  =  U1  +  I V1; 
U[t_]  =  ∫u[t] \[DifferentialD]t; 
V[
          t_]  =  ∫v[
              t] \[DifferentialD]t; 
reint  =  ∫u[
              t] \[DifferentialD]t; 
imint  =  ∫v[
              t] \[DifferentialD]t; 
P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
Print["u[t] = ", u[t]]; 
Print["v[t] = ", v[t]]; 
Print["∫u[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]\[DifferentialD]t = ", reint, " + \[ImaginaryI] (", 
        imint, ")"]; 
Print[""]; 
Print["U[t] = ", U[t], ",     V[t] = ", V[t]]; 
Print["U[1] = ", U[1], ",     V[1] = ", V[1]]; 
Print["U[-1] = ", U[-1], ",   V[-1] = ", 
        V[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = U[1]-U[-1] + I(V[1]-V[-1])""];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        U[1] - U[\(-1\)], " + I (", 
        V[1] - V[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I (∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        W1];\)\ \)
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Method (ii).  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W1  = (∫_(-1)^1) w[
              t] \[DifferentialD]t; 
P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
Print["w[t] = ", w[t]]; 
Print[""]; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        ComplexExpand[W[t]]]; 
Print["W[1] = ", W[1], ",  W[-1] = ", 
        W[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = W[1]-W[-1] = "", W[1], " - (", W[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = "", W1];\)\ \)
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Solution for Extra Example (i) Page 214 part (b)

(b)  Use the portion of a parabola connecting the points  (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i,  set up the parameterization and compute the contour integral.

z2[t_]  =  
        (t^2)  +  2  t  +  I t; 
w[t_]  =  ComplexExpand[f[z2[t]] z2'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
\(\(Print[\*""          \!\(z\_2\)[t] = "", z2[t]];\)\ \)
\(\(Print[\*""       f[\!\(z\_2\)[t]] = "", 
        f[z2[t]]];\)\ \)
\(\(Print[\*""         \!\(z\_2\)'[t] = "", \(z2'\)[
          t]];\)\ \)
\(\(Print[\*""f[\!\(z\_2\)[t]] \!\(z\_2\)'[t] = "", 
        w[t]];\)\ \)
Print["           u[t] = ", u[t]]; 
Print["           v[t] = ", v[t]];

Method (i).  The integral can be computed using the real and imaginary parts.

U2  = (∫_(-1)^1) u[
              t] \[DifferentialD]t; 
V2  = (∫_(-1)^1) v[t] \[DifferentialD]t; 
W2  =  U2  +  I V2; 
U[t_]  =  ∫u[t] \[DifferentialD]t; 
V[
          t_]  =  ∫v[
              t] \[DifferentialD]t; 
reint  =  ∫u[
              t] \[DifferentialD]t; 
imint  =  ∫v[
              t] \[DifferentialD]t; 
P2[t_] = 
        ComplexExpand[{Re[z2[t]], Im[z2[t]]}]; 
Print["u[t] = ", u[t]]; 
Print["v[t] = ", v[t]]; 
Print["∫u[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]\[DifferentialD]t = ", reint, " + \[ImaginaryI] (", 
        imint, ")"]; 
Print[""]; 
Print["U[t] = ", U[t], ",     V[t] = ", V[t]]; 
Print["U[1] = ", U[1], ",     V[1] = ", V[1]]; 
Print["U[-1] = ", U[-1], ",   V[-1] = ", 
        V[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = U[1]-U[-1] + I(V[1]-V[-1])""];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        U[1] - U[\(-1\)], " + I (", 
        V[1] - V[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I (∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        W2];\)\ \)
ParametricPlot[Evaluate[P2[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Green]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
\(\(Print[\*""C: \!\(z\_2\)[t] = "", 
        z2[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Method (ii).  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W2  = (∫_(-1)^1) w[
              t] \[DifferentialD]t; 
P2[t_] = 
        ComplexExpand[{Re[z2[t]], Im[z2[t]]}]; 
Print["w[t] = ", w[t]]; 
Print[""]; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        ComplexExpand[W[t]]]; 
Print["W[1] = ", W[1], ",  W[-1] = ", 
        W[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = W[1]-W[-1] = "", W[1], " - (", W[\(-1\)], ")"];\)\ \)
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
ParametricPlot[Evaluate[P2[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Green]; 
\(\(Print[\*""(∫_C) (z^2) \[DifferentialD]z = "", W2];\)\ \)
\(\(Print[\*""C: \!\(z\_2\)[t] = "", 
        z2[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Which is the same as the value along the other path because  f (z) = (z^2)  is an analytic function

P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Extra Example (ii) for Page 214.  Evaluate the contour integrals  of  \(f \((z)\) = \(\(\ \)\(z\)\)\&_\)  starting at the points   (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i.  
(a) Use the line segment joining the points.  (b) Use a portion of a parabola joining the points.
Remark.  This example illustrates the situation when f(z) is not analytic.

Solution for Extra Example (ii) Page 214 part (a)

(a)  Use the straight line segment connecting the points  (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i,  set up the parameterization and compute the contour integral.  Enter the function  \(f \((z)\) = \(\(\ \)\(z\)\)\&_\).

Remove[t, u, U, v, V, w, W, 
        z]; 
Clear[f, U1, U2, V1, V2, W1, W2, z1, z2]; 
f[z_]  =  Conjugate[z]; 
TagSet[t, Im[t], 0]; 
z1[t_]  =  2  t  +  1  +  I t; 
w[t_]  =  ComplexExpand[f[z1[t]] z1'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
Print["           f[z] = ", f[z]]; 
Print["        f[x+\[ImaginaryI]y] = ", 
        ComplexExpand[
          f[x + I y]]]; 
Print[""]; 
\(\(Print[\*""          \!\(z\_1\)[t] = "", z1[t]];\)\ \)
\(\(Print[\*""       f[\!\(z\_1\)[t]] = "", 
        ComplexExpand[\ f[z1[t]]\ ]];\)\ \)
\(\(Print[\*""         \!\(z\_1\)'[t] = "", \(z1'\)[
          t]];\)\ \)
Print[""]; 
\(\(Print[\*""f[\!\(z\_1\)[t]] \!\(z\_1\)'[t] = "", 
        w[t]];\)\ \)
Print[""]; 
Print["           u[t] = ", u[t]]; 
Print["           v[t] = ", v[t]];

Method (i).  The integral can be computed using the real and imaginary parts.

U1  = (∫_(-1)^1) u[
              t] \[DifferentialD]t; 
V1  = (∫_(-1)^1) v[t] \[DifferentialD]t; 
W1  =  U1  +  I V1; 
U[t_]  =  ∫u[t] \[DifferentialD]t; 
V[
          t_]  =  ∫v[
              t] \[DifferentialD]t; 
reint  =  ∫u[
              t] \[DifferentialD]t; 
imint  =  ∫v[
              t] \[DifferentialD]t; 
P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
Print["u[t] = ", u[t]]; 
Print["v[t] = ", v[t]]; 
Print["∫u[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]\[DifferentialD]t = ", reint, " + \[ImaginaryI] (", 
        imint, ")"]; 
Print[""]; 
Print["U[t] = ", U[t], ",     V[t] = ", V[t]]; 
Print["U[1] = ", U[1], ",     V[1] = ", V[1]]; 
Print["U[-1] = ", U[-1], ",   V[-1] = ", 
        V[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = U[1]-U[-1] + I(V[1]-V[-1])""];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        U[1] - U[\(-1\)], " + I (", 
        V[1] - V[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I (∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        W1];\)\ \)
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Method (ii).  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W1  = (∫_(-1)^1) w[
              t] \[DifferentialD]t; 
P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
Print["w[t] = ", w[t]]; 
Print[""]; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        ComplexExpand[W[t]]]; 
Print["W[1] = ", W[1], ",  W[-1] = ", 
        W[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = W[1]-W[-1] = "", W[1], " - (", W[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = "", W1];\)\ \)
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Solution for Extra Example (ii) Page 214 part (b)

(b)  Use the portion of a parabola connecting the points  (Subscript[z, 1]) = -1 - i  and  (Subscript[z, 2]) = 3 + i,  set up the parameterization and compute the contour integral.

TagSet[t, Im[t], 0]; 
z2[t_]  =  (t^2)  +  2  t  +  I t; 
w[t_]  =  ComplexExpand[f[z2[t]] z2'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
\(\(Print[\*""          \!\(z\_2\)[t] = "", z2[t]];\)\ \)
\(\(Print[\*""       f[\!\(z\_2\)[t]] = "", 
        ComplexExpand[\ f[z2[t]]\ ]];\)\ \)
\(\(Print[\*""         \!\(z\_2\)'[t] = "", \(z2'\)[
          t]];\)\ \)
\(\(Print[\*""f[\!\(z\_2\)[t]] \!\(z\_2\)'[t] = "", 
        w[t]];\)\ \)
Print["           u[t] = ", u[t]]; 
Print["           v[t] = ", v[t]];

Method (i).  The integral can be computed using the real and imaginary parts.

U2  = (∫_(-1)^1) u[
              t] \[DifferentialD]t; 
V2  = (∫_(-1)^1) v[t] \[DifferentialD]t; 
W2  =  U2  +  I V2; 
U[t_]  =  ∫u[t] \[DifferentialD]t; 
V[
          t_]  =  ∫v[
              t] \[DifferentialD]t; 
reint  =  ∫u[
              t] \[DifferentialD]t; 
imint  =  ∫v[
              t] \[DifferentialD]t; 
P2[t_] = 
        ComplexExpand[{Re[z2[t]], Im[z2[t]]}]; 
Print["u[t] = ", u[t]]; 
Print["v[t] = ", v[t]]; 
Print["∫u[t]\[DifferentialD]t + \[ImaginaryI] \
∫v[t]\[DifferentialD]t = ", reint, " + \[ImaginaryI] (", 
        imint, ")"]; 
Print[""]; 
Print["U[t] = ", U[t], ",     V[t] = ", V[t]]; 
Print["U[1] = ", U[1], ",     V[1] = ", V[1]]; 
Print["U[-1] = ", U[-1], ",   V[-1] = ", 
        V[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = U[1]-U[-1] + I(V[1]-V[-1])""];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I(∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        U[1] - U[\(-1\)], " + I (", 
        V[1] - V[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)u[t]\[DifferentialD]t + I (∫_(-1)^1)v[t]\[DifferentialD]t = "", 
        W2];\)\ \)
ParametricPlot[Evaluate[P2[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Green]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
\(\(Print[\*""C: \!\(z\_2\)[t] = "", 
        z2[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Method (ii).  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W2  = (∫_(-1)^1) w[
              t] \[DifferentialD]t; 
P2[t_] = 
        ComplexExpand[{Re[z2[t]], Im[z2[t]]}]; 
Print["w[t] = ", w[t]]; 
Print[""]; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        ComplexExpand[W[t]]]; 
Print["W[1] = ", W[1], ",  W[-1] = ", 
        W[-1]]; 
Print[""]; 
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = W[1]-W[-1] = "", W[1], " - (", W[\(-1\)], ")"];\)\ \)
\(\(Print[\*""(∫_(-1)^1)w[t]\[DifferentialD]t = "", W2];\)\ \)
ParametricPlot[Evaluate[P2[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Green]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
\(\(Print[\*""C: \!\(z\_2\)[t] = "", 
        z2[t], ",  for  -1 ≤ t ≤ 1."];\)\ \)

Which is different from the value for the straight line path because  \(f \((z)\) = \(\(\ \)\(z\)\)\&_\)  is not an analytic function.

P1[t_] = 
        ComplexExpand[{Re[z1[t]], Im[z1[t]]}]; 
ParametricPlot[Evaluate[P1[t]], {t, -1, 1}, 
        PlotRange -> {{-1, 3}, {-1, 1}}, 
        AspectRatio -> (2/3), 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_C\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""C: \!\(z\_1\)[t] = "", 
        z1[t], "c  for  -1 ≤ t ≤ 1."];\)\ \)

Example 6.10,  Page 215.  (a)   Show that  \(∫\_\(C\_1\)\ \(\(\ \)\(z\)\)\&_\ dz = \(-π\)\ i\)  where  (Subscript[C, 1])  is the semicircular path from -1 to 1 in the upper half plane.  (b)  Show that  \(∫\_\(C\_2\)\ \(\(\ \)\(z\)\)\&_\ dz = \(-4\)\ i\)  where  (Subscript[C, 2])  is the polygonal path from -1 to -1+i to 1+i to 1.

Solution 6.10 (a)

(a)  Use the semicircular path from -1 to 1 in the upper half plane,  set up the parameterization and compute the contour integral.  Enter the function  \(f \((z)\) = \(\(\ \)\(z\)\)\&_\).

Clear[f, t, u, v, w, W, W1, z]; 
f[z_]  =  Conjugate[z]; 
Print["   f[z] = ", f[z]]; 
Print["f[x+\[ImaginaryI]y] = ", 
        ComplexExpand[
          f[x + I y]]]; 
TagSet[t, Im[t], 0]; 
z[
          t_]  =   - 
            Cos[t]  +  I Sin[t]; 
w[t_]  =  ComplexExpand[f[z[t]] z'[t]]; 
u[t_]  =  ComplexExpand[Re[w[t]]]; 
v[t_]  =  ComplexExpand[Im[w[t]]]; 
Print["   f[z] = ", f[z]]; 
Print["f[x+\[ImaginaryI]y] = ", 
        ComplexExpand[
          f[x + I y]]]; 
Print[""]; 
Print["   z[t] = ", z[t]]; 
Print["f[z[t]] = ", ComplexExpand[f[z[t]]]]; 
Print["  z'[t] = ", z'[t]]; 
Print[""]; 
Print["w[t] = f[z[t]] z'[t] = ", w[t]]; 
w[t_]  =  Simplify[w[t]]; 
Print["w[t] = f[z[t]] z'[t] = ", 
        w[t]];

Method.  The integral can be computed using a complex integrand.

W[
          t_]  = ∫w[t] \[DifferentialD]t; 
W1  = (∫_0^π) w[t] \[DifferentialD]t; 
Print["W[t] = ∫w[t]\[DifferentialD]t = ", 
        W[t]]; 
Print["W[π] = ", W[π], ",  W[0] = ", 
        W[0]]; 
Print[""]; 
\(\(Print[\*""(∫_0^π)w[t]\[DifferentialD]t = W[π]-W[0] = "", W[π] - W[0]];\)\ \)
\(\(Print[\*""(∫_0^π)w[t]\[DifferentialD]t = "", W1];\)\ \)
V[t_] = ComplexExpand[{Re[z[t]], Im[z[t]]}]; 
ParametricPlot[Evaluate[V[t]], {t, 0, π}, 
        PlotRange -> {{-1, 1}, {0, 1}}, AspectRatio -> (1/2), 
        Ticks -> {Range[-1, 1, 1], Range[0, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_\(C\_1\)\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""\!\(C\_1\): z[t] = "", 
        z[t], ",  for  0 ≤ t ≤ π."];\)\ \)

Solution 6.10 (b)

(b)  Use the polygonal path from -1 to -1+i to 1+i to 1,  set up the parameterization and compute the contour integral. First, find a parameterization of the polygonal path  (Subscript[C, 1])  from -1 to 1 consisting of the three line segments:
Line segment 1 from -1 to -1+i,
Line segment 2 from -1+i to 1+i,
Line segment 3 from 1+i to 1.

Clear[t, V1, V2, V3, x0, x1, y0, y1, z1, Z, 
        Z1]; 
z0  =  - 1; 
z1  =  - 1  +  I; 
x0  =  Re[z0];  y0  =  Im[z0];  x1  =  Re[z1];  
    y1  =  Im[z1]; 
Z1[t_]  =  
        x0  +  (x1 - x0) 
            t  +  I (y0  +  (y1 - y0) 
                  t); 
z0  =  - 1  +  I; 
z1  =  1  +  I; 
x0  =  Re[z0];  y0  =  Im[z0];  x1  =  Re[z1];  
    y1  =  Im[z1]; 
Z2[t_]  =  
        x0  +  (x1 - x0) 
            t  +  I (y0  +  (y1 - y0) 
                  t); 
z0  =  1  +  I; 
z1  =  1; 
x0  =  Re[z0];  y0  =  Im[z0];  x1  =  Re[z1];  
    y1  =  Im[z1]; 
Z3[t_]  =  
        x0  +  (x1 - x0) 
            t  +  I (y0  +  (y1 - y0) 
                  t); 
\(\(Print[\*""\!\(Z\_1\)[t] = "", Z1[t]];\)\ \)
\(\(Print[\*""\!\(Z\_2\)[t] = "", Z2[t]];\)\ \)
\(\(Print[\*""\!\(Z\_3\)[t] = "", 
        Z3[t]];\)\ \)

Method.  The integral can be computed using a three complex integrands.

Wset  =  {f[Z1[t]] Z1'[t], 
          f[Z2[t]] Z2'[t], f[Z3[t]] Z3'[t]}; 
funset  =  MapAll[ComplexExpand, Wset]; 
Wint  = ∫funset \[DifferentialD]t; 
val  = (∫_0^1) funset \[DifferentialD]t; 
val2  = ReplaceAll[val , List -> Plus]; 
\(\(Print[\*""{(Subscript[w, 1])[t],(Subscript[w, 2])[t],(Subscript[w, 3])[t]}""]\ ;\)\ \)
\(\(Print[\*""= {f[(Subscript[Z, 1])[t]](Subscript[Z, 1])'[t],f[(Subscript[Z, 2])[t]](Subscript[Z, 2])'[t],f[(Subscript[Z, 3])[t]](Subscript[Z, 3])'[t]}""];\)\ \)
Print["= ", funset]; 
Print[" "]; 
\(\(Print[\*""∫{(Subscript[w, 1])[t],(Subscript[w, 2])[t],(Subscript[w, 3])[t]}\[DifferentialD]t = ""\ , Wint];\)\ \)
Print[" "]; 
\(\(Print[\*""(∫_0^1){(Subscript[w, 1])[t],(Subscript[w, 2])[t],(Subscript[w, 3])[t]}\[DifferentialD]t = "", val];\)\ \)
Print[" "]; 
\(\(Print[\*""(∫_0^1)w[t]\[DifferentialD]t =(∫_0^1)(Subscript[w, 1])[t]\[DifferentialD]t +(∫_0^1)(Subscript[w, 2])[t]\[DifferentialD]t +(∫_0^1)(Subscript[w, 3])[t]\[DifferentialD]t""];\)\ \)
\(\(Print[\*""(∫_0^1)w[t]\[DifferentialD]t = ("", 
        val\_\(\([[\)\(1\)\(]]\)\), ") + (", val\_\(\([[\)\(2\)\(]]\)\), ") + (", val\_\(\([[\)\(3\)\(]]\)\), ")"];\)\ \)
\(\(Print[\*""\!\(∫\_0\%1\)w[t]\[DifferentialD]t = "", 
        val2];\)\ \)
V1[t_] = ComplexExpand[{Re[Z1[t]], Im[Z1[t]]}]; 
V2[t_] = ComplexExpand[{Re[Z2[t]], Im[Z2[t]]}]; 
V3[t_] = ComplexExpand[{Re[Z3[t]], Im[Z3[t]]}]; 
ParametricPlot[Evaluate[{V1[t], V2[t], V3[t]}], {t, 0, 1}, 
        Ticks -> {Range[-1, 3, 1], Range[-1, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> {Red, Blue, Green}]; 
\(\(Print[\*""\!\(∫\_\(C\_2\)\) "", 
        f[z], "\[DifferentialD]z = ", W2];\)\ \)
\(\(Print[\*""\!\(C\_2\): \!\(Z\_1\)[t] = "", 
        Z1[t], ",      for  0 ≤ t ≤ 1."];\)\ \)
\(\(Print[\*""    \!\(Z\_2\)[t] = "", 
        Z2[t], ", for  0 ≤ t ≤ 1."];\)\ \)
\(\(Print[\*""    \!\(Z\_3\)[t] = "", 
        Z3[t], ",  for  0 ≤ t ≤ 1."];\)\ \)

Which is different from the value for the other path because  \(f \((z)\) = \(\(\ \)\(z\)\)\&_\)  is not an analytic function.

V[t_] = 
        ComplexExpand[{Re[z[t]], Im[z[t]]}]; 
ParametricPlot[Evaluate[V[t]], {t, 0, π}, 
        PlotRange -> {{-1, 1}, {0, 1}}, AspectRatio -> (1/2), 
        Ticks -> {Range[-1, 1, 1], Range[0, 1, 1]}, 
        AxesLabel -> {"x", "y"}, 
        PlotStyle -> Magenta]; 
\(\(Print[\*""\!\(∫\_\(C\_1\)\) "", 
        f[z], "\[DifferentialD]z = ", W1];\)\ \)
\(\(Print[\*""\!\(C\_1\): z[t] = "", 
        z[t], ",  for  0 ≤ t ≤ π."];\)\ \)

We now give a few important inequalities relating to complex integrals.

Theorem 6.2 (Integral Triangle Inequality),  Page 217.  If  f (t) = u (t) + i v (t) is a continuous function of the real parameter  t, then  

			\(\(\(|\)\(∫\_a\%b 
            f \((t)\) dt\)\(|\)\(\ \)\(\(≤\)\(\ \)\(∫\_a\%b\)\)\(\ \)\(|\)\(f \((t)\)\)\(|\)\(dt\)\)\).

Proof of Theorem 6.2, see text Page 217.

Theorem 6.2 (ML - Inequality),  Page 218.  If  f (z) = u (x, y) + i v (x, y) is continuous on the contour  C, then  

			\(∫\_C\ \(\(|\)\(f \((z)\)\)\(|\)\(\ \)\(dz\  ≤ \ M\ L\)\)\).

Proof of Theorem 6.3, see text Page 218.

Example 6.11,  Page 218.  Use the ML Inequality to show that  \(\(\(|\)\(∫\_C\ 
          1\/\(z\^2\  + \ 1\)\ dz\)\(|\)\(\(≤\)\(1\/\(2 \@ 5\)\)\)\)\).  
Solution.  The solution is given in the textbook.

Library Research Experience for Undergraduates

Project I. Write a report on contour integrals.

1. Baker, I. N., and P. J. Rippon (1985), ''A Note on Complex Iteration (in The Teaching of Math.),'' Am. Math. M., Vol. 92, No. 7. (Aug. - Sep., 1985), pp. 501-504, Jstor.   

2. Boas, Mary L. and R. P. Boas ''Simplification of Some Contour Integrations (in The Teaching of Math.),'' Am. Math. M., Vol. 92, No. 3, (Mar., 1985), pp. 212-213, Jstor.   

3. Firey, William J., ''Line Integrals of Exact Differentials (in Classroom Notes),'' Am. Math. M., Vol. 68, No. 1. (Jan., 1961), pp. 57-59, Jstor.   

4. Glaister, P., (1991), ''A Method for Determining Some Integrals,'' Math. and Comp. Ed., V. 25, No. 1, pp. 31-32.

5. Gluchoff, Alan, ''A Simple Interpretation of the Complex Contour Integral (in The Teaching of Math.),'' Am. Math. M., Vol. 98, No. 7. (Aug. - Sep., 1991), pp. 641-644, Jstor.   

6. Braden, Bart, (1987), ''Polya's Geometric Picture of Complex Contour Integrals, Math. Mag., V. 60, No. 5, pp. 321-327.

7. Sachdeva, Baldev K. and Bertram Ross''Evaluation of Certain Real Integrals by Contour Integration (in Notes),'' Am. Math. M., Vol. 89, No. 4. (Apr., 1982), pp. 246-249, Jstor.   

8. Trahan, Donald H., (1965)''A New Approach to Integration for Functions of a Complex Variable'',. Math. Mag., Vol. 38, pp. 132-140.

9. Zimmerberg, H. J., ''Independence of Path for Line Integrals (in Classroom Notes),'' Am. Math. M., Vol. 66, No. 4. (Apr., 1959), pp. 303-306., Jstor.

Section 6.2  Exercises for Contours and Contour Integrals
See textbook page 219.

Section 6.3	The Cauchy-Goursat Theorem

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