Assume we are given an arbitrary trigonometric polynomial equation $$ f(\theta)=\sum^{n}_k(a_k cos(k\theta)+b_k sin(k\theta))=0, \ \ $$ where $\theta\in[0, 2\pi)$ and $a_k, b_k$ is real . I would like to ask:
Is there an approach that we can decide the number of real solutions given $\{a_k,b_k\}$?
Is there an approach that we can find out the analytical representation of real solutions?
This can be solved with the substitution $z = \tan\left(\dfrac{\theta}{2}\right)$
You can show that
$ \cos \theta = \dfrac{ 1 - z^2}{1 + z^2} $
$ \sin \theta = \dfrac{2z}{1 + z^2} $
Then you would have
$ \cos(n \theta) = \cos(\theta + (n-1) \theta) = \cos \theta \cos((n-1)\theta) - \sin(\theta) \sin( (n-1) \theta) ) $
and
$ \sin(n \theta) = \sin(\theta +(n-1) \theta) = \sin \theta \cos((n-1)\theta) + \cos \theta \sin((n-1) \theta) )$
So you can generate rational function of $z$ to express your function $f(\theta)$
Multiplying through by the least common denominator, generates a polynomial in $z$ which can be solved using well-established numerical methods.