Youngstown State University
College of Engineering & Technology
This session deals with the evaluation improper integrals using the Residue theorem and complex path integrals.
Trigonometric Integrals via Contour Integrals
8.2 Trigonometric Integrals
As indicated at the beginning of this chapter, we can evaluate certain definite real integrals with the aid of the residue theorem. One way to do this is by interpreting the definite integral as the parametric form of an integral of an analytic function along a simple closed contour.
Suppose we wish to evaluate an integral of the
form
(8-3)
,
where F(u,v) is a function of
the two real variables u and v. Consider the unit circle
with
parametrization
, for
;
which gives us the following symbolic differentials.
, and
(8-4)
.
Combining
with
, we can
obtain
(8-5)
and
.
Using the substitutions for
,
, and
in Expression (8-3) transforms the definite integral into a contour
integral
,
where the new integrand is
.
Suppose that f(z)
is analytic inside and on the unit circle
, except at the
points
that lie
interior to
. Then the
residue theorem gives
(8-6)
.
The situation is illustrated in Figure 8.2.

Figure
8.2 The change of variables from a definite integral on
to a contour integral around
C.
Some of these problems can be solved using Mathematica's table of integrals.
We need to use the following substitution procedure.
Example 8.10. Evaluate
by using complex
analysis.
![[Graphics:Images/IntegralsTrigMod_gr_23.gif]](session9_files/image023.gif)
Solution. Using Substitutions (8-4)
and (8-5), we transform the integral
to
![]()
where
. The
singularities of f(z) are poles
located at the points where
or equivalently,
where
. Using the
quadratic formula, we see that the singular points satisfy the
relation
which implies
that
or
. Hence the only
singularities that lie inside the unit circle are simple poles corresponding to
the solutions of
, which are the
two points
and
. We use Theorem
8.2 and L'Hôpital's rule to get the residues at
and
:
As
and
, the residues
are given by
. We now use
Equation (8-6) to compute the value of the
integral:
Maxima solution
/*example problem no. 1 */
I:'integrate((1/(1+3*(cos(t))^3)),t,0,2*%pi);
f1:1/(1+3*((cos(t))^2));
f2:ev(f1,cos(3*t)=(z^3+1/z^3)/2,cos(t)=(z+1/z)/2)/(%i*z);
f3:ratsimp(f2);
f4:factor(f3);
res1:residue(f4,z,%i/sqrt(3));
res2:residue(f4,z,-%i/sqrt(3));
answer1:2*%pi*%i*(res1+res2);
answer2:ev(I,integrate);
Example 8.11. Evaluate
by using a
computer algebra system.
Example 8.12. Evaluate
.
![[Graphics:Images/IntegralsTrigMod_gr_106.gif]](session9_files/image043.gif)
Solution. For values of z
that lie on the unit circle
, we have
and ![]()
We solve for
to obtain the
substitutions
and
.
Using the identity for
along with Substitutions (8-4) and (8-5), we
rewrite the integral as
![[Graphics:Images/IntegralsTrigMod_gr_114.gif]](session9_files/image050.gif)
where
. The
singularities of
lying inside
are poles located at the
points
and
. We use Theorem
8.2 to get the residues:
Therefore we conclude that
Maxima Solution
/* example problem no. 2 */
I1:'integrate(cos(2*t)/(5-4*cos(t)),t,0,2*%pi);
f1:cos(2*t)/(5-4*cos(t));
f2:ev(f1,cos(2*t)=(z^2+1/z^2)/2,cos(t)=(z+1/z)/2)/(%i*z);
f3:ratsimp(f2);
f4:factor(f3);
res1:residue(f4,z,0);
res2:residue(f4,z,0.5);
answer1:2*%pi*%i*(res1+res2);
answer2:ev(I1,integrate);

Improper Integrals of Rational Functions
8.3 Improper Integrals of Rational Functions
An important application of the theory of residues
is the evaluation of certain types of improper integrals. Let f(x) be a continuous function of the
real variable x on the
interval
. Recall from
calculus that the improper integral of f(x)
over [
) is defined
by
,
provided that the limit exists. If f(x) is
defined for all real x, then the
integral of f(x) over
is defined by
(8-7)
,
provided both limits exist. If the integral in Equation (8-7) exists, we can obtain its value by taking a
single limit:
(8-8)
.
For some functions the limit on the right side of Equation (8-8) exists, but the limit on the right side of
Equation (8-7) doesn't exist.
Example 8.13.
,
but Equation (8-7) tells us that the improper
integral of
over
doesn't
exist, because the calculation
is
undefined .
Therefore we can use Equation (8-8) to extend
the notion of the value of an improper integral, as Definition 8.2
indicates.
![[Graphics:Images/IntegralsRationalMod_gr_11.gif]](session9_files/image068.gif)
Definition 8.2 (Cauchy Principal Value - P.V.). Let f(x) be a continuous real valued function for all x. The Cauchy principal value (P.V.) of the
integral
is defined
by
,
provided the limit exists
Example 8.13 shows that
.
Example 8.14. Find
the Cauchy principal value of
.
![[Graphics:Images/IntegralsRationalMod_gr_30.gif]](session9_files/image073.gif)
Solution.
If
, where P(x) and Q(x) are polynomials, then f(x)
is called a rational function. Techniques in calculus were developed
to integrate rational functions. We now show how the Residue Theorem
can be used to obtain the Cauchy
principal value of the integral of f(x)
over
.
Theorem 8.3 (Contour
Integration for Rational Functions). Let
where P(x) and Q(x) are polynomials, of degree m and n ,
respectively. If
for all real x and
, then the
Cauchy Principal Value (P.V.) of the integral is
.
where
are the
poles of
that lie in
the upper half plane. The situation is illustrated in Figure
8.4.

