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 4  SEQUENCES, JULIA and MANDELBROT SETS, and POWER SERIES

c = q = S = t = x = y = z = 
                    0; 
Clear[a, absZn, c, cx, cy, dot, i, juliaC, k, lim, limX, limY, limZ, 
        list, mandelbrotC, n, newton, Pn, q, Qn, R, s, S, Sn, set, sum, sumN, 
        sumX, sumY, sumZ, t, table, x, Xn, y, Yn, z, Z, 
        Zn]; 
Needs["Graphics`ComplexMap`"]; 
Needs["Graphics`Colors`"];

Section 4.1	Sequences and Series

Section 4.2	Julia and Mandelbrot Sets

Section 4.3	Geometric Series and Convergence Theorems

Section 4.4  Power Series Functions

Suppose that we have a series (∑_(n = 0)^∞) (Subscript[ξ, n])  where (Subscript[ξ, n]) = (Subscript[c, n]) (((z - α))^n).  If α and the collection of (Subscript[c, n]) are fixed complex numbers, we will get different series by selecting different values for z. For example, if α = 2 and (Subscript[c, n]) = (1/(n!)) for all n, we get the series (∑_(n = 0)^∞) 
              (1/(n!)) ((((i/2) - 2))^n) if z = (i/2) and (∑_(n = 0)^∞) 
              (1/(n!)) (((2 + i))^n) if z = 4 + i. Note that when  α = 0 and (Subscript[c, n]) = 1 for all n, we get a geometric series. The collection of points for which the series (∑_(n = 0)^∞) (Subscript[c, n]) (((z - α))^n) converges will be the domain of a function f (z) = (∑_(n = 0)^∞) 
                (Subscript[c, n]) (((z - α))^n), which we call a power series function. Technically, this series is undefined if  z = α and n=0, since (0^0) is undefined. We get around this difficulty by stipulating that the series (∑_(n = 0)^∞) (Subscript[c, n]) (((z - α))^n) is really compact notation for (Subscript[c, 0]) + (∑_(n = 1)^∞) 
                (Subscript[c, n]) (((z - α))^n). In this section we list some results that will be useful in helping us establish properties of functions defined by power series.

Definition (Power Series), Page 151.  The function  f (z) = (∑_(n = 0)^∞) 
                (Subscript[c, n]) (((z - α))^n)  is called a power series, with center  z = α.

Theorem 4.14, Page 151.  Suppose  f (z) = (∑_(n = 0)^∞) 
                (Subscript[c, n]) (((z - α))^n) .  Then the set of points z for which the series converges is one of the following:

(i)  The single point  z = α.  

(ii)  The disk  \(\(D\_ρ\) \((α)\) = {z : \ \(\(|\)\(z - α\)\(|\)\(\(<\)\(\ \)\(ρ\)\)\)}\),  along with part (either none, or some or all) of the circle  \(\(C\_ρ\) \((α)\) = {z : \ \(\(|\)\(z - α\)\(|\)\) = \ \ ρ}\).  

(iii)  The entire complex plane.

Proof of Theorem 4.11, see text Page 151.

Another way to phrase case (ii) of Theorem 4.14 is to say that the power series f (z) = (∑_(n = 0)^∞) 
                (Subscript[c, n]) (((z - α))^n) converges if |z - α|< ρ and diverges if  |z - α|> ρ.   We call the number ρ the radius of convergence of the power series (see Figure 4.2). If we are in case (i) of Theorem 4.11, we say that the radius of convergence is zero, and that the radius of convergence is infinity if we are in case (iii).

