Residue calculus
The residue calculus is a method of definite integration which relies heavily on Cauchy's residue theorem. The idea is to rewrite a definite integral on the real line as limit of integrals in the complex plane which are, in some sense, easier to compute.
Example
Here is a simple example. Suppose we want to find the integral of from 0 to . We begin by choosing an analytic branch of the logarithm, defined everywhere in except for the line consisting of negative purely imaginary numbers (that is, where is specified to take values in . Now, choose real numbers where and . Then, let be the positively oriented contour consisting of the clockwise upper semicircular arc from to , the directed line segment from to , the anticlockwise semicircular arc from to , and the directed line segment from to (this looks like a rainbow in the complex plane).
The reason we chose this contour is that it necessarily avoids the inevitable singularity of the logarithm at 0, and it includes inside of it, the pole of the function . By Cauchy's residue theorem, we have = times the residue of the pole at . This is easily calculated, and it is equal to Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \pi/4} . Thus, the integral evaluates to Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \pi^2 i/2} .
The idea is to now take Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r\rightarrow 0^+} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle R\rightarrow\infty} . Some easy calculations (left to the reader) show that the integrals along the semicircular arcs vanish, leaving us with only the integrals along the real axes. For Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (0,\infty)} we get back the integral we are trying to calculate Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle I} , and on Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (-\infty,0)} we get (since arg here is equal to Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \pi i} ): Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle I+\pi i\int_{-\infty}^0 dz/(1+z^2)=I+\pi^2 i/2} Thus, plugging everything back in, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 2I+\pi^2 i/2=\pi^2 i/2} , so Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle I=0} .