# Dirichlet integral

In mathematics, there are several integrals known as the Dirichlet integral, after the German mathematician Peter Gustav Lejeune Dirichlet.

One of those is the improper integral of the sinc function over the positive real line:

${\displaystyle \int _{0}^{\infty }{\frac {\sin x}{x}}\,dx={\frac {\pi }{2}}.}$

This integral is not absolutely convergent, and so the integral is not even defined in the sense of Lebesgue integration, but it is defined in the sense of the improper Riemann integral or the Henstock–Kurzweil integral.[1] The value of the integral (in the Riemann or Henstock sense) can be derived in various ways. For example, the value can be determined from attempts to evaluate a double improper integral, or by using differentiation under the integral sign.

## Evaluation

### Double improper integral method

One of the well-known properties of Laplace transforms is

${\displaystyle {\mathcal {L}}\left\{{\frac {f(t)}{t}}\right\}(s)=\int _{s}^{\infty }{\mathcal {L}}\{f(t)\}(p)\,dp,}$

which allows one to evaluate the Dirichlet integral succinctly in the following manner:

${\displaystyle \int _{0}^{\infty }{\frac {\sin t}{t}}\,dt=\int _{0}^{\infty }{\mathcal {L}}\{\sin t\}(p)\,dp=\int _{0}^{\infty }{\frac {1}{s^{2}+1}}\,ds=\arctan s{\bigg |}_{0}^{\infty }={\frac {\pi }{2}},}$

because ${\displaystyle {\mathcal {L}}\{\sin t\}(s)={\frac {1}{(s^{2}+1)}}}$  is the Laplace transform of the function ${\displaystyle \sin t}$ . This is equivalent to attempting to evaluate the same double definite integral in two different ways, by reversal of the order of integration, namely:

${\displaystyle \left(I_{1}=\int _{0}^{\infty }\int _{0}^{\infty }e^{-st}\sin t\,dt\,ds\right)=\left(I_{2}=\int _{0}^{\infty }\int _{0}^{\infty }e^{-st}\sin t\,ds\,dt\right),}$
${\displaystyle \left(I_{1}=\int _{0}^{\infty }{\frac {1}{s^{2}+1}}\,ds={\frac {\pi }{2}}\right)=\left(I_{2}=\int _{0}^{\infty }{\frac {\sin t}{t}}\,dt\right),{\text{ provided }}s>0.}$

### Differentiation under the integral sign (Feynman's trick)

First rewrite the integral as a function of the additional variable ${\displaystyle a}$ . Let

${\displaystyle f(a)=\int _{0}^{\infty }e^{-a\omega }{\frac {\sin \omega }{\omega }}\,d\omega .}$

In order to evaluate the Dirichlet integral, we need to determine${\displaystyle f(0)}$ .

Differentiate with respect to ${\displaystyle a}$  and apply the Leibniz rule for differentiating under the integral sign to obtain

{\displaystyle {\begin{aligned}{\frac {df}{da}}&={\frac {d}{da}}\int _{0}^{\infty }e^{-a\omega }{\frac {\sin \omega }{\omega }}\,d\omega =\int _{0}^{\infty }{\frac {\partial }{\partial a}}e^{-a\omega }{\frac {\sin \omega }{\omega }}\,d\omega \\[5pt]&=-\int _{0}^{\infty }e^{-a\omega }\sin \omega \,d\omega .\end{aligned}}}

Now, using Euler's formula ${\displaystyle e^{i\omega }=\cos \omega +i\sin \omega ,}$  one can express a sinusoid in terms of complex exponential functions. We thus have

${\displaystyle \sin(\omega )={\frac {1}{2i}}\left(e^{i\omega }-e^{-i\omega }\right).}$

Therefore,

