Generalised Integral $I_n=\int_0^{\pi/2} \frac{x^n}{\sin ^n x} \ \mathrm{d}x, \quad n\in \mathbb{Z}^+.$

I have this integral, $$I_n=\displaystyle \int_0^{\pi/2} \frac{x^n}{\sin ^n x} \ \mathrm{d}x, \qquad n\in \mathbb{Z}^+.$$ We have the results $$ \begin{align} I_1 & = 2C, \\ I_2 &= \pi\log 2, \\ I_4 & = -\frac{\pi^3}{12} + 2\pi\log 2 + \frac{\pi^3}{3}\log 2-\frac{3\pi}{2}\zeta(3), \end{align} $$ where $C$ is Catalan's constant. Can we prove any of these results, or make any progress on $I_3$, or the general case?


Integrating by parts 3 times,

$$ \begin{align} \int_{0}^{\pi /2} \frac{x^{4}}{\sin^{4} x} \ dx &= - \frac{x^{4}}{3} \cot(x) \left(\csc^{2} (x) +2 \right) \Bigg|^{\pi/2}_{0} + \frac{4}{3} \int_{0}^{\pi /2} x^{3} \cot (x) \left(\csc^{2} (x) +2 \right) \ dx \\ &= \frac{4}{3} \int_{0}^{\pi /2} x^{3} \cot (x) \left(\csc^{2} (x) +2 \right) \ dx \\ &= \frac{8}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx + \frac{4}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \csc^{2}(x) \ dx \\ &= \frac{8}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx - \frac{2}{3}x^{3} \cot^{2}(x) \Bigg|^{\pi/2}_{0} + 2 \int_{0}^{\pi /2} x^{2} \cot^{2}(x) \ dx \\ &= \frac{8}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx + 2 \int_{0}^{\pi /2} x^{2} \cot^{2} (x) \ dx \\ &= \frac{8}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx -2x^{2} \Big( x + \cot(x) \Big) \Bigg|^{\pi/2}_{0} +4 \int_{0}^{\pi /2} x\Big(x+ \cot(x) \Big) \ dx \\ &= \frac{8}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx - \frac{\pi^{3}}{4} + 4 \int_{0}^{\pi /2} x^{2} \ dx + 4 \int_{0}^{\pi /2} x \cot(x) \ dx \\ &= \frac{8}{3} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx - \frac{\pi^{3}}{12} + 4 \int_{0}^{\pi /2} x \cot(x) \ dx . \end{align}$$

In general, $$ \int_{a}^{b} f(x) \cot(x) \ dx = 2 \sum_{n=1}^{\infty} \int_{a}^{b} f(x) \sin (2nx) \ dx .$$

See here.

So $$ \begin{align} \int_{0}^{\pi /2} x^{3} \cot(x) \ dx &= 2 \sum_{n=1}^{\infty} \int_{0}^{\pi /2} x^{3} \sin (2nx) \ dx \\ &= 2 \sum_{n=1}^{\infty} \left(\frac{(-1)^{n-1} \pi^{3}}{16n} - \frac{(-1)^{n-1} 3\pi}{8n^{3}} \right) \\ &= \frac{\pi^{3}}{8} \ln (2) - \frac{3 \pi}{4} \eta(3) \\ &= \frac{\pi^{3}}{8} \ln (2) - \frac{9 \pi }{16} \zeta(3). \end{align}$$

And

$$ \begin{align} \int^{\pi /2}_{0} x \cot(x) \ dx &= 2 \sum_{n=1}^{\infty} \int_{0}^{\pi /2} x \sin(2nx) \ dx \\ &= -\frac{\pi}{2} \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n} \\ &= \frac{\pi \ln 2}{2} . \end{align}$$

Therefore,

$$ \begin{align} \int_{0}^{\pi /2} \frac{x^{4}}{\sin^{4} x} \ dx &= \frac{8}{3} \left( \frac{\pi^{3}}{8} \ln (2) - \frac{9 \pi }{16} \zeta(3) \right) - \frac{\pi^{3}}{12} + 4 \left(\frac{\pi \ln 2}{2} \right) \\ &= - \frac{\pi^{3}}{12} + 2 \pi \ln(2) + \frac{\pi^{3}}{3} \ln (2) - \frac{3 \pi}{2} \zeta(3) . \end{align}$$


For $n\in\mathbb{N}$ we have:

$$\int\limits_0^{\pi/2}\bigg(\frac{x}{\sin x}\bigg)^ndx=\sum\limits_{j=0}^{n-1}2^{n-j}\begin{bmatrix}n\\j+1\end{bmatrix}\sum\limits_{v=0}^j\binom{j}{v}(-n)^{j-v+1}\sum\limits_{l=1}^{\big\lfloor\frac{n+1}{2}\big\rfloor}\frac{(-1)^l\Big(\tfrac{\pi}{2}\Big)^{n-2l+1}}{(n-2l+1)!}f_n(2l-v),$$

