---
tag: 0476QH9846
kind: concept
name: Evaluation of real integrals by residues
aliases: [real-integrals-by-residues, residue-method-for-real-integrals]
msc: ["30E20"]
sources:
  - url: https://en.wikipedia.org/wiki/Contour_integration
    locator: Using the method of residues
  - url: https://en.wikipedia.org/wiki/Contour_integration
    locator: Example 3a – trigonometric integrals, the general procedure
---

## Summary

The [[residue theorem|032HKYS329]] gives the values of many definite integrals of real functions.
For an integral $\int_0^{2\pi} R(\cos \theta, \sin \theta) \, d\theta$ with $R$ a rational function of two variables, the substitution $z = e^{i\theta}$ changes it into a [[contour integral|00FWNP9TXY]] over the unit circle.
This substitution uses $\cos \theta = \frac{1}{2}(z + z^{-1})$, $\sin \theta = \frac{1}{2i}(z - z^{-1})$ and $d\theta = \frac{dz}{iz}$.
For an integral $\int_{-\infty}^{\infty} f(x) \, dx$, one closes the segment $[-R, R]$ with a semicircle of radius $R$ in the upper half-plane and lets $R \to \infty$.
This method gives the integral when the integral over the semicircle tends to $0$, for example by the [[estimation lemma|0DJMGPN8K9]] or by [[Jordan's lemma|0PNPG2PP9H]].

## Remarks

For example, $\frac{1}{1 + z^2}$ has one pole $i$ in the upper half-plane, with residue $\frac{1}{2i}$, so $\int_{-\infty}^{\infty} \frac{dx}{1 + x^2} = 2\pi i \cdot \frac{1}{2i} = \pi$.
With Jordan's lemma, the same method gives $\int_{-\infty}^{\infty} \frac{e^{itx}}{x^2 + 1} \, dx = \pi e^{-|t|}$ for each real $t$.
When the integrand has a pole on the real axis, the method usually gives a [[Cauchy principal value|0V3RDQV3ZX]].

## Explanations

### L1 human

A hard real integral can become easy when you view the real line as part of a closed curve in the complex plane.
The residue theorem gives the integral over the closed curve from a few residues.
Then you show that the extra part of the curve contributes nothing in the limit.
