Youngstown State University

College of Engineering & Technology

Civil & Environmental/Chemical Engineering Program

ENGR6924: Computer Based Tools for Engineers

 

 

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)            [Graphics:Images/IntegralsTrigMod_gr_1.gif],    

where F(u,v) is a function of the two real variables u and v.  Consider the unit circle [Graphics:Images/IntegralsTrigMod_gr_2.gif]with parametrization  

            [Graphics:Images/IntegralsTrigMod_gr_3.gif],    for    [Graphics:Images/IntegralsTrigMod_gr_4.gif];   

which gives us the following symbolic differentials.

            [Graphics:Images/IntegralsTrigMod_gr_5.gif],    and   
(8-4)
            [Graphics:Images/IntegralsTrigMod_gr_6.gif].  

Combining   [Graphics:Images/IntegralsTrigMod_gr_7.gif]   with   [Graphics:Images/IntegralsTrigMod_gr_8.gif],   we can obtain  

(8-5)            [Graphics:Images/IntegralsTrigMod_gr_9.gif]    and    [Graphics:Images/IntegralsTrigMod_gr_10.gif].  

Using the substitutions for  [Graphics:Images/IntegralsTrigMod_gr_11.gif],  [Graphics:Images/IntegralsTrigMod_gr_12.gif] , and  [Graphics:Images/IntegralsTrigMod_gr_13.gif]  in Expression (8-3) transforms the definite integral into a contour integral

            [Graphics:Images/IntegralsTrigMod_gr_14.gif],  

where the new integrand is  [Graphics:Images/IntegralsTrigMod_gr_15.gif].  

    Suppose that f(z) is analytic inside and on the unit circle [Graphics:Images/IntegralsTrigMod_gr_16.gif], except at the points  [Graphics:Images/IntegralsTrigMod_gr_17.gif]  that lie interior to  [Graphics:Images/IntegralsTrigMod_gr_18.gif].  Then the residue theorem gives

(8-6)            [Graphics:Images/IntegralsTrigMod_gr_19.gif].  

The situation is illustrated in Figure 8.2.

Figure 8.2  The change of variables from a definite integral on [Graphics:Images/IntegralsTrigMod_gr_20.gif]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.

[Graphics:Images/IntegralsTrigMod_gr_21.gif]

Example 8.10.    Evaluate  [Graphics:Images/IntegralsTrigMod_gr_22.gif]  by using complex analysis.  

[Graphics:Images/IntegralsTrigMod_gr_23.gif]

Solution.  Using Substitutions (8-4) and (8-5), we transform the integral to  

            [Graphics:Images/IntegralsTrigMod_gr_24.gif]

where  [Graphics:Images/IntegralsTrigMod_gr_25.gif].  The singularities of f(z) are poles located at the points where  [Graphics:Images/IntegralsTrigMod_gr_26.gif]  or equivalently, where  [Graphics:Images/IntegralsTrigMod_gr_27.gif].  Using the quadratic formula, we see that the singular points satisfy the relation  [Graphics:Images/IntegralsTrigMod_gr_28.gif]  which implies that  [Graphics:Images/IntegralsTrigMod_gr_29.gif]  or  [Graphics:Images/IntegralsTrigMod_gr_30.gif].  Hence the only singularities that lie inside the unit circle are simple poles corresponding to the solutions of  [Graphics:Images/IntegralsTrigMod_gr_31.gif],  which are the two points  [Graphics:Images/IntegralsTrigMod_gr_32.gif]  and  [Graphics:Images/IntegralsTrigMod_gr_33.gif].  We use Theorem 8.2 and L'Hôpital's rule to get the residues at [Graphics:Images/IntegralsTrigMod_gr_34.gif]and [Graphics:Images/IntegralsTrigMod_gr_35.gif]:  

            [Graphics:Images/IntegralsTrigMod_gr_36.gif]   


As  [Graphics:Images/IntegralsTrigMod_gr_37.gif]  and  [Graphics:Images/IntegralsTrigMod_gr_38.gif],  the residues are given by  [Graphics:Images/IntegralsTrigMod_gr_39.gif].  We now use Equation (8-6) to compute the value of the integral:

            [Graphics:Images/IntegralsTrigMod_gr_40.gif]   

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  [Graphics:Images/IntegralsTrigMod_gr_56.gif]  by using a computer algebra system.  

 

Example 8.12.    Evaluate  [Graphics:Images/IntegralsTrigMod_gr_105.gif].  

[Graphics:Images/IntegralsTrigMod_gr_106.gif]

Solution.  For values of z that lie on the unit circle [Graphics:Images/IntegralsTrigMod_gr_107.gif], we have

            [Graphics:Images/IntegralsTrigMod_gr_108.gif]   and   [Graphics:Images/IntegralsTrigMod_gr_109.gif]

