# Evaluate $\int_0^1\frac{\sin (\pi xs)\sin\left(\pi x (1-s) \right)}{\sin(\pi s)}\,ds$

Based on the context of this question about the successive derivatives of $\tanh$, we can show the identity $$I(x):=\int_0^1\frac{\sin (\pi xs)\sin\left(\pi x (1-s) \right)}{\sin(\pi s)}\,ds=\frac{\cos \pi x}{\pi}\sum_{n=1}^\infty \left( 2^{2n+1}-1 \right)\zeta(2n+1)x^{2n}$$ which connects an integral to a summation of the Riemann Zeta function for odd-integer arguments. Moreover, by using the generating functions for integer and even-integer arguments of the Zeta function, one may express the result as $$I(x)=\frac{1}{2}\sin(\pi x)-\frac{\cos(\pi x)}{\pi}\left( \psi\left( x+\frac{1}{2} \right)+\gamma+2\ln 2 \right)$$ where $\gamma$ is the Euler's constant and $\psi$ is the digamma function.

To derive the expression of $I(x)$, I used the generating function of the polynomials defined in the linked question, an integral representation of $(\ln t)^{-1}$ and a Mellin transform (more details can be added if needed).

As the proof is rather long and very indirect, the question is to find alternative or shorter proofs of one of the above identities.

• Mathematica yields: $-\frac{\cos (\pi x) \left(H_{-x-\frac{1}{2}}+H_{x-\frac{1}{2}}+\log (16)\right)}{2 \pi }$ where $H$ is the harmonic number. – David G. Stork Mar 14 '18 at 22:35
• @David G. Stork They are really equivalent by the relation $H_x=\psi(x+1)+\gamma$ and functional relations for the digamma function. – Paul Enta Mar 14 '18 at 22:58

Starting from the RHS and using the integral representation for the $\zeta$ function $$\begin{eqnarray*} \sum_{n\geq 1}(2^{2n+1}-1)\zeta(2n+1)x^{2n} &=& \int_{0}^{+\infty}\frac{1}{e^s-1}\sum_{n\geq 1}(2^{2n+1}-1)\frac{(xs)^{2n}}{(2n)!}\,ds\\&=&\int_{0}^{+\infty}\frac{e^{2sx}+e^{-2sx}-1-\frac{1}{2}e^{sx}-\frac{1}{2}e^{-sx}}{e^s-1}\,ds \end{eqnarray*}$$ where $\int_{0}^{+\infty}\frac{e^{as}-1}{e^s-1}\,ds=-H_{-a}$ for any $a$ such that $\text{Re}(a)<1$. Then the relation between $I(x)$ and $\psi\left(x+\tfrac{1}{2}\right)$ simply follows from the reflection formula for the $\psi$ function.

About the other identity, I still do not see a more efficient approach than exploiting the reflection formula for the $\Gamma$ function and the Mellin transform.

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \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}$

Note that $\ds{\,\mrm{I}\pars{0} = 0}$.

\begin{align} \left.\vphantom{\large A}\mrm{I}\pars{x}\right\vert_{\ x\ \not=\ 0} & \equiv \int_{0}^{1}{\sin\pars{\pi xs}\sin\pars{\pi x\bracks{1 - s}} \over \sin\pars{\pi s}}\,\dd s = {1 \over \pi}\int_{0}^{\pi} {\sin\pars{xs}\sin\pars{x\bracks{\pi - s}} \over \sin\pars{s}}\,\dd s \\[5mm] & = {2 \over \pi}\int_{0}^{\pi/2} {\sin\pars{\verts{x}\bracks{\pi - s}}\sin\pars{\verts{x}s} \over \sin\pars{s}}\,\dd s \\[5mm] & = {1 \over \pi}\int_{0}^{\pi/2} {\cos\pars{\pi\verts{x} - 2\verts{x}s} - \cos\pars{\pi\verts{x}} \over \sin\pars{s}}\,\dd s \\[5mm] & = {1 \over \pi}\,\Re\int_{0}^{\pi/2} {\expo{\ic\pars{2\verts{x}s - \pi\verts{x}}} - \expo{-\ic\pi\verts{x}} \over \pars{\expo{\ic s} - \expo{-\ic s}}/\pars{2\ic}}\,\dd s \\[5mm] & = {2 \over \pi}\,\Re\bracks{\expo{-\ic\pi\verts{x}}\int_{0}^{\pi/2} {1 - z^{2\verts{x}} \over 1 - z^{2}}\,\dd z}_{z\ =\ \exp\pars{\ic s}} \\[1cm] & = {2 \over \pi}\,\Re\bracks{-\expo{-\ic\pi\verts{x}}\int_{1}^{0} {1 - y^{2\verts{x}}\expo{\ic\pi\verts{x}} \over 1 + y^{2}}\,\ic\,\dd y -\expo{-\ic\pi\verts{x}} \int_{0}^{1}{1 - X^{2\verts{x}} \over 1 - X^{2}}\,\dd X} \\[5mm] & = {2 \over \pi}\,\sin\pars{\pi\verts{x}}\ \underbrace{\int_{0}^{1}{\dd y \over 1 + y^{2}}}_{\ds{=\ {\pi \over 4}}}\ -\ {1 \over \pi}\,\cos\pars{\pi x}\ \int_{0}^{1}{X^{-1/2} - X^{\verts{x} - 1/2} \over 1 - X}\,\dd X \\[5mm] & = {1 \over 2}\,\sin\pars{\pi\verts{x}} - {1 \over \pi}\,\cos\pars{\pi x}\bracks{% \int_{0}^{1}{1 - X^{\verts{x} - 1/2} \over 1 - X}\,\dd X - \int_{0}^{1}{1 - X^{-1/2} \over 1 - X}\,\dd X} \\[5mm] & = {1 \over 2}\,\sin\pars{\pi\verts{x}} - {1 \over \pi}\,\cos\pars{\pi x}\bracks{% \Psi\pars{\verts{x} + {1 \over 2}} - \Psi\pars{1 \over 2}} \end{align}

Note that $\ds{\Psi\pars{1 \over 2} = -\gamma - \ln\pars{2}}$ such that

$$\bbx{\mrm{I}\pars{x} = \bracks{x \not= 0}\braces{% {1 \over 2}\,\sin\pars{\pi\verts{x}} - {1 \over \pi}\,\cos\pars{\pi x}\bracks{% \Psi\pars{\verts{x} + {1 \over 2}} + \gamma + \ln\pars{2}}}}$$

• @PaulEnta You're welcome. I like to write quite clear. – Felix Marin Mar 15 '18 at 18:44