<s>[INST] Number of solutions of $\sin (2x)+\cos (2x)+\sin x+\cos x=1$ Find Number of solutions of $\sin (2x)+\cos (2x)+\sin x+\cos x=1$ in $\left [0 \:\: 2\pi\right]$
The equation can be written as:
$$\sin (2x)+1-2 \sin^2x+\sin x+\cos x=1$$ $\implies$ 
$$\sin x+\cos x=2\sin^2 x-2 \sin x\cos x$$ $\implies$
$$\sin x+\cos x=2\sin x\left(\sin x-\cos x\right)$$
$\implies$
$$\frac{\sin x+\cos x}{\sin x-\cos x}=2\sin x$$ $\implies$
$$\frac{1+\tan x}{1-\tan x}=-2\sin x$$
$$\tan \left(\frac{\pi}{4}+x\right)=-2\sin x$$
Now i have drawn the graphs of  $\tan \left(\frac{\pi}{4}+x\right)$ and $-2\sin x$ and observed there are two solutions.
is there any other way?
 [/INST] Another way would be to let $t=\tan(\frac x2)$ and arrive to $$t^4+2 t^3+8 t^2-6 t-1=0$$ Now, using the formulae for the quartic equation, the discriminant is $\Delta=-309248$ which shows that the equation has two distinct real roots and two complex conjugate non-real roots.
</s>