with the Stirling numbers of the first kind $\begin{bmatrix}n\\k\end{bmatrix}$ defined by $\displaystyle\sum\limits_{k=0}^n\begin{bmatrix}n\\k\end{bmatrix}x^k:=\prod\limits_{k=0}^{n-1}(x+k),$

with $f_{2m-1}(s):=(-1)^{m-1}\beta(s),$ where $\beta(s)$ := Dirichlet $\beta$ function,

and $f_{2m}(s):=(-1)^{m-1}2^{-s}\eta(s),$ where $\eta(s)$ := Dirichlet $\eta$ function,

for $m\in\mathbb{N}$, with the analytical extensions $(s\in\mathbb{C})$

$$\begin{align} \beta(1-s)&=\bigg(\dfrac{2}{\pi}\bigg)^s\sin\bigg(\dfrac{\pi s}{2}\bigg)~\Gamma(s)~\beta(s) \\\\ \eta(1-s)&=\dfrac{2^s-1}{1-2^{s-1}}~\pi^{-s}\cos\bigg(\dfrac{\pi s}{2}\bigg)~\Gamma(s)~\eta(s) \end{align}$$

and with the simplifications $(k\in\mathbb{N}_0)$

$$\begin{align} \beta(-2k-1)~&=~0 \\\\ \beta(-2k)~&=~-\frac{2^{4k+1}}{2k+1}~B_{2k+1}\bigg(\frac{1}{4}\bigg) \\\\ \beta(2k+1)~&=~(-1)^{k-1}~\frac{(2\pi)^{2k+1}}{2(2k+1)!}~B_{2k+1}\bigg(\frac{1}{4}\bigg) \\\\ \eta(1-k)~&=~\frac{2^k-1}{k}~B_k \\\\ \eta(2k)~&=~(-1)^{k-1}~\frac{2^{2k-1}-1}{(2k)!}~B_{2k}~\pi^{2k} \\\\ \eta(2k+1)~&=~\bigg(1-\frac{1}{2^{2k}}\bigg)\zeta(2k+1) \end{align}$$


Examples include:

$$\begin{align} \int\limits_0^{\pi/2}\bigg(\frac{x}{\sin x}\bigg)^1dx~&=~2\beta(2)\approx1.83 \\\\ \int\limits_0^{\pi/2}\bigg(\frac{x}{\sin x}\bigg)^2dx~&=~\pi\ln2\approx2.178 \\\\ \int\limits_0^{\pi/2}\bigg(\frac{x}{\sin x}\bigg)^3dx~&=~-6\beta(4)+\bigg(\frac{3}{4}\pi^2+6\bigg)\beta(2)-\frac{3}{8}\pi^2\approx2.64 \\\\ \int\limits_0^{\pi/2}\bigg(\frac{x}{\sin x}\bigg)^4dx~&=~-\frac{3}{2}\pi\zeta(3)+\bigg(\frac{\pi^3}{3}+2\pi\bigg)\ln2-\frac{\pi^3}{12}\approx3.27 \\\\ \int\limits_0^{\pi/2}\bigg(\frac{x}{\sin x}\bigg)^5dx~&=~90\beta(6)-\bigg(\frac{45}{4}\pi^2+100\bigg)\beta(4)+\bigg(\frac{45}{192}\pi^4+\frac{25}{4}\pi^2+10\bigg)\beta(2)- \\ &-\bigg(\frac{55}{384}\pi^4+\frac{5}{8}\pi^2\bigg)\approx4.135 \end{align}$$


Integrating by parts, we have $$ \int \frac{x^2}{\sin^2 x} \, dx= -x^2 \cot x +\int 2x \cot x \, dx\\= -x^2 \cot x + 2x \ln \sin x - \int 2 \ln \sin x \, dx $$ Evaluating this between $0$ and $\pi/2$, we find that the boundary terms vanish (by taking the appropriate limits), so we are left with the well-known integral $$ -2 \int_0^{\pi/2} \ln \sin x \, dx =\pi \ln 2 $$

Edit: I have found a way to do $I_1$. Integrating by parts, $$ \int \frac{x}{\sin x} \, dx= x \ln \tan \frac{x}{2} - \int \ln \tan \frac{x}{2} \, dx $$ Evaluating between $0$ and $\pi/2$ yields $$ I_1 = -2 \int_0^{\pi/4} \ln \tan x \, dx\\ = -2 \int_{-\infty}^{0} x \frac{e^x}{1+e^{2x}} \, dx\\ = 2 \sum_{k \geq 0} (-1)^k\int_{0}^{\infty} x e^{-(2k+1)x} \, dx \\ = 2 \sum_{k \geq 0} (-1)^k \frac{1}{(2k+1)^2} \\ = 2C $$ as was to be proved.