<s>[INST] Solve the following trigonometric equation for x 
Solve $$ \sin^2x \tan x + \cot x \cos^2 x - \sin2x = 1 + \tan x + \cot x  $$

I converted the whole equation in $\sin x$ and $\cos x$ and after rearranging a bit I got $$ (\sin x + \cos x)(1-\sin x \cos x) - 2 \sin^2x \cos ^2x = \sin x \cos x +1 $$
I supposed $\sin x+\cos x $ to be equal to $ t$ and hence, $\sin x\cos x $ will be equal to $ \frac{(t^2-1)}2 $. 
Substituting the above values, I got the following equation
$$t^4+t^3-t^2-t+2=0$$
I am unable to find roots of this equation and have got no other way to proceed.
 [/INST] Let for the sake of writing less stuff $c=\cos x$ and $s = \sin x$.
Case 1: $cs \ne0$; we can multiply your equation by $cs$ without losing roots. We get
$$s^4 + c^4 - 2 s^2c^2 = sc + s^2+c^2$$
after that
$$(s^2+c^2)^2 - 4 s^2c^2 = sc + 1$$
or
$$4s^2c^2+sc=0.$$
Since $sc\ne0$, we get $4sc+1=0$, or, in terms of $x$, $ 2\sin 2x + 1=0$, which is easy to solve.
Cases 2: $cs=0$ is impossible, because otherwise either $\tan x$ or $\cot x$ is undefined.
</s>