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 8 RESIDUE
THEORY
Section 8.5 Improper Integrals
Involving Trigonometric Functions
Let
and
be polynomials of degree
and
, respectively, where
. We can show (but omit the proof)
that if
for all real
, then
and
are convergent improper integrals.
Integrals of this type are sometimes encountered in the study of
Fourier transforms and Fourier integrals. We now show how to evaluate
them.
Particularly important is our use of the identities
and
, where
is a positive real number.
The crucial step in the proof of
our next theorem will not hold if
and
are used instead of
, as you will see when we get to
Jordan's Lemma.
Theorem 8.4
Let
and
be polynomials, of degree
and
, where
and
for all real
.
If
and
, then
P. V.
, and
P. V.
,
where
,
, ...,
are the poles of
that lie in the upper half plane.
Load Maple's "residue"
procedure.
Make sure this is done only ONCE during a Maple session.
> readlib(residue):
Example 8.17, Page
329. Use the residue
calculus to evaluate the integral:
.
> f:='f': F:='F':
z:='z':
F0 := z -> z*sin(z)/(z^2 + 4):
f := z -> z*exp(I*z)/(z^2 + 4):
`F(z) ` = F0(z);
`f(z) ` = f(z);

Find the singularities of
.
> Zn :=
sort([solve(denom(f(z))=0, z)]):
`For f(z) ` = f(z);
`The singularities are:`;
z1 := subs(z=Zn[1],z): z[1] = z1;
z2 := subs(z=Zn[2],z): z[2] = z2;
![]()
![]()
![]()
Which poles lie in the upper half
plane?
> print(`0
<`,Im(z[1]),` `, Im(z1)>0,
evalb(evalf(Im(z1))>0));
print(`0 <`,Im(z[2]),` `, Im(z2)>0,
evalb(evalf(Im(z2))>0));
![]()
Remark. Sometimes Maple will form the list of values in a different order.
It is always necessary to visually inspect the above results before proceeding.
Compute the residue at
.
> r1 := residue(f(z), z=z1): `Res[f`,z1,`] ` = r1;
The value of the integral is
computed by the residue calculus:
> `F(x)` =
F0(x);
val := 2*Pi*Re(r1):
print(int(F(x),x=-infinity..infinity) = val);

Remark. The integral for this
problem is g(x).
It involves a complex component which does NOT seem to cancel
out.
Taking the real part gives the correct real answer.
> g := z ->
subs(Z=z,int(Z*sin(Z)/(Z^2 + 4),Z)):
`F(x) ` = F0(x);
`G(x) = `, int(F(x),x) = g(x);
`G(oo) - G(-oo)` = g(infinity) - g(-infinity);
`G(oo) - G(-oo)` = simplify(g(infinity) - g(-infinity));
v := int(x*sin(x)/(x^2 + 4),x=-infinity..infinity):
print(int(F(x),x=-infinity..infinity) = v);
print(Re(int(F(x),x=-infinity..infinity)) = v);
print(Re(int(F(x),x=-infinity..infinity)) = evalf(v));
print(`Unfortunately this answer is wrong !`);
![]()
![]()
![]()



![]()
The latter method does NOT agree with the answer obtained via residues.
> `F(x)` =
F0(x);
val := 2*Pi*Re(r1):
print(int(F(x),x=-infinity..infinity) = val);
print(int(F(x),x=-infinity..infinity) = evalf(val));
print(`This answer obtained with residues is correct
!`);


![]()
Example 8.18, Page
329. Use the residue
calculus to evaluate the integral:
.
> f:='f': F:='F':
z:='z':
F0 := z -> cos(z)/(z^4 + 4):
f := z -> exp(I*z)/(z^4 + 4):
`F(z) ` = F0(z);
`f(z) ` = f(z);

Find the singularities of
.
> Zn :=
sort([solve(denom(f(z))=0, z)]):
`For f(z) ` = f(z);
`The singularities are:`;
z1 := subs(z=Zn[1],z): z[1] = z1;
z2 := subs(z=Zn[2],z): z[2] = z2;
z3 := subs(z=Zn[3],z): z[3] = z3;
z4 := subs(z=Zn[4],z): z[4] = z4;
![]()
![]()
![]()
![]()
![]()
Which poles lie in the upper half
plane?
> print(`0
<`,Im(z[1]),` `, Im(z1)>0,
evalb(evalf(Im(z1))>0));
print(`0 <`,Im(z[2]),` `, Im(z2)>0,
evalb(evalf(Im(z2))>0));
print(`0 <`,Im(z[3]),` `, Im(z3)>0,
evalb(evalf(Im(z3))>0));
print(`0 <`,Im(z[4]),` `, Im(z4)>0,
evalb(evalf(Im(z4))>0));
![]()
![]()
![]()
Remark. Sometimes Maple will form the list of values in a different order.
It is always necessary to visually inspect the above results before proceeding.
Compute the residues at
and
.
> r2 :=
residue(f(z), z=z2): `Res[f`,z2,`] ` = r2;
r3 := residue(f(z), z=z3): `Res[f`,z3,`] ` =
r3;
![]()
The value of the integral is
computed by the residue calculus:
> `F(x)` =
F0(x);
val := -2*Pi*(Im(r2)+Im(r3)):
print(int(F(x),x=-infinity..infinity) = val);
val := factor(-2*Pi*(Im(r2)+Im(r3))):
print(int(F(x),x=-infinity..infinity) = val);



Remark. The integral for this
problem is g(x), but it CANNOT be used in any meaningful way
to solve the problem at hand.
> g := z ->
subs(Z=z,int(cos(Z)/(Z^4 + 4),Z)):
`G(x) ` = cos(x)/(x^4 + 4);
`G(x) = `, int(F(x),x) = g(x);
`G(oo) - G(-oo)` = g(infinity) - g(-infinity);
`G(oo) - G(-oo)` = simplify(g(infinity) - g(-infinity));
v := int(cos(x)/(x^4 + 4),x=-infinity..infinity):
print(int(F(x),x=-infinity..infinity) = v);
print(Re(int(F(x),x=-infinity..infinity)) = evalf(evalc(Re(v))));
print(`Unfortunately this answer is wrong !`);
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()

![]()
![]()
Which does NOT agree with the
answer obtained via residues.
> `F(x)` =
F0(x);
val := -2*Pi*(Im(r2)+Im(r3)):
print(int(F(x),x=-infinity..infinity) = val);
val := factor(-2*Pi*(Im(r2)+Im(r3))):
print(int(F(x),x=-infinity..infinity) = val);
val := evalf(-2*Pi*(Im(r2)+Im(r3))):
print(int(F(x),x=-infinity..infinity) = val);
print(`This answer obtained with residues is correct
!`);



![]()
Lemma 8.1 (Jordan's
lemma)
Suppose
and
are polynomials of degreee
and
, respectively, where
.
If
is the upper semicircle
, for
, then
.
End of Section 8.5.