Let $f(x) = \log_{10} \left(\sin(\pi x) \cdot \sin(2 \pi x) \cdot \sin (3 \pi x) \cdots \sin(8 \pi x)\right)$. The intersection of the domain of $f(x)$ with the interval $[0,1]$ is a union of $n$ disjoint open intervals. What is $n$? $\textbf{(A)}\ 2 \qquad$ $ \textbf{(B)}\ 12 \qquad$ $ \textbf{(C)}\ 18 \qquad$ $ \textbf{(D)}\ 22 \qquad$ $ \textbf{(E)}\ 36$
Solution
$x$ is in the domain of $f$ exactly when $P(x)=\prod_{k=1}^8\sin(k\pi x)>0$. So $n$ is the number of maximal open intervals in $(0,1)$ on which $P>0$ (the points where $P=0$ are removed, so even a zero where the sign does not change separates two intervals).
$\sin(k\pi x)=0$ in $(0,1)$ iff $x=\frac mk$. So the zeros of $P$ are the fractions $\frac pq$ in lowest terms with $2\le q\le8$: there are $\sum_{q=2}^8\varphi(q)=1+2+2+4+2+6+4=21$ of them, cutting $(0,1)$ into $22$ intervals.
At $x=\frac pq$ (lowest terms) the factors $\sin(k\pi x)$ with $q\mid k\le8$ vanish, which is $\lfloor 8/q\rfloor$ factors, each with a simple zero. So $P$ changes sign at $\frac pq$ iff $\lfloor8/q\rfloor$ is odd. Now $\lfloor 8/q\rfloor=4,2,2$ for $q=2,3,4$ (even: no sign change) and $=1$ for $q=5,6,7,8$ (odd: sign change).
Near $x=0^+$ all factors are positive, so $P>0$ on the first interval. List the $21$ zeros in increasing order, marking sign changes (F) and non-changes (N):\par\smallskip \noindent $\frac18$F, $\frac17$F, $\frac16$F, $\frac15$F, $\frac14$N, $\frac27$F, $\frac13$N, $\frac38$F, $\frac25$F, $\frac37$F, $\frac12$N, $\frac47$F, $\frac35$F, $\frac58$F, $\frac23$N, $\frac57$F, $\frac34$N, $\frac45$F, $\frac56$F, $\frac67$F, $\frac78$F.
The sign on the $i$-th interval ($i=0,\dots,21$) is $(-1)^{\#F\text{ before it}}$. Counting, the signs of the $22$ intervals in order are\par\smallskip\noindent $+,-,+,-,+,+,-,-,+,-,+,+,-,+,-,-,+,+,-,+,-,+$.
Let $f(x)=\log_{10}(\sin(\pi x)\cdot\sin(2\pi x)\cdots\sin(6\pi x))$. The intersection of the domain of $f$ with $[0,1]$ is a union of $n$ disjoint open intervals. What is $n$?