I happened to find that the graphs of $\cos(\arctan(\tan x))$ and $\cos(x)$ are different. Why?
Is there something wrong with $\arctan(\tan x)=x$?
Thanks!
I happened to find that the graphs of $\cos(\arctan(\tan x))$ and $\cos(x)$ are different. Why?
Is there something wrong with $\arctan(\tan x)=x$?
Thanks!
The function $x \mapsto \tan x$ is $\pi$-periodic whereas $x \mapsto \cos x$ is $2\pi$-periodic. Now, $\arctan$ will land you somewhere in the interval $(-\frac{\pi}{2}, \frac{\pi}{2})$, even if your original $\theta$ does not lie in this interval. If $\cos$ were $\pi$-period then it would be fine, but since it isn't, it means that we have things like, for instance, $\cos(\arctan(\tan \pi)) = \cos(\arctan(0)) = \cos(0) = 1 \ne -1 = \cos \pi$ More precisely, if $x \in \left(\frac{(2n-1)\pi}{2}, \frac{(2n+1)\pi}{2} \right)$, then $\cos(\arctan(\tan x)) = x$ if and only if $n$ is even, or $-x$ if $n$ is odd, since $\cos(x+(2k+1)\pi)=-\cos x$.
Generally $\arctan(\tan x)=x+n\pi$ for some $n\in \mathbb{Z}$, and $n=0$ if and only if $x \in (-\frac{\pi}{2},\frac{\pi}{2})$.