We solve for  [Graphics:Images/IntegralsTrigMod_gr_110.gif]  to obtain the substitutions  

            [Graphics:Images/IntegralsTrigMod_gr_111.gif]    and    [Graphics:Images/IntegralsTrigMod_gr_112.gif].  

Using the identity for [Graphics:Images/IntegralsTrigMod_gr_113.gif]along with Substitutions (8-4) and (8-5), we rewrite the integral as  


            [Graphics:Images/IntegralsTrigMod_gr_114.gif]

where  [Graphics:Images/IntegralsTrigMod_gr_115.gif].  The singularities of [Graphics:Images/IntegralsTrigMod_gr_116.gif]lying inside [Graphics:Images/IntegralsTrigMod_gr_117.gif]are poles located at the points [Graphics:Images/IntegralsTrigMod_gr_118.gif]and [Graphics:Images/IntegralsTrigMod_gr_119.gif].  We use Theorem 8.2 to get the residues:

            [Graphics:Images/IntegralsTrigMod_gr_120.gif]    
        
            [Graphics:Images/IntegralsTrigMod_gr_121.gif]   

Therefore we conclude that  

            [Graphics:Images/IntegralsTrigMod_gr_122.gif]    

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  [Graphics:Images/IntegralsRationalMod_gr_1.gif].  Recall from calculus that the improper integral of f(x) over  [[Graphics:Images/IntegralsRationalMod_gr_2.gif])  is defined by

            [Graphics:Images/IntegralsRationalMod_gr_3.gif],  
    
provided that the limit exists.  If f(x)  is defined for all real x, then the integral of f(x) over [Graphics:Images/IntegralsRationalMod_gr_4.gif]is defined by

(8-7)            [Graphics:Images/IntegralsRationalMod_gr_5.gif],  

provided both limits exist.  If the integral in Equation (8-7) exists, we can obtain its value by taking a single limit:

(8-8)            [Graphics:Images/IntegralsRationalMod_gr_6.gif].  

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.  [Graphics:Images/IntegralsRationalMod_gr_7.gif],  

but Equation (8-7) tells us that the improper integral of  [Graphics:Images/IntegralsRationalMod_gr_8.gif]  over [Graphics:Images/IntegralsRationalMod_gr_9.gif]  doesn't exist, because the calculation  

            [Graphics:Images/IntegralsRationalMod_gr_10.gif]    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]

 

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  [Graphics:Images/IntegralsRationalMod_gr_26.gif]  is defined by



            [Graphics:Images/IntegralsRationalMod_gr_27.gif],  

provided the limit exists

 Example 8.13 shows that    [Graphics:Images/IntegralsRationalMod_gr_28.gif].  

 Example 8.14.  Find the Cauchy principal value of    [Graphics:Images/IntegralsRationalMod_gr_29.gif].

[Graphics:Images/IntegralsRationalMod_gr_30.gif]

Solution.  
        [Graphics:Images/IntegralsRationalMod_gr_31.gif]   

    If  [Graphics:Images/IntegralsRationalMod_gr_51.gif],  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  [Graphics:Images/IntegralsRationalMod_gr_52.gif].  

 Theorem 8.3 (Contour Integration for Rational Functions).  Let  [Graphics:Images/IntegralsRationalMod_gr_53.gif]  where P(x) and Q(x) are polynomials, of degree m and n , respectively.  If [Graphics:Images/IntegralsRationalMod_gr_54.gif]for all real x and  [Graphics:Images/IntegralsRationalMod_gr_55.gif],  then the Cauchy Principal Value (P.V.) of the integral is

            [Graphics:Images/IntegralsRationalMod_gr_56.gif].  

where  [Graphics:Images/IntegralsRationalMod_gr_57.gif]  are the poles of  [Graphics:Images/IntegralsRationalMod_gr_58.gif]  that lie in the upper half plane.   The situation is illustrated in Figure 8.4.  

Figure 8.4  The poles  [Graphics:Images/IntegralsRationalMod_gr_59.gif]  of  [Graphics:Images/IntegralsRationalMod_gr_60.gif]  that lie in the upper half-plane.

Example 8.15.  Evaluate  [Graphics:Images/IntegralsRationalMod_gr_61.gif].  

[Graphics:Images/IntegralsRationalMod_gr_62.gif]

Solution.  We write the integrand as  [Graphics:Images/IntegralsRationalMod_gr_63.gif].  We see that f(z) has simple poles at the points [Graphics:Images/IntegralsRationalMod_gr_64.gif]and [Graphics:Images/IntegralsRationalMod_gr_65.gif],  and that the points  [Graphics:Images/IntegralsRationalMod_gr_66.gif]  and  [Graphics:Images/IntegralsRationalMod_gr_67.gif],  are the only singularities of f(z) in the upper half-plane.  Computing the residues, we obtain  

            [Graphics:Images/IntegralsRationalMod_gr_68.gif]  

            [Graphics:Images/IntegralsRationalMod_gr_69.gif]   

