If
\[
S=\left\{\theta\in\left[\frac{\pi}{2},\frac{3\pi}{2}\right]:\cos^2\theta+\sin\theta\tan\theta=\cos2\theta\right\,
\]
then
\[
\sum_{\theta\in S}(\sin\theta+\cos\theta)=
\]
Show Hint
Whenever \(\tan\theta\) appears with \(\sin\theta\) and \(\cos\theta\), convert everything into \(\sin\theta\) and \(\cos\theta\). This often reduces the equation to a simple factorization.