Evaluate Integral (Romanian Olympiad)

Solution 1:

If this is taken over $(0,2\pi)$ (or any multiple of this period):

By symmetry:

$$\int_0^{2\pi}\prod_1^{n}\cos^k kx\,dx=2\int_0^{\pi}\prod_1^{n}\cos^k kx\,dx$$

Now let $x\to \dfrac{\pi}{2}-x$ and denote the integral like so:

$$\int_{-\frac{\pi}{2}}^{ \frac{\pi}{2}}f(x)\,dx$$

Whenever $k$ is odd the transformation gives $\cos^k kx\to \pm\sin^k kx$ and $\cos^k kx\to \pm\cos^k kx$ otherwise. Hence $f$ is odd if there are an odd number of sines in the resulting product i.e. if there is an odd amount of odd numbers between $1$ and $n$.

Since there are exactly $1001$ odd $k$ such that $1\leq k\leq 2002$, the integrand is odd and therefore:

$$\int_0^{2\pi}\prod_1^{2002}\cos^k kx\,dx=0$$

Solution 2:

Assume the integral is from $0$ to $2\pi$. Then $$ \cos \left(m(\frac{\pi}{2}-z)\right)=(-1)^m \cos \left( m(\frac{\pi}{2}+z)\right) $$ so, if the integrand is $f(x)$, $$ f(\frac{\pi}{2}-x)=(-1)^N f(\frac{\pi}{2}+x), $$ where $$ N=1^2+2^2+\cdots+2002^2=2676679005 $$ is odd, so $$ f(\frac{\pi}{2}-x)=- f(\frac{\pi}{2}+x). $$ Then the portion of the integral from $\pi/2$ to $\pi$ cancels out the portion from $0$ to $\pi/2$. Also, the portion of the integral from $\pi$ to $3\pi/2$ equals $-\int_{-\pi/2}^0 f(x) \, dx$, which, since $f$ has period $2\pi$, equals $-\int_{3\pi/2}^{2\pi} f(x) \, dx$. Therefore the integral over $[0,2\pi]$ is $0$.