Figure
8.4 The poles
of
that lie in
the upper half-plane.
Example 8.15. Evaluate
.
![[Graphics:Images/IntegralsRationalMod_gr_62.gif]](session9_files/image085.gif)
Solution. We write the integrand as
. We see that
f(z) has simple poles at the
points
and
, and that
the points
and
, are the
only singularities of f(z) in
the upper half-plane. Computing the residues, we obtain
Using Theorem 8.3, we conclude that
Maxima Solution
/* improper integral rational functions
example no. 1 */
I:'integrate(1/((x^2+1)*(x^2+4)),x,-inf,inf);
f1:1/((z^2+1)*(z^2+4));
res1:residue(f1,z,%i);
res2:residue(f1,z,2*%i);
answer1:2*%pi*%i*(res1+res2);
answer2:ev(I,integrate);

Example 8.16. Evaluate
.
![[Graphics:Images/IntegralsRationalMod_gr_87.gif]](session9_files/image096.gif)
Solution. The integrand
has a poles
of order 3 at the points
, and
is the only
singularity of f(z) in the upper
half-plane. Computing the residue at
, we get
Therefore
.
Maxima Solution
/* improper integral rational functions
example no. 2 */
I:'integrate(1/(x^2+4)^3,x,-inf,inf);
f1:1/((z^2+4)^3);
res1:residue(f1,z,2*%i);
answer1:2*%pi*%i*(res1);
answer2:ev(I,integrate);

Maxima Example where limits of integration are from 0 to Inf
Example

Maxima Solution
/* improper integral rational functions
example no. 3 */
I:'integrate((2*x^2-1)/(x^4+5*x^2+4),x,0,inf);
f1:(2*z^2-1)/((z^4+5*z^2+4));
f2:factor(f1);
res1:residue(f2,z,%i);
res2:residue(f2,z,2*%i);
answer1:%pi*%i*(res1+res2);
answer2:ev(I,integrate);

Improper Integrals Involving Trigonometric Functions
8.4 Improper Integrals Involving Trigonometric Functions
Let P(x)
and Q(x) be polynomials of
degree m and n, respectively, where
. We can
show (but omit the proof) that if
for all
real x, then
and
are convergent improper integrals. You may encounter integrals of
this type 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 Theorem 8.4
wouldn't hold if we were to use
and
are used
instead of
, as you will see
when you get to Lemma 8.1.
Theorem 8.4 (Contour
Integration for Improper Trig. Integrals). Let
P(x) and Q(x) be polynomials with real coefficients, of degree m and n,
respectively, where
and
for all
real x
. If
and
(8-12)
, then
(8-13)
, and
(8-14)
,
where
are the
poles of f(z) that lie in the
upper half plane and
and
are the
real and imaginary parts of
, respectively.

Figure
8.4 The poles
of
or
that lie
in the upper half-plane.
Example 8.17. Evaluate
.
![[Graphics:Images/IntegralsTrigImproperMod_gr_25.gif]](session9_files/image123.gif)
Solution. The function f(z)
in Equation (8-12) is
, which
has a simple pole at the point
in the
upper half-plane. Calculating the residue yields
Using Equation (8-14) gives
Maxima Solution
I:'integrate(x*sin(x)/(x^2+4),x,-inf,inf);
f1:z*exp(%i*z)/(z^2+4);
allroots(denom(f1));
res1:realpart(residue(z*exp(%i*z)/(z^2+4),z,2*%i));
I1:2*%pi*(res1);
answer1:float(I1);
answer2:float(ev(I,integrate));

Example 8.18. Evaluate
.
![[Graphics:Images/IntegralsTrigImproperMod_gr_51.gif]](session9_files/image130.gif)
Solution. The function f(z)
in Equation (8-12) is
, which
has simple poles at the points
and
in the
upper half-plane. We get the residues with the aid of L'Hôpital's
rule:
Similarly,
![[Graphics:Images/IntegralsTrigImproperMod_gr_56.gif]](session9_files/image135.gif)
Using Equation (8-13), we get
Maxima Solution
I:'integrate(cos(x)/(x^4+4),x,-inf,inf);
f1:exp(%i*z)/(z^4+4);
allroots(denom(f1));
res1:imagpart(residue(exp(%i*z)/(z^4+4),z,1+%i));
res2:imagpart(residue(exp(%i*z)/(z^4+4),z,-1+%i));
I1:-2*%pi*(res1+res2);
ratsimp(I1);
answer1:float(I1);
answer2:float(ev(I,integrate));

References
http://math.fullerton.edu/mathews/c2003/IntegralsTrigMod.html
http://math.fullerton.edu/mathews/c2003/IntegralsRationalMod.html
http://math.fullerton.edu/mathews/c2003/IntegralsTrigImproperMod.html