# closed form for $\int_{0}^{1/2}\frac{x\cos\left(x\pi\right)^{2}\cos\left(2\pi kx\right)}{\sin\left(x\pi\right)}dx,k\in \mathbb{N}$

I would know if exists a closed form for $$\int_{0}^{1/2}\frac{x\cos^{2}\left(\pi x\right)\cos\left(2\pi kx\right)}{\sin\left(\pi x\right)}dx,k\in\mathbb{N}.$$I tried integration by parts without success.

• Yes, for each positive integer $k$ there is a closed form in terms of the Catalan constant. – GEdgar Feb 27 '15 at 16:35
• is it cos squared or cos of pix squared?? – RE60K Feb 27 '15 at 16:35
• Just compute $I_k-I_{k-1}$, the denominator is then cancelled giving a classic integral to evaluate. – Olivier Oloa Feb 27 '15 at 16:38
• @ADG Now it's more clear. Thank you. – Logger Feb 27 '15 at 16:47

We have: $$I_k=\int_{0}^{1/2}\frac{x\cos\left(\pi x\right)^{2}\cos\left(2\pi kx\right)}{\sin\left(\pi x\right)}dx=\frac{1}{\pi^2}\int_{0}^{\pi/2}\frac{x\cos^2 x\cos(2kx)}{\sin x}\,dx$$ where $$I_0 = \frac{2K-1}{\pi^2}$$ ($K$ is the Catalan constant) and: $$I_{k+1}-I_k = -\frac{2}{\pi^2}\int_{0}^{\pi/2}x\cos^2 x\sin((2k+1)x)\,dx=-\frac{2}{\pi^2}\frac{(2-24 k (1+k))(-1)^k}{\left(3-2 k \left(-1+6 k+4 k^2\right)\right)^2}$$ hence:
$$I_k = \frac{2K-1}{\pi^2}-\frac{4}{\pi^2}\sum_{n=1}^{k}\frac{(-1)^n(12n^2-12n-1)}{(8n^3-12n^2-2n+3)^2}.$$
• By decomposition into partial fractions, we have $~\displaystyle\sum_{n=1}^\infty(-1)^n\frac{12n^2-12n-1}{(8n^3-12n^2-2n+3)^2} ~=~ \dfrac K2-\dfrac14$ which is hardly surprising, since the integral should converge to $0$ for $k\to\infty$ by the Riemann-Lebesgue lemma. – Lucian Feb 27 '15 at 18:48