How do you find the exact value of arctan(tanx)?

Aug 30, 2015

$\arctan \left(\tan x\right) = x - \pi \left\lfloor \frac{x + \frac{\pi}{2}}{\pi} \right\rfloor$

which simplifies to

$\arctan \left(\tan x\right) = x$ if $x \in \left(- \frac{\pi}{2} , \frac{\pi}{2}\right)$

Explanation:

If $x \in \left(- \frac{\pi}{2} , \frac{\pi}{2}\right)$ then $\arctan \left(\tan x\right) = x$

Otherwise we need to add some integer multiple of $\pi$ to $x$ to bring it into this range.

Using the floor function, we can write:

$\arctan \left(\tan x\right) = x - \pi \left\lfloor \frac{x + \frac{\pi}{2}}{\pi} \right\rfloor$

Here's a graph of $\arctan \left(\tan \left(x\right)\right)$ :

graph{3pi/5(abs(sin(x/2+pi/4))-abs(cos(x/2+pi/4))-1/6(abs(sin(x/2+pi/4)^3))+1/6(abs(cos(x/2+pi/4)^3)))(tan(x/2+pi/4)/abs(tan(x/2+pi/4))) [-5, 5, -2.5, 2.5]}

...