Using Theorem 8.3, we conclude that  

            [Graphics:Images/IntegralsRationalMod_gr_70.gif]  

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_86.gif].  

[Graphics:Images/IntegralsRationalMod_gr_87.gif]

Solution.  The integrand  [Graphics:Images/IntegralsRationalMod_gr_88.gif]  has a poles of order 3 at the points [Graphics:Images/IntegralsRationalMod_gr_89.gif], and  [Graphics:Images/IntegralsRationalMod_gr_90.gif]  is the only singularity of f(z) in the upper half-plane.  Computing the residue at   [Graphics:Images/IntegralsRationalMod_gr_91.gif], we get  

            [Graphics:Images/IntegralsRationalMod_gr_92.gif]   

Therefore

            [Graphics:Images/IntegralsRationalMod_gr_93.gif].  

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  [Graphics:Images/IntegralsTrigImproperMod_gr_1.gif].  We can show (but omit the proof) that if  [Graphics:Images/IntegralsTrigImproperMod_gr_2.gif]  for all real x, then  

            [Graphics:Images/IntegralsTrigImproperMod_gr_3.gif]    and    [Graphics:Images/IntegralsTrigImproperMod_gr_4.gif]  

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

            [Graphics:Images/IntegralsTrigImproperMod_gr_5.gif]    and    [Graphics:Images/IntegralsTrigImproperMod_gr_6.gif]  

where  [Graphics:Images/IntegralsTrigImproperMod_gr_7.gif]  is a positive real number.  The crucial step in the proof of Theorem 8.4 wouldn't hold if we were to use  [Graphics:Images/IntegralsTrigImproperMod_gr_8.gif]  and  [Graphics:Images/IntegralsTrigImproperMod_gr_9.gif]  are used instead of  [Graphics:Images/IntegralsTrigImproperMod_gr_10.gif], 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  [Graphics:Images/IntegralsTrigImproperMod_gr_11.gif]  and  [Graphics:Images/IntegralsTrigImproperMod_gr_12.gif]  for all real x .  If  [Graphics:Images/IntegralsTrigImproperMod_gr_13.gif]  and  

(8-12)            [Graphics:Images/IntegralsTrigImproperMod_gr_14.gif],    then

(8-13)            [Graphics:Images/IntegralsTrigImproperMod_gr_15.gif],    and  
    
(8-14)            [Graphics:Images/IntegralsTrigImproperMod_gr_16.gif],
  
where  [Graphics:Images/IntegralsTrigImproperMod_gr_17.gif]  are the poles of f(z) that lie in the upper half plane and  [Graphics:Images/IntegralsTrigImproperMod_gr_18.gif]  and  [Graphics:Images/IntegralsTrigImproperMod_gr_19.gif]  are the real and imaginary parts of  [Graphics:Images/IntegralsTrigImproperMod_gr_20.gif],  respectively.  

Figure 8.4  The poles  [Graphics:Images/IntegralsTrigImproperMod_gr_21.gif]  of   [Graphics:Images/IntegralsTrigImproperMod_gr_22.gif]  or   [Graphics:Images/IntegralsTrigImproperMod_gr_23.gif]  that lie in the upper half-plane.

  

Example 8.17.  Evaluate    [Graphics:Images/IntegralsTrigImproperMod_gr_24.gif].  

[Graphics:Images/IntegralsTrigImproperMod_gr_25.gif]

Solution.  The function f(z) in Equation (8-12) is  [Graphics:Images/IntegralsTrigImproperMod_gr_26.gif],  which has a simple pole at the point  [Graphics:Images/IntegralsTrigImproperMod_gr_27.gif]  in the upper half-plane.  Calculating the residue yields

            [Graphics:Images/IntegralsTrigImproperMod_gr_28.gif]   

Using Equation (8-14) gives

            [Graphics:Images/IntegralsTrigImproperMod_gr_29.gif]  

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_50.gif].  

[Graphics:Images/IntegralsTrigImproperMod_gr_51.gif]

Solution.  The function f(z) in Equation (8-12) is  [Graphics:Images/IntegralsTrigImproperMod_gr_52.gif],  which has simple poles at the points  [Graphics:Images/IntegralsTrigImproperMod_gr_53.gif]  and  [Graphics:Images/IntegralsTrigImproperMod_gr_54.gif]  in the upper half-plane.  We get the residues with the aid of L'Hôpital's rule:  

            [Graphics:Images/IntegralsTrigImproperMod_gr_55.gif]  

Similarly,

            [Graphics:Images/IntegralsTrigImproperMod_gr_56.gif]

Using Equation (8-13), we get  

           [Graphics:Images/IntegralsTrigImproperMod_gr_57.gif]  

 

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