If $$I_{m}=\int^{2\pi}_{0}\cos x \cos (2x) \cos (3x)\cdots\cos(mx) \, dx.$$Then $m$ for which $I_m \neq 0$ is, where $m$ is any natural number
Options $(a)\; 5\;\; (b)\; 6\;\; (c)\; 7\;\; (d)\; 8$
Try: $$I_m = \frac 1 {2^m}\int^{2\pi}_0 \bigg[(e^{ix}+e^{-ix})(e^{2ix} + e^{-2ix}) \cdots (e^{imx}+e^{-mix})\bigg] \, dx$$
Could some help me to solve it , thanks in advance
You've made the right start. Using $\int_0^{2\pi}e^{ikx}dx=2\pi\delta_{k0}$ for any integer $k$, the challenge is finding $m$ so an $e^{0ix}$ term appears. Equivalently, there must be a way to write $1\pm 2\pm\cdots\pm m=0$, where each $\pm$ is independent. I'll leave it to you to verify by working modulo $2$ that this requires $m$ to be $0$ or $-1$ modulo $4$. I'll also leave it to you to show how to pull it off in each of those cases so (c) & (d) are correct.