I have solved for my students of an high school this simple trigonometric equation:
$$\tan(\pi+6x)=-\tan(2x)\tag 1$$
The $(1)$ is equivalent to (I remember also that $\tan(\alpha)=\tan(\mathbb Z\pi+\alpha)$)
$$\tan(\pi+6x)=\tan(-2x)\tag 2 \iff x=\frac{\pi}{8}k^*, \quad k^*=k-1\in\Bbb Z$$
But the solution of the textbook is $x=k\pi/8$ with $k\neq 4h+2$.
How can I find the value $\color{red}{4h+2}$?
If I calculate the domain I will have
$$\begin{cases} x \neq -\dfrac \pi{12}+\Bbb Z\dfrac \pi{6}\\[0.5em] \tag 3 x\neq \dfrac \pi4+\Bbb Z\dfrac\pi2 \end{cases}$$
I have done the tests and the condition $4h+2$ is equivalent to $(3)$. Just a curiosity looking the 2nd negation of the $(3)$ I have the denominator $4$ and $2$.
The constrains come from the domain of tangent function. The domains of $\tan x$ excludes $k\pi+\frac{\pi}{2}$, there are constrains placed on $\tan2x$ and $\tan 6x$, where $k,m,n,h \in \mathbb Z$.
For $\tan 2x$, we have $$2x \neq m\pi +\frac{\pi}{2}$$ with $x\neq \frac{(2m+1)\pi}{4}$.
For $\tan 6x$, we have $$6x \neq n\pi+\frac{\pi}{2}$$ with $x \neq \frac{(2n+1)\pi}{12}$.
Or
$k\pi/8 \neq\frac{(2m+1)\pi}{4}$, $k\neq 2(2m+1) =4m+2, \quad (A)$;
$k\pi/8 \neq\frac{(2n+1)\pi}{12}$, $k\neq \frac{2(2m+1)}{3} \equiv \frac{4m+2}{3} \quad (B)$.
If (A) is satisfied, so is (B).
Therefore, The solutions are
$$x = \frac{k\pi}{8}$$ with $k\neq 4h+2$