What is the maximum number of real roots of $f(x)=\sum\limits_{k=0}^n (\sin{k\theta})x^k$ where $n\in\mathbb{N}, \theta\in\mathbb{R}$ ?
Experimenting on desmos, it seems that when $n$ is odd, $f(x)$ can have at most three real roots; and when $n$ is even, $f(x)$ can have at most four real roots. If that is true, it would seem rather strange: why three and four?
Possibly related: a polynomial of the form $\sum\limits_{k=0}^n a_k x^k$, where $a_k=\pm1$, can have arbitrarily many distinct real roots.
Taking the hint from @MathStackexchangeisNotSoBad's comment, $\begin{aligned} f(x)&=\sum\limits_{k=0}^n (\sin{k\theta})x^k\\ &= \sum\limits_{k=0}^n \text{Im}\left(e^{k\theta i}\right) x^k\\ &= \text{Im}\sum\limits_{k=0}^n \left(e^{\theta i}x\right)^k\\ &= \text{Im}\left(\frac{1-\left(e^{\theta i}x\right)^{n+1}}{1-e^{\theta i}x}\right)\left(\frac{1-e^{-\theta i}x}{1-e^{-\theta i}x}\right)\\ &= \frac{x^{n+2}\sin{(n\theta)}-x^{n+1}\sin{((n+1)\theta)}+x\sin{\theta}}{1-2x\cos{\theta}}\\ \end{aligned}$
So the roots of $f(x)$ are the roots of $g(x)=x(x^n(x+A)+B)$ for some $A,B\in\mathbb{R}$.
From the graph of $y=g(x)$, it is easy to see that, when $n$ is even, $g(x)$ can have at most four real roots; and when $n$ is odd, $g(x)$ can have at most three real roots.
Then we show that these maximum numbers of roots are attainable by $f(x)$.
$f_1(x)=\sum\limits_{k=0}^3 \sin{\left(k\frac{\pi}{2}\right)}x^k=-x(x-1)(x+1)$ has three real roots.
$f_2(x)= \sum\limits_{k=0}^4 \sin{(k0.49\pi)}x^k=\sin{(1.96\pi)}x^4+\sin{(1.47\pi)}x^3+\sin{(0.98\pi)}x^2+\sin{(0.49\pi)}x$
$f_2(x)$ has (at least) four real roots, because of the following five facts.
Fact 1: $f_2(x)$ is continuous.
Fact 2: $f_2(0)=0$
Fact 3: ${f_2}'(0)=\sin{(0.49\pi)}>0$
Fact 4: $\lim\limits_{x\to\infty}f_2(x)=\lim\limits_{x\to-\infty}f_2(x)=-\infty$
Fact 5: $f_2(-2)>0$, because $\begin{aligned} f_2(-2)&=16\sin{(1.96\pi)}-8\sin{(1.47\pi)}+4\sin{(0.98\pi)}-2\sin{(0.49\pi)}\\ &=-16\sin{(0.04\pi)}+8\sin{(0.47\pi)}+4\sin{(0.02\pi)}-2\sin{(0.49\pi)}\\ &>-16(0.04\pi)+8\sin{(\pi/4)}+4\sin{0}-2\sin{(\pi/2)} \\ &=-0.64\pi+4\sqrt2-2\\ &>-(0.64)(4)+4(1.4)-2\\ &>0\\ \end{aligned}$