Find the roots of the equation $(1+\tan^2x)\sin x-\tan^2x+1=0$ which satisfy the inequality $\tan x<0$ Find the roots of the equation $$(1+\tan^2x)\sin x-\tan^2x+1=0$$ which satisfy the inequality $$\tan x<0$$
Shold I solve the equation first and then try to find which of the roots satisfy the inequality? Should I use $\tan x$ in the solution itself and obtain only the needed roots?
I wasn't able to see how the inequality can be used beforehand, so I solved the equation. For $x\ne \dfrac{\pi}{2}(2k+1),k\in\mathbb{Z}$, the equation is $$\dfrac{\sin^2x+\cos^2x}{\cos^2x}\sin x-\left(\dfrac{\sin^2x}{\cos^2x}-\dfrac{\cos^2x}{\cos^2x}\right)=0$$ which is equivalent to $$\sin x+\cos2x=0\\\sin x+1-2\sin^2x=0\\2\sin^2x-\sin x-1=0$$ which gives for the sine $-\dfrac12$ or $1$. Then the solutions are $$\begin{cases}x=-\dfrac{\pi}{6}+2k\pi\\x=\dfrac{7\pi}{6}+2k\pi\end{cases}\cup x=\dfrac{\pi}{2}+2k\pi$$ How do I use $\tan x<0$?

$\frac\pi2+2k\pi$ should never appear because the initial equation is not defined when $\cos x=0.$
You forgot a $-$ sign in front of $\frac{5\pi}6+2k\pi.$
As for your final question: simply discard $-\frac{5\pi}6+2k\pi$ (whose $\tan$ is $>0$) and retain $-\frac\pi6+2k\pi$ (whose $\tan$ is $<0$).