{\displaystyle {\begin{aligned}{\frac {df}{da}}&=-\int _{0}^{\infty }e^{-a\omega }\sin \omega \,d\omega =-\int _{0}^{\infty }e^{-a\omega }{\frac {e^{i\omega }-e^{-i\omega }}{2i}}d\omega \\&=-{\frac {1}{2i}}\int _{0}^{\infty }\left[e^{-\omega (a-i)}-e^{-\omega (a+i)}\right]d\omega \\&=-{\frac {1}{2i}}\left[{\frac {-1}{a-i}}e^{-\omega (a-i)}-{\frac {-1}{a+i}}e^{-\omega (a+i)}\right]{\bigg |}_{0}^{\infty }\\&=-{\frac {1}{2i}}\left[0-\left({\frac {-1}{a-i}}+{\frac {1}{a+i}}\right)\right]=-{\frac {1}{2i}}\left({\frac {1}{a-i}}-{\frac {1}{a+i}}\right)\\&=-{\frac {1}{2i}}\left({\frac {a+i-(a-i)}{a^{2}+1}}\right)=-{\frac {1}{a^{2}+1}}.\end{aligned}}}

Integrating with respect to ${\displaystyle a}$  gives

${\displaystyle f(a)=\int {\frac {-da}{a^{2}+1}}=A-\arctan a,}$

where ${\displaystyle A}$  is a constant of integration to be determined. Since ${\displaystyle \lim _{a\to \infty }f(a)=0,}$  ${\displaystyle A=\lim _{a\to \infty }\arctan(a)={\frac {\pi }{2}},}$  using the principal value. This means

${\displaystyle f(a)={\frac {\pi }{2}}-\arctan {a}.}$

Finally, for ${\displaystyle a=0}$ , we have ${\displaystyle f(0)={\frac {\pi }{2}}-\arctan(0)={\frac {\pi }{2}}}$ , as before.

### Complex integration

The same result can be obtained by complex integration. Consider

${\displaystyle f(z)={\frac {e^{iz}}{z}}.}$

As a function of the complex variable ${\displaystyle z}$ , it has a simple pole at the origin, which prevents the application of Jordan's lemma, whose other hypotheses are satisfied.

Define then a new function[2]

${\displaystyle g(z)={\frac {e^{iz}}{z+i\varepsilon }}.}$

The pole has been moved away from the real axis, so ${\displaystyle g(z)}$  can be integrated along the semicircle of radius ${\displaystyle R}$  centered at ${\displaystyle z=0}$  and closed on the real axis. One than takes the limit ${\displaystyle \varepsilon \rightarrow 0}$ .

The complex integral is zero by the residue theorem, as there are no poles inside the integration path

${\displaystyle 0=\int _{\gamma }g(z)\,dz=\int _{-R}^{R}{\frac {e^{ix}}{x+i\varepsilon }}\,dx+\int _{0}^{\pi }{\frac {e^{i(Re^{i\theta }+\theta )}}{Re^{i\theta }+i\varepsilon }}iR\,d\theta .}$

