6

Calculate $\displaystyle\int_0^\infty\dfrac{\sin(x)\log(x)}{x}\mathrm dx$.

I tried to expand $\sin(x)$ at zero, or use SI(SinIntegral) function, but it did not work. Besides, I searched the question on math.stackexchange, nothing found.

Mathematica tells me the answer is $-\dfrac{\gamma\pi}{2}$, I have no idea how to get it.

Thanks for your help!

Faye Tao
  • 1,814

4 Answers4

20

From the integral representation of the beta function and Euler's reflection formula, we get

\begin{align*} \int_{0}^{\infty} \frac{\sin x}{x^s} \, \mathrm{d}x &= \frac{1}{\Gamma(s)} \int_{0}^{\infty} \left( \int_{0}^{\infty} t^{s-1}e^{-xt} \, \mathrm{d}t \right) \sin x \, \mathrm{d}x \\ &= \frac{1}{\Gamma(s)} \int_{0}^{\infty} \left( \int_{0}^{\infty} e^{-tx} \sin x \, \mathrm{d}x \right) t^{s-1} \, \mathrm{d}t \\ &= \frac{1}{\Gamma(s)} \int_{0}^{\infty} \frac{t^{s-1}}{1+t^2} \, \mathrm{d}t \\ &= \frac{1}{2\Gamma(s)} \beta\left(\frac{s}{2}, 1-\frac{s}{2}\right) \\ &= \frac{\pi}{2\Gamma(s)\sin\left(\frac{\pi s}{2}\right)}. \end{align*}

Here, interchanging the two integral signs is a priori valid on the strip $1 < \Re(s) <2$ by Fubini's theorem, and then this identity extends to the larger strip $0 < \Re(s) < 2$ by analytic continuation.

Now differentiating both sides, we get

$$ \int_{0}^{\infty} \frac{\sin x \log x}{x^s} \, \mathrm{d}x \stackrel{(*)}{=} -\frac{\mathrm{d}}{\mathrm{d}s} \frac{\pi}{2\Gamma(s)\sin\left(\frac{\pi s}{2}\right)} = \frac{\pi}{2\Gamma(s)\sin\left(\frac{\pi s}{2}\right)} \left( \psi(s) + \frac{\pi}{2}\cot\left(\frac{\pi s}{2}\right) \right), $$

where $\psi$ is the digamma function. So by plugging $s = 1$, we conclude:

$$ \int_{0}^{\infty} \frac{\sin x \log x}{x} \, \mathrm{d}x = -\frac{\gamma \pi}{2}. $$


Justification of $\text{(*)}$. Let us prove that

$$F(s) := \int_{0}^{\infty} \frac{\sin x}{x^s} \, \mathrm{d}x \tag{1}$$

