# 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\{{f(t) \over 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 s}{s}}\,ds=\int _{0}^{\infty }{\mathcal {L}}\{\sin t\}(s)\;ds=\int _{0}^{\infty }{\frac {1}{s^{2}+1}}\,ds=\arctan s{\bigg |}_{0}^{\infty }={\frac {\pi }{2}},}$

where ${\displaystyle {\mathcal {L}}\{\sin t\}(s)=1/(s^{2}+1)}$ is the Laplace transform of the function 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, viz.,

${\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 }\sin t\,{\frac {1}{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 a. Let

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

so that we need evaluate f (0).

Differentiate with respect to a and apply the Leibniz integral rule 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 =-{\mathcal {L}}\{\sin \omega \}(a).\end{aligned}}}

This integral was evaluated without proof, above, based on Laplace transform tables; we derive it this time. It is made much simpler by recalling Euler's formula,

${\displaystyle \ e^{i\omega }=\cos \omega +i\sin \omega ,}$

so then

${\displaystyle \operatorname {Im} e^{i\omega }=\sin \omega ,}$

where ${\displaystyle \operatorname {Im} }$ represents the imaginary part.

{\displaystyle {\begin{aligned}\therefore \qquad {\frac {df}{da}}&=-\operatorname {Im} \int _{0}^{\infty }e^{-a\omega }e^{i\omega }\,d\omega =\operatorname {Im} {\frac {1}{-a+i}}\\[5pt]&=\operatorname {Im} {\frac {-a-i}{a^{2}+1}}={\frac {-1}{a^{2}+1}},\qquad {\text{given that }}a>0.\end{aligned}}}

Integrating with respect to a,

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

where A is a constant to be determined. As f(+∞) = 0,

${\displaystyle \therefore \qquad A=\arctan(+\infty )={\frac {\pi }{2}}+m\pi ,}$
${\displaystyle \therefore \qquad f(0)=\lim _{a\to 0^{+}}f(a)={\frac {\pi }{2}}+m\pi -\arctan 0={\frac {\pi }{2}}+n\pi ,}$

for integers m and n.

It is easy to see that n has to be zero, by analyzing easily observed bounds for this integral,

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

The left and right bounds can be derived by dividing the integrated region [0, ∞] into periodic intervals, over which the integrals have zero value:

Left bound:

{\displaystyle {\begin{aligned}\int _{0}^{\infty }{\frac {\sin x}{x}}\,dx&=\sum _{n=0}^{\infty }\int _{2\pi n}^{2\pi (n+1)}{\frac {\sin x}{x}}\,dx\\[5pt]&=\sum _{n=0}^{\infty }\int _{0}^{2\pi }{\frac {\sin x}{2\pi n+x}}\,dx>\sum _{n=0}^{\infty }\int _{0}^{2\pi }{\frac {\sin x}{2\pi (n+1)}}\,dx=0\end{aligned}}}

Right bound:

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

The second term can be written as

{\displaystyle {\begin{aligned}&\sum _{n=1}^{\infty }\int _{\pi (2n-1)}^{\pi (2n+1)}{\frac {\sin x}{x}}\,dx<\sum _{n=1}^{\infty }{\frac {1}{2\pi n}}\left(\int _{\pi (2n-1)}^{2n\pi }\sin x\,dx+\int _{2n\pi }^{\pi (2n+1)}\sin x\,dx\right)\\[5pt]={}&\sum _{n=1}^{\infty }{\frac {1}{2\pi n}}\int _{\pi (2n-1)}^{\pi (2n+1)}\sin x\,dx.\end{aligned}}}

Clearly,

${\displaystyle \int _{\pi (2n-1)}^{\pi (2n+1)}\sin x\ dx=0.}$

Thus

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

This completes the proof.

This result may be further extended with the introduction of another variable, b, first noting that the sinc function, sinx/x, is an even function, and therefore

${\displaystyle \int _{0}^{\infty }{\frac {\sin x}{x}}\,dx=\int _{-\infty }^{0}{\frac {\sin x}{x}}\,dx=-\int _{0}^{-\infty }{\frac {\sin x}{x}}\,dx~,}$

so then

{\displaystyle {\begin{aligned}g(b)&\equiv \int _{0}^{\infty }{\frac {\sin b\,\omega }{\omega }}\,d\omega =\int _{0}^{\infty }{\frac {\sin b\omega }{b\omega }}\,d(b\,\omega )\\[5pt]&=\int _{0}^{\operatorname {sgn} b\,\cdot \,\infty }{\frac {\sin x}{x}}\,dx=\operatorname {sgn} b\int _{0}^{\infty }{\frac {\sin x}{x}}\,dx={\frac {\pi }{2}}\,\operatorname {sgn} b={\pi b \over 2|b|}.\end{aligned}}}

### Complex integration

The same result can be obtained via complex integration. Consider

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

As a function of the complex variable 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] g(z) as follows,

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

The pole has been moved away from the real axis, so g(z) can be integrated along the semicircle of radius R centered at z = 0 and closed on the real axis; then the limit ε → 0 should be taken.

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 a and b with a < 0 <  b one finds

${\displaystyle \lim _{\varepsilon \rightarrow 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 }{\sin(x) \over x}\,dx=2\int _{0}^{+\infty }{\sin(x) \over x}\,dx,}$

the desired result is obtained as

${\displaystyle \lim _{\varepsilon \rightarrow 0}\int _{\varepsilon }^{\infty }{\frac {\sin(x)}{x}}\,dx=\int _{0}^{\infty }{\frac {\sin(x)}{x}}\,dx={\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 sin(πk) = 0     ∀k ∈ ℤ.

Define

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

This is continuous on the interval [0, 1/2], so it is bounded by |f(x)| ≤ A , ∀ x, for some constant A ∈ ℝ≥0, and hence by the Riemann–Lebesgue lemma,

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

Therefore,

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

by the above.

## Lobachevsky integral formula

Let ${\displaystyle f(x)}$ be a continuous function and satisfy in the ${\displaystyle \pi }$-periodic assumption ${\displaystyle f(x+\pi )=f(x)}$, and ${\displaystyle f(\pi -x)=f(x)}$, ${\displaystyle 0\leq x<\infty }$. If the integral ${\displaystyle \int _{0}^{\infty }{\frac {\sin x}{x}}f(x)\,dx}$ defined in the sense of the improper Riemann integral, we have the Lobachevsky integral formula

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

Moreover, we have the following equality as an extension of Lobachevsky integral formula [3]

${\displaystyle \int _{0}^{\infty }{\frac {\sin ^{4}x}{x^{4}}}f(x)\,dx=\int _{0}^{\pi /2}f(t)\,dt-{\frac {2}{3}}\int _{0}^{\pi /2}\sin ^{2}tf(t)\,dt.}$