<s>[INST] Solve $\tan^2(x)+\tan(x)=2$ for $0\leq x\leq 2\pi$ I am trying to solve the trigonometric equation
$$\tan^2(x)+\tan(x)=2$$ for $0\leq x\leq 2\pi$. At first glance, I try to rearrange the trigonometric equation into something more manageable such that
\begin{align}
\frac{\sin^2(x)}{\cos^2(x)}+\frac{\sin(x)}{\cos(x)}&=2 \\
\sin^2(x)+\sin(x)\cos(x)=&2\cos^2(x).
\end{align}
I do not see how to progress from here. I have also tried using the Pythagorean identity $\tan^2(x)=\sec^2(x)-1$, but this did not seem to help. Any suggestions are appreciated.
 [/INST] Let $u = \tan(x)$
It follows that
$$\tan^2(x) + \tan(x) = 2 \iff u^2 + u - 2 = 0 \iff (u-1)(u + 2) = 0$$
$$\therefore \tan(x) = -2 \; \text{or} \; \tan(x) = 1$$
$$\therefore  x = \pi n - \tan^{-1}(2)\; \text{or} \; x = \frac{\pi}{4} + \pi n, \; n \in \mathbb{Z}$$
In the given domain $0 \le x \le 2\pi$, we have
$$x = \boxed{\pi - \tan^{-1}(2)} \approx 2.034$$
$$x = \boxed{2\pi - \tan^{-1}(2)} \approx 5.176$$
$$x = \boxed{\frac{\pi}{4}}$$
$$x = \boxed{\frac{5\pi}{4}}$$
$\blacksquare$
</s>