Theorem 4.15, Page 153.  For the power series function f (z) = (∑_(n = 0)^∞) 
                (Subscript[c, n]) (((z - α))^n),  we can find  ρ , its radius of convergence, by any of the following methods:

	(i)  Cauchy's Root Test:  \(ρ = 
        1\/\(lim\+\(n -> ∞\)\ \@\(\(|\)\(c\_n\)\(|\)\)\%n\)\)  (Provided that the limit exists.)  

	(ii)  Cauchy-Hadamard Formula:  \(ρ = 
        1\/\(\(lim\ sup\)\+\(n -> ∞\)\ \@\(\(∣\)\(c\_n\)\(∣\)\)\%n\)\)  (The limit superior always exists.)  

	(iii)  d'Alembert's Ratio Test:  \(ρ = 
        lim\+\(n -> ∞\)\ \(\(|\)\(c\_n\/c\_\(n + 1\)\)\(|\)\)\)  (Provided that the limit exists.)
	In cases (i) and (ii) we set  ρ = ∞  if the limit equals  0,  and set  ρ = 0  if the  limit equals  ∞.

Proof of Theorem 4.12, see text Page 153.

Example 4.21,  Page 153.  Find the radius of convergence of  \(f \((z)\) = ∑\+\(n = 0\)\%∞\(\((\(n\  + \ 2\)\/\(3  n\  + \ 1\))\)\^n\) \((z - 4)\)\^n\).

Solution 4.21.

Enter the formula for the coefficients.

Remove[c]; 
Clear[L, n, Pn, R]; 
(Subscript[c, n])_  =  (((((n + 2)/(3  n + 1))))^n); 
(Subscript[p, n])_ = ((((Subscript[c, n])))^(1/n)); 
\(\(Print[\*""\!\(c\_n\) = "", 
        c\_n];\)\ \)
\(\(Print[\*""((∣(Subscript[c, n])∣)^(1/n)) = "", p\_n];\)\ \)
(Subscript[p, n])_ = PowerExpand[(Subscript[p, n])]; 
\(\(Print[\*""((∣(Subscript[c, n])∣)^(1/n)) = "", p\_n];\)\ \)

Use the Cauchy root test and find the limit and then the radius of convergence R.

L  =  
        Limit[ (Subscript[p, n]),  n -> ∞]; 
R  = (( 1)/L); 
\(\(Print[\*""  L = (lim_(n -> ∞)) ((∣(Subscript[c, n])∣)^(1/n)) = "", L];\)\ \)
Print["The limit  is  L = ", L]; 
Print[""]; 
\(\(Print[\*""The radius of convergence is R = \!\(1\/L\) = "", 
        R];\)\ \)

The series  \(f \((z)\) = ∑\+\(n = 0\)\%∞\(\((\(n\  + \ 2\)\/\(3  n\  + \ 1\))\)\^n\) \((z - 4)\)\^n\)  will converge in the disk  |z - 4|<3.  

We can plot some of the partial sums and see that they converge. Convergence will be faster if we choose a smaller disk |z - 4|<r  the following graphs use the smaller disk with  r = 1.

Clear[g, k, m, n, 
        s]; 
s[z_, 
          n_] = (∑_(k = 0)^n)(((((k + 2)/(3  k + 1))))^k) (((z - 4))^k); 
For [m = 3, 
        m ≤ 5, m++, 
g[z_] = 
          s[z + 4, m];  
PolarMap[
          g , {0, 1.0, 0.2}, {0, 
            2  π, (π/12)}, 
PlotRange -> {{0, 
                3}, {-1.5, 1.5}}, 
          AspectRatio -> 
            1, 
Ticks -> {Range[0, 3, 1], 
              Range[-(3/2), (3/2), (1/2)]}, 
          AxesLabel -> {"u", "v"}, 
          PlotStyle -> {Cyan, 
              Blue}];  
Print["s[z,", m, "] = ", 
          s[z, m]];  ];

We see that the series  \(f \((z)\) = ∑\+\(n = 0\)\%∞\(\((\(n\  + \ 2\)\/\(3  n\  + \ 1\))\)\^n\) \((z - 4)\)\^n\)  is converging in the smaller disk  |z - 4|< r   where   r=1 < 3.

Example 4.22,  Page 153.   Find the radius of convergence of  f (z) = 
        1 + 4  z + (5^2) (z^2) + (4^3) (z^3) + (5^4) (z^4) + (4^5) (z^5) + 
            (5^6) (z^6) +  ... .

Solution 4.22.

Enter the formula for the coefficients.  There is a formula for the even subscripts and a different formula for the odd subscripts.

