For $x\in(3\pi/2,5\pi/2)$ how can one find the values of $k$ such that $\arctan(\tan(x)) = x+k\pi$? Let $x\in( 3\pi/2, 5\pi/2)$
We know that $$\arctan(\tan(x))=x+k\pi$$
How one can find the values of $k$?
 A: We have $\arctan(\tan(x))=x$ for $-\frac\pi 2<x<\frac\pi 2$, and $\tan(x)=\tan(x-2\pi)$, consequently, for $\frac 32\pi<x<\frac 52x$ we have
\begin{align}
\arctan(\tan(x))
&=\arctan(\tan(x-2\pi))\\
&=x-2\pi
\end{align}
Note that $k=2$ is the only value which makes $-\frac\pi 2<x-k\pi<\frac\pi 2$.
A: We know that $\arctan{(\tan{x})} = x$ is true only for $-\pi/2 \leq  x \leq \pi/2$, as the range of $\arctan$ is restricted to this interval. Also, $\tan(x+k\pi) = \tan{x}$ for any integer $k$, since the tangent has period $\pi$. So $$\arctan(\tan{x}) = \arctan(\tan(x+k\pi)) = x + k\pi$$ only for $$-\pi/2 \leq  x + k\pi \leq \pi/2,$$ or $$-\pi/2 - k\pi \leq  x \leq \pi/2 - k\pi.$$ This last interval is your interval  $(3\pi/2,\,5\pi/2)$, i.e., $$3\pi/2 \leq x \leq 5\pi/2$$ only if $k$ is chosen such that $-\pi/2 - k\pi = 3\pi/2$, and $\pi/2 - k\pi = 5\pi/2$, the only solution of which is $k = -2$. Thus, $$\arctan(\tan{x}) = x + k\pi ~~ {\text{for}} ~~ x \in (3\pi/2,\,5\pi/2)$$ only if $k = -2$, as was also concluded in the earlier answer of @Fabio Lucchini.
