TITLE: How many times does the function $f(x)=\cos x\cdot\cos \frac x2\cdot\cos \frac x3\dots\cos \frac x{2009}$ change sign?
QUESTION [5 upvotes]: How many times function
  $$f(x)=\cos x\cdot\cos\frac x2\cdot\cos\frac x3\cdots\cos\frac x{2009}$$
  change sign on interval $\left[0,\dfrac{2009\pi}{2}\right]$?

My attempt
Function $f(x)$ change sing at $f(x)=0$, so we just need to find number of solutions of
$$\cos x=0\lor\cos\dfrac x2=0\lor\dots\lor\dfrac x{2009}=0$$
on given interval. Equation
$$\cos x=0$$
has solutions
$$x=\dfrac\pi2+k\pi,k\in\mathbb{Z}$$
First solution is $\dfrac\pi2$ for $k=0$. I tried to find last solution:
$$\dfrac\pi2+k\pi\le\dfrac{2009\pi}2$$
which gives us $k\le1004$, so we have $1005$ solution. Then I tried to do this for $\cos\dfrac x2$, then for $\cos \dfrac x3$ and so on to find how many solution of that are same as solutions of $\cos x=0$, but I think this is not an easy way. Is there a simple way to solve this?

REPLY [3 votes]: Every root of $f(x)$ in the given interval is a number of the form $\xi_n=n\cdot\frac{\pi}{2}$ where $n$ is an odd integer number between $1$ and $2009$. Moreover, $\xi_n$ is a root of multiplicity:
$$ \sum_{\substack{d|n \\ d\text{odd}}} 1 = \sigma_0\left(\frac{n}{2^{\nu_2(n)}}\right) $$
and since $\sigma_0$ is a multiplicative function, $\sigma_0(m)$ is odd iff $m$ is a square. So we just have to count how many numbers in $[1,2009]$ are a square or twice a square, leading to:
$$\left\lfloor\sqrt{2009}\right\rfloor + \left\lfloor\sqrt{\frac{2009}{2}}\right\rfloor = 75 $$
as wanted.