Viewing a real integral from the complex plane simplifies many integration problems and allows us to solve some non-elementary integrals as [closed contour integral](Closed%20contour%20integral.md)s on the complex plane. Changing a real function to a complex function is done with a procedure called [analytic continuation](Analytic%20continuation.md), which is often a matter of trivially replacing the real argument $x$ with a complex argument $z$. In order to integrate along the real axis, we can then take contour, $\Gamma_0$ that is a straight line along the real axis (corresponding to the integral in real space), and consider the closed semi-circular arc, $\Gamma_{\pm}$ that can be formed from connecting both ends.

# Integrals over finite limits
# Integrals over all $\mathbb{R}$
## By parameterizing [along a circular contour](Closed%20contour%20integral.md#Closing%20the%20contour%20over%20circular%20path)
We can apply the _closed contour trick_ to integrate a complex function $f(z)$ on a radius $R \rightarrow \infty$ under the condition that
$\lim_{|z|\rightarrow \infty} zf(z) = 0$
where we can parameterize as $z=Re^{i\phi}$ for $\phi \in [-\pi,\pi]$ and $|z|=R$ is the radius within which we integrate. This means that the contour integral along the arc doesn't contribute to the overall [closed contour integral](Closed%20contour%20integral.md) even as its radius approaches $\infty$ meaning that $\int_{\Gamma_{\pm}}dzf(z) = iR\int d\phi e^{i\phi}f(Re^{i\phi})=0$. Thus, here
$\int_{\Gamma_0}dz f(z) = \int_{\Gamma_0}dz f(z) + \int_{\Gamma_\pm}dz f(z) = \oint_{\Gamma}dz f(z)$
A more rigorous version of this condition that can be invoked is [[Jordan's lemma]], which describes the general conditions for which the [[Contour integrals]] over semi-circular arc over the upper half of the complex plane disappears as $R \rightarrow \infty$.
## Using [Cauchy's theorem](Cauchy's%20theorem.md) and the [residue theorem](Residue%20theorem.md)
---
# Proofs and examples
## Example 1
Here we examine multiple approaches for solving the same real integral by extending it to the complex plane. We start by modifying the integrand by first extending it to the complex plane and then taking its [partial fraction decomposition.](Analysis%20(index).md#Partial%20Fraction%20decomposition)
Given the integral $I=\int_{-\infty}^{\infty}dx\frac{x^2-1}{(x^2+1)^2},$ where $x \in \mathbb{R}$, we can view the integrand as being the real component of a complex function, $u(x) = \mbox{Re}(f(z))$. Thus, in place of $x \in \mathbb{R}$ we may write:
$f(z)=\frac{z^2}{(z^2+1)^2}$
And in order to evaluate on the complex plane, we find the complex roots in $f(z)$, and decomposing into partial fractions to obtain:
$f(z)=\frac{z^2}{(z^2+1)^2} = \frac{z^2-1}{(z-i)(z+i)} = \frac{1}{2(z-i)^2}+\frac{1}{2(z+i)^2} =\frac{1}{(z-i)^2}= \frac{1}{(z+i)^2}$
Giving the integral,
$I = \mbox{Re}\bigg(\mbox{lim}_{R \rightarrow \infty}\int_{\Gamma_0} \frac{1}{(z+i)^2}\bigg)$
Below we examine several ways we can evaluate this integral.
### By taking the limit $R\rightarrow \infty$ and integrating directly

Where $R=|z|$ we note that $\lim_{|z|\rightarrow \infty} zf(z) = 0$, meaning that we can extend the radius of the contour to $\infty$ to cover the domain in $\mathbb{R}$ from $-\infty$ to $\infty$ and it won't contribute anything to the contour integral. This can be verified by by parameterizing with $z(\phi)=Re^{i\phi}$ and taking the limit. Thus
$\int_{\Gamma_{+}}dz \frac{1}{(z+i)^2}=0$
Taking the limit in $I = \mbox{Re}\bigg(\mbox{lim}_{R \rightarrow \infty}\int_{\Gamma_0} \frac{1}{(z+i)^2}\bigg)$ notice that this integral disappears as well meaning that $I=0$.
### Using [[Cauchy's theorem]]
Considering [Example 1](Real%20integral%20on%20the%20complex%20plane.md#Example%201), you may also note that if you take $f(z)=\frac{1}{(z+i)^2}$ as the complex integrand, it's clear that the only [[Singularity]] is at $z=-i$, outside of the upper half of the complex plane, meaning that $\oint_{\Gamma}dz \frac{1}{(z+i)^2} = 0$ by Cauchy's Theorem. If we instead chose $f(x)=\mbox{Re}\big(\frac{1}{(z-i)^2}\big)$ we would be able to make a similar argument in reference to the integral along the negatively oriented contour,$\Gamma_-$, on the lower half of the complex plane since in that case the singularity is at $z=+i$.
${}$

### Using [[Cauchy's integral formula]]
Considering [Example 1](Real%20integral%20on%20the%20complex%20plane.md#Example%201), since we got integrand to the form $\frac{g(z)}{(z-1)^{n+1}}$, we can quickly see that $I=0$ by Cauchy's integral formula since $g(z)=1$, and $g'(z)=0$.
### Using the [[Residue theorem]]
Considering [Example 1](Real%20integral%20on%20the%20complex%20plane.md#Example%201), we may notice that $f(z) = \frac{1}{(z-i)^2}$ is in the form of a [[Laurent series]] and that the one isolated singularity at $z=i$ is a 2nd order [[pole]] and thus not a simple pole. Meaning that there are no residues. Thus we could also perform the integral over the infinite closed contour on the _upper half_ of the complex plane, and obtain $0$ by the [[Residue theorem]].

## Proof of convergence for the Lorentzian representation of 𝛿
A very similar example to [Example 1](Real%20integral%20on%20the%20complex%20plane.md#Example%201) is the [proof of convergence to $𝛿(y-x)$](Lorentzian%20representation%20of%20𝛿(y-x).md#Proof%20of%20convergence%20Representation%2020of%2020𝛿%20y-x%20md%20Proving%2020that%2020a%2020function%2020converges%2020to%2020𝛿%2020y-x%20to%20𝛿%20y-x) of the [[Lorentzian representation of 𝛿(y-x)]]. It is done by applying the [Residue Theorem.](Residue%20theorem.md)
## Solution to the Dirichlet Integral
An example where we solve the real integral on the complex plane using the [Cauchy principal value](Cauchy%20principal%20value.md) is given by the [one way of evaluating](Dirichlet%20integral.md#Solution%20as%20a%20real%20integral%20on%20the%20complex%20plane) the [[Dirichlet integral]].
---
# Recommended reading
#MathematicalFoundations/Analysis/ComplexAnalysis
#MathematicalFoundations/Analysis/Integrals