is analytic on the open strip $\mathcal{S} = \{ s \in \Bbb{C} : 0 < \Re(s) < 2 \}$ and its derivative can be computed by differentiation under the integral sign (Leibniz's integral rule). A major issue of $\text{(1)}$ is that the integral converges only conditionally for $0 < \Re(s) \leq 1$ and hence poses technical difficulty in adapting the usual proof of Leibniz's integral rule. In order to circumvent this, we accelerate the speed of convergence using integration by parts:

$$ F(s) = \underbrace{\left[ \frac{1-\cos x}{x^s} \right]_{0}^{\infty}}_{=0} + s \int_{0}^{\infty} \frac{1-\cos x}{x^{s+1}} \, \mathrm{d}x. $$

Note that the resulting integral is absolutely convergent on the strip $\mathcal{S}$. Now we claim that

$$ g(s) := \frac{F(s)}{s} = \int_{0}^{\infty} \frac{1-\cos x}{x^{s+1}} \, \mathrm{d}x $$

is differentiable on $\mathcal{S}$ and its derivative can be computed by the Leibniz's integral rule. Fix $s \in \mathcal{S}$ and choose $\varepsilon$ so that $0 < \varepsilon < \Re(s) < 2-\varepsilon $. Then whenever $0 < |h| < \varepsilon$,

\begin{align*} &\frac{g(s+h) - g(s)}{h} - \int_{0}^{\infty} \frac{(1-\cos x)(-\log x)}{x^{1+s}} \, \mathrm{d}x \\ &\qquad = \int_{0}^{\infty} \frac{1-\cos x}{x^{1+s}} \left( \frac{x^{-h} - 1}{h} + \log x \right) \, \mathrm{d}x \\ &\qquad = \int_{0}^{\infty} \frac{1-\cos x}{x^{1+s}} \left( \int_{0}^{1} (1 - x^{-ht}) \log x \, \mathrm{d}t \right) \, \mathrm{d}x. \end{align*}

Using the inequality $\cos x \geq 1 - x^2/2$, we find that the integrand is dominated by

$$ \left| \frac{1-\cos x}{x^{1+s}} \left( \int_{0}^{1} (1 - x^{-ht}) \log x \, \mathrm{d}t \right) \right| \leq \frac{\min\{2, x^2/2\}}{x^{1+\Re(s)}} (1 + \max\{ x^{\varepsilon}, x^{-\varepsilon} \}) \left|\log x\right| $$

This dominating function is integrable. So by the dominated convergence theorem, as $h \to 0$, we have

$$ g'(s) = \lim_{h \to 0} \frac{g(s+h) - g(s)}{h} = \int_{0}^{\infty} \frac{(1-\cos x)(-\log x)}{x^{1+s}} \, \mathrm{d}x. $$

Plugging this back, we know that $F(s)$ is differentiable on $\mathcal{S}$ . Moreover, by integration by parts,

\begin{align*} F'(s) &= g(s) + sg'(s) \\ &= g(s) + \underbrace{\left[ \frac{(1-\cos x)\log x}{x^s} \right]_{0}^{\infty}}_{=0} - \int_{0}^{\infty} \left( \frac{\sin x \log x}{x^s} + \frac{1-\cos x}{x^{1+s}} \right) \, \mathrm{d}x \\ &= - \int_{0}^{\infty} \frac{\sin x \log x}{x^s} \, \mathrm{d}x. \end{align*}

Therefore $F'(s)$ coincides with the integral obtained by differentiation under the integral sign.

Sangchul Lee
  • 167,468
6

$\newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\color{#f00}{\int_{0}^{\infty}{\sin\pars{x}\ln\pars{x} \over x}\,\dd x} = \int_{0}^{\infty}\sin\pars{x}\ln\pars{x}\int_{0}^{\infty}\expo{-xt}\,\dd t\,\dd x \\[5mm] = &\ \int_{0}^{\infty}\ \overbrace{\Im\int_{0}^{\infty}\ln\pars{x}\expo{-\pars{t - \ic}x}\,\dd x} ^{\ds{\equiv\ \mc{J}}}\ \,\dd t\label{1}\tag{1} \end{align}

Hereafter the $\ds{\ln}$-branch-cut runs along $\ds{\left(-\infty,0\right]}$ with $\ds{\ln\pars{z}\ \,\mrm{arg}}$ given by $\ds{-\pi < \mrm{arg}\pars{z} < \pi}$.


\begin{align} \mc{J} & \equiv \Im\int_{0}^{\infty}\ln\pars{x}\expo{-\pars{t - \ic}x}\,\dd x = \Im\bracks{{1 \over t - \ic}\int_{0}^{\pars{t - \ic}\infty} \ln\pars{x \over t - \ic}\expo{-x}\,\dd x} \\[5mm] & = -\,\Im\braces{{t + \ic \over t^{2} + 1}\int_{\infty}^{0}\bracks{\ln\pars{x \over \root{t^{2} + 1}} + \arctan\pars{1 \over t}\ic}\expo{-x}\,\dd x} \\[5mm] & = \Im\braces{{t + \ic \over t^{2} + 1}\bracks{% \int_{0}^{\infty}\ln\pars{x}\expo{-x}\,\dd x - {1 \over 2}\ln\pars{t^{2} + 1}+ \arctan\pars{1 \over t}\ic}} \end{align}

Note that
$\ds{\int_{0}^{\infty}\ln\pars{x}\expo{-x}\,\dd x = \left.\partiald{}{\mu}\int_{0}^{\infty}x^{\mu}\expo{-x}\,\dd x\, \right\vert_{\ \mu\ =\ 0} = \Gamma\,'\pars{1}\ =\ \overbrace{\Gamma\pars{1}}^{\ds{=\ 1}}\ \overbrace{\Psi\pars{1}}^{\ds{-\gamma}}\ =\ -\gamma\quad}$ where $\ds{\Gamma}$

and $\ds{\Psi}$ are the Gamma and Digamma Functions, respectively. Then,

\begin{align} \mc{J} & \equiv \bbox[8px,#ffe,border:0.1em groove navy]{% \Im\int_{0}^{\infty}\ln\pars{x}\expo{-\pars{t - \ic}x}\,\dd x} = -\,{\gamma \over t^{2} + 1} - {1 \over 2}\,{\ln\pars{t^{2} + 1} \over t^{2} + 1} + {t\arctan\pars{1/t} \over t^{2} + 1} \\[5mm] & = \bbox[8px,#ffe,border:0.1em groove navy]{-\,{\gamma \over t^{2} + 1} + \totald{}{t}\bracks{{1 \over 2}\,\arctan\pars{1 \over t}\ln\pars{t^{2} + 1}}} \label{2}\tag{2} \end{align}

Note that$\ds{{1 \over 2}\,\arctan\pars{1 \over t}\ln\pars{t^{2} + 1}}$ vanishes out when $\ds{t \to \infty}$ and $\ds{t \to 0^{+}}$.

By replacing \eqref{2} in \eqref{1}: \begin{align} &\color{#f00}{\int_{0}^{\infty}{\sin\pars{x}\ln\pars{x} \over x}\,\dd x} = -\gamma\int_{0}^{\infty}{\dd t \over t^{2} + 1} = \color{#f00}{-\,{1 \over 2}\,\gamma\pi} \end{align}

Felix Marin
  • 89,464
  • (+1) That is how I just did this. Then I looked on MSE to see if it's already been discusses and found this page. Well done my friend! – Mark Viola Apr 23 '21 at 03:36
0

very nice proofs . Here is my approach. I consider known that the inverse Laplace transform of $\frac{\log x}{x}$ is $-\log y - \gamma$ and that the Laplace of \sin xis \frac{1}{y^2+1}.

Then: $$\displaystyle{\int_{0}^{\infty} \frac{\log x \sin x}{x}\, {\rm d}x= -\int_{0}^{\infty}\frac{\ log y+\gamma}{y^2+1}\, {\rm d}y = - \int_{0}^{\infty}\frac{\log y}{y^2+1}\, {\ rm d}y - \int_0^\infty \frac{\gamma}{y^2+1}\, {\rm d}y = - \frac{\gamma \pi}{2}}$$ since we easily find that $\displaystyle{\int_0^\infty \frac{\log y}{y^2+1}\, {\rm d}y= 0}.$

Martin.s
  • 1
  • 1
  • 22
0

\begin{align*} &\text{Show that:} \quad \int_0^\infty \frac{\log x \sin x}{x}\, \mathrm{d}x = - \frac{\gamma \pi}{2}. \\ &\int\limits_0^\infty \frac{\log x\sin x}{x}\,dx = \int\limits_0^\infty \log x\sin x\left( \int\limits_0^\infty e^{-xy}\,dy \right)\,dx \\ &= \int\limits_0^\infty \int\limits_0^\infty \log x\sin x\,e^{-xy}\,dx\,dy \\ &= \frac{1}{2i}\int\limits_0^\infty \int\limits_0^\infty \log x\left( e^{ix} - e^{-ix} \right)\,e^{-xy}\,dx\,dy \\ &= \frac{1}{2i}\int\limits_0^\infty \left( \int\limits_0^\infty \log x\,e^{-x(y-i)}\,dx - \int\limits_0^\infty \log x\,e^{-x(y+i)}\,dx \right)\,dy \\ &= - \frac{1}{2i}\int\limits_0^\infty \left( \frac{\gamma + \log(y-i)}{y-i} - \frac{\gamma + \log(y+i)}{y+i} \right)\,dy \\ &= - \frac{1}{2i}\int\limits_0^\infty \left( \frac{\gamma}{y-i} - \frac{\gamma}{y+i} \right)\,dy - \frac{1}{2i}\int\limits_0^\infty \left( \frac{\log(y-i)}{y-i} - \frac{\log(y+i)}{y+i} \right)\,dy \\ &= - \frac{\gamma}{2i}\int\limits_0^\infty \frac{2i}{y^2+1}\,dy - \frac{1}{4i}\left[ \log^2(y-i) - \log^2(y+i) \right]_0^\infty \\ &= - \gamma \int\limits_0^\infty \frac{1}{y^2+1}\,dy - \frac{1}{4i}\left[ \log(y^2+1) \cdot \log\frac{y-i}{y+i} \right]_0^\infty \\ &= - \frac{\gamma \pi}{2} - \frac{1}{4i} \cdot \lim_{y \to \infty} \left( \log(y^2+1) \cdot \log\frac{y-i}{y+i} \right) = - \frac{\gamma \pi}{2}. \end{align*}

Formulas

because

$$\displaystyle{ - \gamma = \int\limits_0^\infty {\log x\;{e^{ - x}}dx} \Rightarrow \int\limits_0^\infty {\log x\;{e^{ - x \cdot z}}dx} = \mathop = \limits^{xz = y} = } \displaystyle{\frac{1}{z}\int\limits_0^\infty {\log \frac{y}{z}\;{e^{ - y}}dy} = \frac{1}{z} \int\limits_0^\infty {\left( {\log y - \log z} \right)\;{e^{ - y}}dy} = }$$

$$\displaystyle{ = \frac{1}{z}\int\limits_0^\infty {\log y\;{e^{ - y}}dy} - \frac{{\log z}}{z}\int \limits_0^\infty {\;{e^{ - y}}dy} \Rightarrow \int\limits_0^\infty {\log x\;{e^{ - x \cdot z}}dx} = - \frac {{\gamma + \log z}}{z}}$$

Martin.s
  • 1
  • 1
  • 22