COMPLEX ANALYSIS: Maple Worksheets, 2001
(c) John H. Mathews Russell W. Howell
mathews@fullerton.edu howell@westmont.edu

Complimentary software to accompany the textbook:

COMPLEX ANALYSIS: for Mathematics & Engineering, 4th Ed, 2001, ISBN: 0-7637-1425-9
Jones and Bartlett Publishers, Inc., 40 Tall Pine Drive, Sudbury, MA 01776
Tele. (800) 832-0034; FAX: (508) 443-8000, E-mail: mkt@jbpub.com, http://www.jbpub.com/


CHAPTER 5 ELEMENTARY FUNCTIONS

Section 5.4 Trigonometric and Hyperbolic Functions

Given the success we had in using power series to define the complex exponential, we have reason to believe this approach will be fruitful for other elementary functions as well. The power series expansions for the real-valued sine and cosine functions are

 

sin(x) = Sum((-1)^n/(2*n+1)!*x^(2*n+1),n = 0 .. inf... and cos(x) = Sum((-1)^n/(2*n)!*x^(2*n),n = 0 .. infinit... .

 

Load Maple's "conformal mapping" procedure.
Make sure this is done only ONCE during a Maple session.

> with(plots):

 

Warning, the name changecoords has been redefined

 

Thus it is natural to make the following definitions for the complex sine and cosine.

 

Definition 5.5, Page 182. The series for cos(z) is: cos(z) = sum((-1)^n*z^(2*n)/(2*n)!,n = 0 .. infinit... .

> f:='f': F:='F': p:='p': P:='P': z:='z': Z:='Z':
f := z -> cos(z):
F := series(f(Z), Z=0, 12):
P := convert(F, polynom):
p := z -> subs(Z=z, P):
`f(z) ` = f(z);
`f(Z) ` = F;
`p(z) ` = p(z);

`f(z) ` = cos(z)

`f(Z) ` = series(1-1/2*Z^2+1/24*Z^4-1/720*Z^6+1/403...

`p(z) ` = 1-1/2*z^2+1/24*z^4-1/720*z^6+1/40320*z^8-...

 

The general term for the series for cos(z) is:

> a:='a': n:='n': S:='S': z:='z':
a := n -> (-1)^n*z^(2*n)/(2*n)!:
`f(z) = cos(z)`;
`An ` = a(n);
`The sum of five terms:`;
S5 := sum(a(n), n=0..4):
`S5(z) ` = S5;
`The sum of infinitely many terms:`;
S := sum(a(n), n=0..infinity):
`S(z) = `, Sum(a(n), n=0..infinity) = S;

`f(z) = cos(z)`

`An ` = (-1)^n*z^(2*n)/(2*n)!

`The sum of five terms:`

`S5(z) ` = 1-1/2*z^2+1/24*z^4-1/720*z^6+1/40320*z^8...

`The sum of infinitely many terms:`

`S(z)  =  `, Sum((-1)^n*z^(2*n)/(2*n)!,n = 0 .. inf...

 

Definition 5.5, Page 182. The series for sin(z) is: sin(z) = sum((-1)^n*z^(2*n+1)/(2*n+1)!,n = 0 .. inf... .

> g:='g': G:='G': q:='q': Q:='Q': z:='z': Z:='Z':
g := z -> sin(z):
G := series(g(Z), Z=0, 11):
Q := convert(G, polynom):
q := z -> subs(Z=z, Q):
`g(z) ` = g(z);
`g(Z) ` = G;
`q(z) ` = q(z);

`g(z) ` = sin(z)

`g(Z) ` = series(1*Z-1/6*Z^3+1/120*Z^5-1/5040*Z^7+1...

`q(z) ` = z-1/6*z^3+1/120*z^5-1/5040*z^7+1/362880*z...

 

The general term for the series for sin(z) is:

> b:='b': n:='n': S:='S': z:='z':
b := n -> (-1)^n*z^(2*n+1)/(2*n+1)!:
`f(z) = sin(z)`;
`Bn ` = b(n);
`The sum of five terms:`;
S5 := sum(b(n), n=0..4):
`S5(z) ` = S5;
`The sum of infinitely many terms:`;
S := sum(b(n), n=0..infinity):
`S(z) = `, Sum(b(n), n=0..infinity) = S;

`f(z) = sin(z)`

`Bn ` = (-1)^n*z^(2*n+1)/(2*n+1)!

`The sum of five terms:`

`S5(z) ` = z-1/6*z^3+1/120*z^5-1/5040*z^7+1/362880*...

`The sum of infinitely many terms:`

`S(z)  =  `, Sum((-1)^n*z^(2*n+1)/(2*n+1)!,n = 0 .....

 

 

Theorem 5.4 The functions sin(z) and cos(z) are entire functions, with the properties

 

diff(sin(z),z) = cos(z) and diff(cos(z),z) = -sin(z) .

 

Properties of the trigonometric functions. The derivative of cos(z) is -sin(z) .

> `f(z) ` = f(z);
`f '(z) ` = diff(f(z), z);
`p '(z) ` = diff(p(z), z);
`-q'(z) ` = -q(z);
`-g(z) ` = -g(z);
`f '(z) = -g(z)`;

`f(z) ` = cos(z)

`f '(z) ` = -sin(z)

`p '(z) ` = -z+1/6*z^3-1/120*z^5+1/5040*z^7-1/36288...

`-q'(z) ` = -z+1/6*z^3-1/120*z^5+1/5040*z^7-1/36288...

`-g(z) ` = -sin(z)

`f '(z) = -g(z)`

 

Remark. In order to demonstrate that the derivative of sin(z) is cos(z) ,
it is necessary to adjust the length of the
sin(z) series.

> g:='g': G:='G': q:='q': Q:='Q': z:='z':
g := z -> sin(z):
G := series(g(Z), Z=0, 11):
Q := convert(G, polynom):
q := z -> subs(Z=z, Q):
f:='f': F:='F': p:='p': P:='P': z:='z':
f := z -> cos(z):
F := series(f(Z), Z=0, 10):
P := convert(F, polynom):
p := z -> subs(Z=z, P):
`g(z) ` = g(z);
`g '(z) ` = diff(g(z), z);
`q '(z) ` = diff(q(z), z);
`p(z) ` = p(z);
`f(z) ` = f(z);
`g '(z) = f(z)`;

`g(z) ` = sin(z)

`g '(z) ` = cos(z)

`q '(z) ` = 1-1/2*z^2+1/24*z^4-1/720*z^6+1/40320*z^...

`p(z) ` = 1-1/2*z^2+1/24*z^4-1/720*z^6+1/40320*z^8

`f(z) ` = cos(z)

`g '(z) = f(z)`

 

 

To establish additional properties, it will be useful to express sin(z) and cos(z) in the cartesian form u+i*v . (Additionally, the applications in Chapters 9 and 10 will use these formulas.) We begin by observing that

 

exp(-i*z) = cos(z)+i*sin(z) and exp(-i*z) = cos(z)-i*sin(z)

 

which are then used to obtain

 

sin(z) = 1/(2*i) ( exp(i*z)-exp(-i*z) )

= 1/(2*i) ( exp(i*(x+i*y))-exp(-i*(x+i*y)) )

= 1/(2*i) ( exp(-y)*(cos(x)+i*sin(x))-exp(-y)*(cos(x)-i*sin(x))... )

 

from which we conclude that

 

sin(z) = sin(x)*cosh(y)+i*cos(x)*sinh(y) .

 

In an similar fashion it can be shown that

 

cos(z) = cos(x)*cosh(y)-i*sin(x)*sinh(y) .

 

 

Figure 5.7, Page 187. Graph the transformation w = sin(z) .

> f:='f': z:='z':
f := z -> sin(z):
`f(z) ` = f(z);
conformal(f(z), z=-Pi/2-I*2..Pi/2+I*2,
title=`w = sin(z)`,
grid=[9,9],numxy=[9,9],
scaling=constrained,
labels=[` u`,`v `],
view=[-4..4,-4..4]);

`f(z) ` = sin(z)

[Maple Plot]

 


Example for Page 186. Verify that cos(z) = 0 , if and only if z = (n+1/2)*pi for n an integer.

> x:='x': y:='y':
cos(x + I*y) = `0 `;
evalc(cos(x + I*y)) = `0 `;
`Solve the equations:`;
eqns := {cos(x)*cosh(y) = 0, -sin(x)*sinh(y) = 0}: eqns;
solset := solve(eqns ,{x,y}): solset;

cos(x+I*y) = `0 `

cos(x)*cosh(y)-I*sin(x)*sinh(y) = `0 `

`Solve the equations:`

{-sin(x)*sinh(y) = 0, cos(x)*cosh(y) = 0}

{x = 0, y = 1/2*I*Pi}, {y = 0, x = -1/2*Pi}, {x = 1...

 

Remark. It is assumed that both x and y are real numbers. Hence, of the four solutions, the only valid
solutions are
x = pi/2 , y = 0 and x = -pi/2 , y = 0 . The other solutions are obtained by adding n*pi to this result.

> cos(-pi/2) = cos(-Pi/2);
cos(pi/2) = cos(Pi/2);
cos(pi/2+pi) = cos(Pi/2+Pi);
cos(pi/2+2*pi) = cos(Pi/2+2*Pi);
cos(pi/2+3*pi) = cos(Pi/2+3*Pi);

cos(1/2*pi) = 0

cos(1/2*pi) = 0

cos(3/2*pi) = 0

cos(5/2*pi) = 0

cos(7/2*pi) = 0

 

Or showing that the system of equations is satisfied.

> eqns;
eval(subs({x=Pi/2, y=0},eqns));
eval(subs({x=Pi/2+Pi, y=0},eqns));
eval(subs({x=Pi/2+2*Pi,y=0},eqns));
eval(subs({x=Pi/2+3*Pi,y=0},eqns));

{-sin(x)*sinh(y) = 0, cos(x)*cosh(y) = 0}

{0 = 0}

{0 = 0}

{0 = 0}

{0 = 0}

 

 

Example for Page 185. Establish the trigonometric identity for complex numbers:
cos(z[1]+z[2]) = cos(z[1])*cos(z[2])-sin(z[1])*sin(... .

> x:='x': y:='y': z:='z':
Z1 := x[1] + I*y[1]:
Z2 := x[2] + I*y[2]:
eq1 := cos(Z1+Z2):
cos(z[1] + z[2]) = eq1;
eq1 := evalc(eq1):
cos(z[1] + z[2]) = eq1;
eq1 := expand(evalc(eq1), trig):
cos(z[1] + z[2]) = eq1; ` `;
eq2 := cos(Z1)*cos(Z2) - sin(Z1)*sin(Z2):
cos(z[1])*cos(z[2]) - sin(z[1])*sin(z[2]) = eq2;
eq2 := evalc(eq2):
cos(z[1])*cos(z[2]) - sin(z[1])*sin(z[2]) = eq2;
eq2 := expand(evalc(eq2)):
cos(z[1])*cos(z[2]) - sin(z[1])*sin(z[2]) = eq2; ` `;
`Does cos(z1 + z1) = cos(z1)cos(z2) - sin(z1)sin(z2) ?`;
evalb(eq1 = eq2);

cos(z[1]+z[2]) = cos(x[1]+I*y[1]+x[2]+I*y[2])

cos(z[1]+z[2]) = cos(x[1]+x[2])*cosh(y[1]+y[2])-I*s...

cos(z[1]+z[2]) = cos(x[1])*cos(x[2])*cosh(y[1])*cos...
cos(z[1]+z[2]) = cos(x[1])*cos(x[2])*cosh(y[1])*cos...
cos(z[1]+z[2]) = cos(x[1])*cos(x[2])*cosh(y[1])*cos...
cos(z[1]+z[2]) = cos(x[1])*cos(x[2])*cosh(y[1])*cos...

` `

cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1]+...

cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...
cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...
cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...

cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...
cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...
cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...
cos(z[1])*cos(z[2])-sin(z[1])*sin(z[2]) = cos(x[1])...

` `

`Does  cos(z1 + z1) = cos(z1)cos(z2) - sin(z1)sin(z...

true

 

Therefore, cos(z[1]+z[2]) = cos(z[1])*cos(z[2])-sin(z[1])*sin(... .


Properties of sin(z) and cos(z) on Page 187.

> `cos(x + I y) ` = evalc(cos(x + I*y)); ` ` ;
`sin(x + I y) ` = evalc(sin(x + I*y)); ` ` ;
`tan(x + I y) ` = evalc(tan(x + I*y)); ` ` ;
`|sin(x + I y)| ` = evalc(abs(sin(x + I*y)));
`|sin(x + I y)| ` = simplify(evalc(abs(sin(x + I*y))));

`cos(x + I y) ` = cos(x)*cosh(y)-I*sin(x)*sinh(y)

` `

`sin(x + I y) ` = sin(x)*cosh(y)+I*cos(x)*sinh(y)

` `

`tan(x + I y) ` = sin(x)*cos(x)/(cos(x)^2+sinh(y)^2...

` `

`|sin(x + I y)| ` = sqrt(sin(x)^2*cosh(y)^2+cos(x)^...

`|sin(x + I y)| ` = sqrt(cosh(y)^2-cos(x)^2)

 

End of Section 5.4.