How to solve $\sqrt{\tan x}=1$ without squaring? Problem:
$$\sqrt{\tan x}=1$$
Solution (with squaring):
$$\sqrt{\tan x}=1$$
$$\tan x=1$$
$$x=n\pi+\frac{\pi}{4}\tag{1}$$
1. $(i)$ contains extraneous roots. How do I filter them out?
2. How do I solve for $x$ without squaring?
 A: The following $2$ cases are definitely different from each other:
$$\require{cancel} A=B\hspace{1em}\cancel{\hspace{-1em}{\iff}\hspace{-1em}}\hspace{1em}A^2=B^2$$
Because, if $A$ and $B$ have opposite signs, then the statement fails.
The correct statement should be:
$$\left|A\right|=\left|B\right|\iff A^2=B^2$$

However, the statement $\sqrt {A}=B$ immediately tells us that $A,B≥0$.
This is based on the following definition:
$$\sqrt {x^2}=|x|≥0,\thinspace x\in\mathbb R$$
Thus we have,
$$\left|\sqrt{A}\right|=\left|B\right|\iff \sqrt A=B$$
This follows,
$$\sqrt A=B\iff A=B^2$$
where $A,B≥0$.
This means, in this case we don't have extraneous roots.
A: We don't need squaring since we know that

$$\sqrt A=1 \iff A=1$$

therefore
$$\sqrt{\tan x}=1 \iff \tan x=1 \iff x=\frac \pi 4 +n\pi$$
and we don't have extraneous solutions.

Edit
In case we want obtain the solution by squaring, we have in general that for $A>0$ and $B>0$
$$\sqrt A = B \iff A=B^2$$
and for this reason, also proceeding in this way, we don't have extraneous solutions.
A: 
$$\sqrt{\tan x}=1\\\tan x=1\\x=n\pi+\frac{\pi}{4}$$

You have shown that $$\sqrt{\tan x}=1\implies\tan x=1\implies x=n\pi+\frac{\pi}{4}$$ (the given equation's implicit condition that $\tan x\ge0$ justifies $\left(\sqrt{\tan x}\right)^2=\tan x$ in the first step).
But notice also that $$x=n\pi+\frac{\pi}{4}\implies\tan x=1\implies\sqrt{\tan x}=1$$ (taking principal square root in the last step).
Therefore, in this example, all three lines are equivalent to one another; so, no extraneous root has been created. Hence, squaring does not necessarily create extraneous roots.
