TITLE: A sine integral
QUESTION [6 upvotes]: The integral
\begin{align}
\int_{0}^{\pi/2} \frac{ \sin(n\theta) }{ \sin(\theta) } \ d\theta
\end{align}
is claimed to not have a closed form expression. In this view find the series solution of the integral as a series involving of $n$. 
Editorial note: 
As described in the problem several series may be obtained, of which, all seem to hold validity. As a particular case, from notes that were made a long while ago, the formula
\begin{align}
\int_{0}^{\pi/2} \frac{ \sin(n\theta) }{ \sin(\theta) } \ d\theta = \sum_{r=1}^{\infty} (-1)^{r-1} \ \ln\left(\frac{2r+1}{2r-1}\right) \ \sin(r n \pi)
\end{align}
is stated, but left unproved. Can this formula be proven along with finding other series dependent upon $n$?

REPLY [3 votes]: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{I_{n}\equiv
    \int_{0}^{\pi/2}{\sin\pars{n\theta} \over \sin\pars{\theta}}\,\dd\theta:
    \ {\large ?}}$

Since $\ds{I_{n} = -I_{-n}}$, we'll study the case $\ds{n > 0}$:
  \begin{align}
I_{n\ >\ 0}&=\Im\int_{0}^{\pi/2}{\expo{\ic n\theta} - 1\over \sin\pars{\theta}}\,\dd\theta
=\Im
\int_{\verts{z}\ =\ 1 \atop {\phantom{\Huge A}0\ <\ {\rm Arg}\pars{z}\ <\ \pi/2}}
{z^{n} - 1 \over \pars{z^{2} - 1}/\pars{2\ic z}}\,{\dd z \over \ic z}
\\[3mm]&=2\,\Im
\int_{\verts{z}\ =\ 1 \atop {\phantom{\Huge A}0\ <\ {\rm Arg}\pars{z}\ <\ \pi/2}}
{1 - z^{n} \over -z^{2} + 1}\,\dd z
\\[3mm]&=2\,\Im\bracks{%
-\int_{1}^{0}{1 - \expo{\ic\pi n/2}y^{n} \over y^{2} + 1}\,\ic\,\dd y
-\int_{0}^{1}{1 - x^{n} \over -x^{2} + 1}\,\dd x}
=2\,\Re\int_{0}^{1}{1 - \expo{\ic\pi n/2}y^{n} \over y^{2} + 1}\,\dd y
\\[3mm]&=\underbrace{2\int_{0}^{1}{\dd y \over y^{2} + 1}}
_{\ds{=\ {\pi \over 2}}}\ -\
2\cos\pars{n\pi \over 2}\int_{0}^{1}{y^{n}\,\dd y \over y^{2} + 1}
\end{align}

$$
I_{n\ >\ 0}={\pi \over 2}
-2\cos\pars{n\pi \over 2}\int_{0}^{1}{y^{n}\,\dd y \over y^{2} + 1}
\,,\qquad\qquad I_{n\ <\ 0} = -I_{-n}
$$

\begin{align}
&\color{#c00000}{\int_{0}^{1}{y^{n}\,\dd y \over y^{2} + 1}}
=\int_{0}^{\infty}{\expo{-\pars{n + 1}t} \over 1 + \expo{-2t}}\,\dd t
=\sum_{\ell = 0}^{\infty}\pars{-1}^{\ell}
\int_{0}^{\infty}\expo{-\pars{2\ell + n + 1}t}\,\dd t
=\sum_{\ell = 0}^{\infty}{\pars{-1}^{\ell} \over 2\ell + n + 1}
\\[3mm]&={1 \over 4}\bracks{\Psi\pars{n + 3 \over 4} - \Psi\pars{n + 1 \over 4}}
\end{align}
  where $\ds{\Psi\pars{z}}$ is the
  Digamma Function
  ${\bf\mbox{6.3.1}}$.

$$\color{#44f}{%
I_{n}=\left\lbrace\begin{array}{lcl}
-I_{-n} & \mbox{if} & n < 0
\\[1mm]
0 & \mbox{if} & n = 0
\\[3mm]
\color{#c00000}{\left.\begin{array}{lcl}
{\pi \over 2} & \mbox{if} & n\ \mbox{is odd}
\\
{\pi \over 2} - \half\,\pars{-1}^{n/2}
\bracks{\Psi\pars{n + 3 \over 4} - \Psi\pars{n + 1 \over 4}}
& \mbox{if} & n\ \mbox{is even}
\end{array}\right\rbrace} & \mbox{if} & n > 0
\end{array}\right.}
$$