I can verify easily that for $n=1$ and $2$ it's $0$, $3$ and $4$ nonzero, $4$ and $5$ $0$, etc. but it seems like there must be something deeper here (or at least a trick).
|
|
Apparently, this isn't an easy question. See here for $n \leq 10$. EDIT: As Jason pointed out below, the last paragraph on the linked page sketches the proof that the integral is non-zero iff $n$ $=$ $0$ or $3$ mod $4$ (that is, iff $n \in \lbrace 3,4,7,8,11,12,\ldots\rbrace$). |
|||||||||
|
|
Write $ 2 \cos ( k x) = e^{ k i x} + e^{- k i x} $. Hence we get (ignoring the multiplicative factor of $ 2^n $): $$ \int_0^{2\pi} \prod_{k=1}^n \left( e^{k i x} + e^{- k i x} \right) dx = \int_0^{2\pi} e^{-n(n+1)/ 2 \cdot i x} \prod_{k=1}^n \left( 1 + e^{2 k i x} \right) dx $$ The product will be a sum of terms, each term is either 1 (the first term) or of the form $ e^{2 \Sigma i x} $, where $ \Sigma $ runs over all linear combinations of elements of {$1, 2, \dots, n $} (which doesn't use any term more than once). When multiplied by $ e^{-n(n+1)/2 \cdot i x} $, the resulting integrand term will contribute either 0 or +1 to the final result depending on whether $ n(n+1) = 4 \Sigma $. So long as either $ n \equiv 0 $ or $ 3 $ modulo 4, we can find terms from $1,2,\dots,n$ such that their sum is any natural number less than $ n(n+1)/2 $ and hence so that $ n(n+1) = 4 \Sigma $. |
|||||||
|
|
Hint: Start as anon did with $$ \int_0^{2\pi}\prod_{k=1}^n\cos(kx)\,\mathrm{d}x =\int_0^{2\pi}e^{-i\frac{n(n+1)}{2}x}\prod_{k=1}^n(1+e^{i2kx})\,\mathrm{d}x\tag{1} $$ which would be $2\pi$ times the coefficient of $x^{n(n+1)/2}$ in $$ \prod_{k=1}^n(1+x^{2k})\tag{2} $$ $(2)$ is the number of ways to write $n(n+1)/2$ as the sum of distinct even integers $\le2n$. So $(1)$ is non-zero precisely when you can write $n(n+1)/2$ as the sum of distinct even integers $\le2n$ (a much simpler problem). |
||||
|
|