Remove[c]; 
Clear[k, limsup, n, ρ, R]; 
(Subscript[c, even, k_]) = (5^k); 
(Subscript[c, odd, k_]) = (4^k); 
table = 
        Flatten[Table[{(Subscript[c, even, 2  k]), (Subscript[c, odd, 2  k + 1])}, {k, 0, 
              4}]]; 
table = Append[table, "..."]; 
\(\(Print[\*""{\!\(c\_n\)} = "", 
        table];\)\ \)
Print[""]; 
\(\(Print[\*""  \!\(c\_\(2  k\)\) = "", 
        c\_\(even, 2  k\)\ ];\)\ \)
\(\(Print[\*"" \!\(c\_\(2  k + 1\)\) = "", 
        c\_\(odd, 2  k + 1\)];\)\ \)

Use the Cauchy-Hadamard formula and find the radius of convergence R.

lim1 = 
        Limit[((((Subscript[c, even, 2  k])))^((1/(2  k)))), 
          k -> ∞]; 
lim2 = 
        Limit[((((Subscript[c, odd, 2  k + 1])))^((1/(2  k + 1)))), 
          k -> ∞]; 
ρ = Max[lim1, lim2]; 
\(\(Print[\*""   (lim_(k -> ∞)) ((∣(Subscript[c, 2  k])∣)^(1/(2  k))) = "", \*""(lim_(k -> ∞)) "", \((c\_\(even, 2  k\))\)\^\(1\/\(2  k\)\), " = ", lim1];\)\ \)
\(\(Print[\*""(lim_(k -> ∞)) ((∣(Subscript[c, 2  k + 1])∣)^(1/(2  k + 1))) = "", \*""(lim_(k -> ∞)) "", \((c\_\(odd, 2  k + 1\))\)\^\(1\/\(2  k + 1\)\), " = ", lim2];\)\ \)
Print[""]; 
\(\(Print[\*""ρ = (Underscript[limsup, n -> ∞]) ((∣(Subscript[c, n])∣)^(1/n))  = Max["", 
        lim1, ",", lim2, "]"];\)\ \)
\(\(Print[\*""ρ = (Underscript[limsup, n -> ∞]) ((∣(Subscript[c, n])∣)^(1/n))  = "", ρ];\)\ \)
Print[""]; 
\(\(Print[\*""The radius of convergence is R = (1/ρ) = "", 1\/ρ];\)\ \)

The series  f (z) = (∑_(n = 1)^∞) (Subscript[c, n]) (z^n) = 
          1 + 4  z + (5^2) (z^2) + (4^3) (z^3) + 
              (5^4) (z^4) + (4^5) (z^5) + (5^6) (z^6) +  ...   has radius of convergence  (1/5)  by the Cauchy-Hadamard formula because   \(\(lim\ sup\)\+\(n -> ∞\)\ \@\(\(∣\)\(c\_n\)\(∣\)\)\%n\  = 5\).  

We can let Mathematica find the sum of this series.

f0[
          z_] = (∑_(k = 0)^∞) (5^(2 k)) 
            (z^(2 k)); 
f1[
          z_] = (∑_(k = 0)^∞) (4^(2 k + 1)) 
            (z^(2 k + 1)); 
f[z_] = f0[z] + f1[z]; 
\(\(Print[\*""(Subscript[f, 1])[z] = (∑_(k = 0)^∞)\!\(5\^\(2\\ k\)\)\!\(z\^\(2\\ k\)\) = "", 
        f0[z]];\)\ \)
\(\(Print[\*""(Subscript[f, 2])[z] = (∑_(k = 0)^∞)\!\(4\^\(2\\ k + 1\)\)\!\(z\^\(2\\ k + 1\)\) = "", 
        f1[z]];\)\ \)
Print[""]; 
\(\(Print[\*""f[z] = \!\(f\_1\)[z] + \!\(f\_2\)[z]""];\)\ \)
Print["f[z] = ", f[z]];

Thus we see that f[z] is composed of two "infinite geometric series"  (Subscript[f, 1])[z]  and   (Subscript[f, 2])[z], whose radius of convergence are  (Subscript[R, 1])=(1/5)  and   (Subscript[R, 2])=(1/4), respectively. Hence the radius of convergence of f[z] must be R = min {(1/5), (1/4)} = (1/5).  

We can use Mathematica to compute the first few terms in the Maclaurin series for f[z] and compare them with the formula that was given.

s[z_] = 
        Series[f[z], {z, 0, 10}]; 
Print["f[z] = ", f[z]]; 
Print["f[z] = ", s[z]];

We can plot some of the partial sums and see that they converge. Convergence will be faster if we choose a smaller disk |z|<r  the following graphs use the smaller disk with  r = 0.16 < (1/5).

Clear[g, k, m, n]; 
For [m = 3, 
      m ≤ 7, m++, 
g[z_] = 
        Normal[Series[f[z], {z, 0, m}]];  
PolarMap[
        g , {0, 0.16, 0.02}, {0, 
          2  π, (π/12)}, 
PlotRange -> {{0, 
              2.8}, {-1.4, 1.4}}, 
        AspectRatio -> 
          1, 
Ticks -> {Range[0, 3, 1], 
            Range[-1, 1, 1]}, AxesLabel -> {"u", "v"}, 
        PlotStyle -> {DarkGreen, 
            Green}];  
Print["s[z,", m, "] = ", 
        g[z]];  ]
PolarMap[
        f, {0, 0.16, 0.02}, {0, 
          2  π, (π/12)}, 
PlotRange -> {{0, 
              2.8}, {-1.4, 1.4}}, 
        AspectRatio -> 
          1, 
Ticks -> {Range[0, 3, 1], 
            Range[-1, 1, 1]}, AxesLabel -> {"u", "v"}, 
        PlotStyle -> {DarkGreen, Green}]; 
Print["f[z] = ", f[z]];

Example 4.23,  Page 153.  Find the radius of convergence of  f (z)  =  (∑_(n = 0)^∞) ((z^n)/(n!)).

Solution 4.23.

Enter the formula for the coefficients.

Remove[c, q]; 
Clear[L, n, R, z]; 
(Subscript[c, n])_  =  (1/(n!)); 
(Subscript[q, n])_  =  ((Subscript[c, n + 1])/(Subscript[c, n])); 
\(\(Print[\*""    \!\(c\_n\) = "", 
        c\_n];\)\ \)
Print[""]; 
\(\(Print[\*""|\!\(c\_\(n + 1\)\/c\_n\)| = "", q\_n];\)\ \)
(Subscript[q, n])_  =  FullSimplify[(Subscript[q, n])]; 
\(\(Print[\*""|\!\(c\_\(n + 1\)\/c\_n\)| = "", 
        q\_n];\)\ \)

Use d'Alembert's ratio test and find the limit and then the radius of convergence R.

L  =  
        Limit[ (Subscript[q, n]),  n -> ∞]; 
R  =  Limit[ (1/(Subscript[q, n])),  n -> ∞]; 
\(\(Print[\*""  L = (lim_(n -> ∞)) |((Subscript[c, n + 1])/(Subscript[c, n]))| = (lim_(n -> ∞)) ("", q\_n, ") = ", 
        L];\)\ \)
Print[""]; 
Print["The limit  is  L = ", L]; 
Print[""]; 
Print["The radius of convergence is R = " , 
        (1/"L"), " = ", R];

The sum of the series is a well known function.

f[z_]  = (∑_(n = 0)^∞) ((z^n)/(n!)); 
\(Print[\*""f(z) = (∑_(n = 0)^∞)((z^n)/(n!)) = "", f[z]];\) 
Null

We can plot some of the partial sums and see that they converge to f[z].

Clear[g, k, m, n, 
        s]; 
terms[n_] = 
        Table[((z^k)/(k!)), {k, 0, n}]; 
For [m = 3, 
      m ≤ 5, m++, 
g[z_] = 
        ReplaceAll[terms[m], 
          List -> Plus];  
PolarMap[
        g , {0, 1.0, 0.2}, {0, 
          2  π, (π/12)}, 
PlotRange -> {{0, 
              3}, {-1.5, 1.5}}, 
        AspectRatio -> 
          1, 
Ticks -> {Range[0, 3, 1], 
            Range[-(3/2), (3/2), (1/2)]}, 
        AxesLabel -> {"u", "v"}, 
        PlotStyle -> {Cyan, 
            Blue}];  
Print["s[z,", m, "] = ", 
        g[z]];  ]
PolarMap[
        f , {0, 1.0, 0.2}, {0, 
          2  π, (π/12)}, 
PlotRange -> {{0, 
              3}, {-1.5, 1.5}}, 
        AspectRatio -> 
          1, 
Ticks -> {Range[0, 3, 1], 
            Range[-(3/2), (3/2), (1/2)]}, 
        AxesLabel -> {"u", "u"}, 
        PlotStyle -> {Red, Magenta}]; 
Print["f[z] = ", f[z]];

Clear[g, k, m, n, 
        s]; 
terms[n_] = 
        Table[((z^k)/(k!)), {k, 0, n}]; 
For [m = 3, 
      m ≤ 5, m++, 
g[z_] = 
        ReplaceAll[terms[m], 
          List -> Plus];  
CartesianMap[
        g , {-1, 1, 0.2}, {-1, 1, 
          0.2}, 
PlotRange -> {{0, 3}, {-2.5, 
              2.5}}, AspectRatio -> 
          (5/3), 
Ticks -> {Range[0, 3, 1], 
            Range[-2, 2, 1]}, AxesLabel -> {"u", "v"}, 
        PlotStyle -> {Green, 
            DarkGreen}];  
Print["s[z,", 
        m, "] = ", g[z]];  ]
CartesianMap[
        f , {-1, 1, 0.2}, {-1, 1, 
          0.2}, 
PlotRange -> {{0, 3}, {-2.5, 
              2.5}}, AspectRatio -> 
          (5/3), 
Ticks -> {Range[0, 3, 1], 
            Range[-2, 2, 1]}, AxesLabel -> {"u", "u"}, 
        PlotStyle -> {Red, Magenta}]; 
Print["f[z] = ", f[z]];

Theorem 4.16, Page 154.  Suppose the function  f (z) = (∑_(n = 0)^∞) 
                (Subscript[c, n]) (((z - α))^n)  has radius of convergence  ρ > 0.  Then

(i)  f(z) is infinitely differentiable for all z ϵ (Subscript[D, ρ]) (α),  in fact

(ii)  (f^((k))) (z) = (∑_(n = 0)^∞) 
                n (n - 1) ...  (n - k + 
              1) (Subscript[c, n]) (((z - α))^(n - k))  for all k,  and

(iii)  (Subscript[c, n]) = (((f^((n))) (α))/(n!)) is the formula for the coefficient  (Subscript[c, n])  in the series.

Proof of Theorem 4.13, see text Page 154.

Example 4.24,  Page 156.  Show that  f (z) = (∑_(n = 0)^∞)(n + 1) (z^n) = 
          (1/(((1  -  z))^2)).

Solution 4.24.

Use the fact that  S (z) = (∑_(n = 0)^∞) (z^n) = 
          (1/(1  -  z))  and  S' (z) = f (z).

Remove[z]; 
Clear[f, n, s, S]; 
S[z_]   =   (∑_(n = 0)^∞) (z^n); 
\(Print[\*"" S[z] = (∑_(n = 0)^∞)(z^n) = "", S[z]];\) 
Print[""]; 
Print["Differentiate S[z] and obtain"]; 
Print[""]; 
Print["S'[z] = ", S'[z]];

Or sum the infinite series directly.

f[z_]  =  (∑_(n = 0)^∞)(n + 1) (z^n); 
Print["S'[z] = ", S'[z]]; 
\(Print[\*""S'[z] = (∑_(n = 0)^∞)(n+1)(z^n) = "", f[z]\ ];\) 
Print["Also"];  
\(Print[\*""S'[z] = (∑_(n = 1)^∞) (nz^(n - 1)) = "", ∑\+\(n = 1\)\%∞\ 
            n\ z\^\(n - 1\)];\) 
\(Print[\*""S'[z] = (∑_(n = 0)^∞) (nz^(n - 1)) = "", ∑\+\(n = 0\)\%∞\ 
            n\ z\^\(n - 1\)];\)

Example 4.25,  Page 156.  Differentiate the Bessel function  (Subscript[J, 0]) (z)  termwise and get  (Subscript[J, 0])' (z) = - (Subscript[J, 1]) (z).

Solution 4.25.

Look at some of the coefficients of and observe the relationship between the coefficients of  (Subscript[J, 0]) (z),  (Subscript[J, 0])' (z)  and   (Subscript[J, 1]) (z).

J0[z_]  =  
        Series[BesselJ[0, z],  {z, 0, 10}]; 
J1[z_]  =  Series[BesselJ[1, z],  {z, 0, 9}]; 
\(\(Print[\*"" \!\(J\_0\)(z) = "", 
        J0[z]];\)\ \)
Print[""]; 
\(\(Print[\*""\!\(J\_0\)'[z] = "", \(J0'\)[z]];\)\ \)
\(\(Print[\*"" \!\(J\_1\)[z] = "", 
        J1[z]];\)\ \)

We see that  (Subscript[J, 0])' (z) = - (Subscript[J, 1]) (z).

Aside.  What does the Bessel function  (Subscript[J, 0]) (z)  look like ?  Use Mathematica to graph the transformation  w = (Subscript[J, 0]) (z).

J0[z_] = 
        BesselJ[0, z]; 
CartesianMap[
        J0 , {0, 3.6, 0.2}, {-2.0, 2.0, 
          0.2}, 
PlotRange -> {{-1.6, 
              2.4}, {-2, 2}}, 
        AspectRatio -> 
          1, 
Ticks -> {Range[-3, 3, 1], 
            Range[-2, 2, 1]}, AxesLabel -> {"u", "u"}, 
        PlotStyle -> {Red, Magenta}]; 
\(\(Print[\*""\!\(J\_0\)[z] = "", 
        J0[z]];\)\ \)

The rectangle 0 ≤ x ≤ 3.6, -2.2 ≤ 
        y ≤ 2.2  was used because the graph of the real function  y = (Subscript[J, 0])[x]  is decreasing on the interval [0, 3.83171].

Library Research Experience for Undergraduates

Project I. Write a report on power series.

1. Agnew, R. P. and R. P. Boas, ''An Integral Test for Convergence (in Math. Notes),'' Am. Math. M., Vol. 56, No. 10. (Dec., 1949), pp. 677-678, Jstor.   

2. Gluchoff, Alan D., (1993), ''Complex Power Series -- a Vector Field Visualization,'' Math. Mag., V. 66, No. 3, pp. 189-191.

3. Hejhal, D. A., ''On Convergence Properties of Sequences of Analytic Functions,'' Am. Math. M., Vol. 74, No. 10. (Dec., 1967), pp. 1208-1211, Jstor.   

4. Marafino, John and Timothy J. McDevitt, (1995) ''Convergence of Complex Continued Fractions,'' Math. Mag., Vol.68, No 3, pp.202-208.

5. Myers, D. E., ''Definition of Radius of Convergence (in Classroom Notes),'' Am. Math. M., Vol. 74, No. 5. (May, 1967), pp. 586-587., Jstor.   

6. Moppert, K. F., ''On a Property of Complex Power Series (in Math. Notes),'' Am. Math. M., Vol. 64, No. 2. (Feb., 1957), pp. 88-89, Jstor.   

7. Redheffer, Raymond M., ''Reversion of Power Series (in Classroom Notes),'' Am. Math. M., Vol. 69, No. 5. (May, 1962), pp. 423-425, Jstor.   

8. Shisha, O., ''On Sequences of Power Series with Restricted Coefficients (in Classroom Notes) Am. Math. M., Vol. 72, No. 5. (May, 1965), pp. 533-537, Jstor.

Section 4.2  Exercises for Power Series Functions
See textbook page 157.

GO TO  THE  Table of Contents