Q. Let $S=\left\{\theta \in(0,2 \pi): 7 \cos ^2 \theta-3 \sin ^2 \theta-2\right.$ $\left.\cos ^2 2 \theta=2\right\}$. Then, the sum of roots of all the equations $x^2-2\left(\tan ^2 \theta+\cot ^2 \theta\right) x+6 \sin ^2 \theta=0$ $\theta \in S$, is
Solution: