TITLE: On the integral $\int_0^{\frac{\pi}{2}}x^{2n+1}\cot(x)dx$
QUESTION [6 upvotes]: While investigating the function $$A(z)=\int_0^\frac{\pi}{2} \frac{\sin(zx)}{\sin(x)}dx$$ I stumbled upon the integral $$\int_0^{\frac{\pi}{2}}x^{2n+1}\cot(x)dx$$ when attempting to calculate the taylor series of $A(z)$ at $z=1$. As the coefficients of the even powers in the series reduce to integrating over a polynomial which is fairly trivial, the only real problem I have is in determining the the coefficients of the odd powers as I cannot seem to find a pattern between the coefficients. 
Wolfram Alpha evaluates the first couple of integrals as:
\begin{align*}
\int_0^\frac{\pi}{2} x\cot(x)dx&=\frac{\pi\ln(2)}{2}\\
\int_0^\frac{\pi}{2}x^3\cot(x)dx&=\frac{1}{16}(\pi^3\ln(4)-9\pi\zeta(3))\\
\int_0^\frac{\pi}{2}x^5\cot(x)dx&=\frac{1}{64}(-3\pi^3\zeta(3)+225\pi\zeta(5)+\pi^5\ln(4))
\end{align*}
and in general it seems that higher powers could also be calculated in terms of the zeta function, multiples of $\pi$, and $\ln(2)$. So far I have been unsuccessful in determining a pattern for these integrals but if anyone has any ideas I would be very grateful for any help on this.

REPLY [2 votes]: Continuing off of @mrtaurho's excellent answer, we may find another form for 
$$C_k(n)=\int_0^{\pi/2}x^{2n}\cos(2kx)\mathrm dx$$
for $n\in \Bbb N$. First, we note that 
$$C_k(n)=\frac1{(2k)^{2n+1}}\int_0^{k\pi}x^{2n}\cos(x)\mathrm dx$$
Then we integrate by parts with $\mathrm dv=\cos(x)\mathrm dx$:
$$C_k(n)=\frac1{(2k)^{2n+1}}x^{2n}\sin(x)\big|_0^{k\pi}-\frac{2n}{(2k)^{2n+1}}\int_0^{k\pi}x^{2n-1}\sin(x)\mathrm dx$$
$$C_k(n)=-\frac{2n}{(2k)^{2n+1}}\int_0^{k\pi}x^{2n-1}\sin(x)\mathrm dx$$
IBP once again,
$$C_k(n)=-\frac{2n}{(2k)^{2n+1}}\left[-x^{2n-1}\cos(x)\big|_0^{k\pi}+(2n-1)\int_0^{k\pi}x^{2n-2}\sin(x)\mathrm dx\right]$$
$$C_k(n)=(-1)^k\frac{2n(k\pi)^{2n-1}}{(2k)^{2n+1}}-\frac{2n(2n-1)}{(2k)^{2n+1}}C_k(n-1)$$
$$C_k(n)=(-1)^k\frac{n\pi^{2n-1}}{2^{2n}k^2}-\frac{2n(2n-1)}{(2k)^{2n+1}}C_k(n-1)$$
So we have that 
$$\mathfrak{I}(n)=\left(\frac\pi2\right)^{2n+1}\log2-\frac{n(2n+1)}{4^n}\pi^{2n-1}\eta(3)-\frac{n(2n+1)(2n-1)}{4^n}\sum_{k\geq1}\frac{C_k(n-1)}{k^{2n+2}}$$
Which doesn't seem to give any sort of recurrence relation... :(
If I think of any new approaches I'll update my answer.