The second term vanishes as R goes to infinity. As for the first integral, one can use one version of the Sokhotski–Plemelj theorem for integrals over the real line: for a complex-valued function f defined and continuously differentiable on the real line and real constants ${\displaystyle a}$  and ${\displaystyle b}$  with ${\displaystyle a<0  one finds

${\displaystyle \lim _{\varepsilon \to 0^{+}}\int _{a}^{b}{\frac {f(x)}{x\pm i\varepsilon }}\,dx=\mp i\pi f(0)+{\mathcal {P}}\int _{a}^{b}{\frac {f(x)}{x}}\,dx,}$

where ${\displaystyle {\mathcal {P}}}$  denotes the Cauchy principal value. Back to the above original calculation, one can write

${\displaystyle 0={\mathcal {P}}\int {\frac {e^{ix}}{x}}\,dx-\pi i.}$

By taking the imaginary part on both sides and noting that the function ${\displaystyle \sin(x)/x}$  is even, so

${\displaystyle \int _{-\infty }^{+\infty }{\frac {\sin(x)}{x}}\,dx=2\int _{0}^{+\infty }{\frac {\sin(x)}{x}}\,dx,}$

the desired result is obtained as

${\displaystyle \lim _{\varepsilon \to 0}\int _{\varepsilon }^{\infty }{\frac {\sin(x)}{x}}\,dx=\int _{0}^{\infty }{\frac {\sin(x)}{x}}\,dx={\frac {\pi }{2}}.}$

Alternatively, choose as the integration contour for ${\displaystyle f}$  the union of upper half-plane semicircles of radii ${\displaystyle \varepsilon }$  and ${\displaystyle R}$  together with two segments of the real line that connect them. On one hand the contour integral is zero, independently of ${\displaystyle \varepsilon }$  and ${\displaystyle R}$ ; on the other hand, as ${\displaystyle \varepsilon \to 0}$  and ${\displaystyle R\to \infty }$  the integral's imaginary part converges to ${\displaystyle 2I+\Im {\big (}\ln 0-\ln(\pi i){\big )}=2I-\pi }$  (here ${\displaystyle \ln z}$  is any branch of logarithm on upper half-plane), leading to ${\displaystyle I={\frac {\pi }{2}}}$ .

### Via the Dirichlet kernel

Let

${\displaystyle D_{n}(x)=\sum _{k=-n}^{n}e^{2\pi ikx}={\frac {\sin \left(\left(2n+1\right)\pi x\right)}{\sin(\pi x)}}}$

be the Dirichlet kernel.

This is clearly symmetric about zero, that is,

${\displaystyle D_{n}(-x)=D_{n}(x)}$

for all x, and

{\displaystyle {\begin{aligned}\int _{-1/2}^{1/2}D_{n}(x)\,dx&=\sum _{|k|\leq n}\int _{-1/2}^{1/2}e^{2\pi ikx}\,dx\\[1pt]&=1+\sum _{0<|k|\leq n}{\frac {1}{2\pi ik}}\left(e^{\pi ik}-e^{-\pi ik}\right)=1+\sum _{0<|k|\leq n}{\frac {\sin(\pi k)}{\pi k}}=1,\end{aligned}}}

since ${\displaystyle \sin(nk)=0}$  for any ${\displaystyle k\in \mathbb {Z} }$ .

Define

${\displaystyle f(x)\equiv {\frac {1}{\pi x}}-{\frac {1}{\sin(\pi x)}}.}$

This is continuous on the interval ${\displaystyle [0,1/2]}$ , so it is bounded by ${\displaystyle \left|f(x)\right|\leq A}$  ${\displaystyle \forall x}$  for some constant${\displaystyle A\in \mathbb {R} _{\geq 0}}$ , and hence by the Riemann–Lebesgue lemma,

${\displaystyle \int _{0}^{\frac {1}{2}}f(x)\sin {\big (}(2n+1)\pi x{\big )}\,dx\to 0{\text{ as }}n\to \infty .}$

Therefore,

{\displaystyle {\begin{aligned}\int _{0}^{\infty }{\frac {\sin(x)}{x}}\,dx&=\lim _{n\to \infty }\int _{0}^{(2n+1){\frac {\pi }{2}}}{\frac {\sin(x)}{x}}\,dx\\&=\lim _{n\to \infty }\int _{0}^{\frac {1}{2}}{\frac {\sin {\big (}(2n+1)\pi x{\big )}}{x}}\,dx\quad {\text{(by substituting }}x\mapsto (2n+1)\pi x)\\&=\pi \lim _{n\to \infty }\int _{0}^{\frac {1}{2}}\sin {\big (}(2n+1)\pi x{\big )}\left(f(x)+{\frac {1}{\sin(\pi x)}}\right)\,dx\\&=\pi \lim _{n\to \infty }\left(\int _{0}^{\frac {1}{2}}f(x)\sin {\big (}(2n+1)\pi x{\big )}\,dx+{\frac {1}{2}}\int _{-{\frac {1}{2}}}^{\frac {1}{2}}D_{n}(x)\,dx\right)\\&={\frac {\pi }{2}}\end{aligned}}}

by the above.