Source

Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree

Some hard real integrals become easy when turned into a closed contour integral and solved with Cauchy's integral formula.

Type 1: Trigonometric Integrals over 0 to 2 pi

where is a real rational function of and , finite on the interval.

Substitution

Let . As goes from 0 to , goes once round the unit circle counter-clockwise.

Method

Steps:

  1. Substitute to get
  2. Factorise the denominator and find the poles
  3. Keep only the poles inside the unit circle
  4. Apply the Cauchy integral formula

Worked Example

The roots are . Only is inside . So

Type 2: Improper Integrals of Rational Functions

Conditions

Both conditions must hold:

  • is real, with no common factors, and for every real
  • (so the big semicircle contributes nothing)

E.g. qualifies but does not.

Method

Steps:

  1. Close the real axis with a large semicircle in the upper half plane (UHP)
  2. Find the poles of and keep only those with
  3. Sum the Cauchy formula contributions from those poles
  4. For an even ,

Worked Example

has poles at , and only is in the UHP:

which matches . The same method gives , using the two UHP poles and .

Both types rely on the Cauchy Integral Formula.