I wanted to integrate $\int \cos x\cos 2x\cdots \cos nx \, dx$.
What I know is that $ \cos x\cos 2x\cdots \cos nx=\dfrac{1}{2^{n-1}}\sum_\pm \cos((n\pm(n-1)\pm\cdots\pm2\pm1)x)$ where the sum is over all $2^{n-1}$ possible $\pm$.
But quite obviously this is hard to integrate.
From this, I came to know about Werner's formula which I think quite less complicated to solve the above problem. But I don't know how to put this formula for an arbitrary $n$ for the given problem.
Thanks for helping me in advance.