A calculus tutorial on how to find the first derivative of \( f(x) = \arctan(\tan(x)) \) and graph \( f \) and \( f' \) in its natural domain.
\( f(x) \) is defined for all values \( x \in \mathbb{R} \) except \( x = \dfrac{\pi}{2} + k\pi \), where \( k \) is an integer.
Since \( \tan(x) \) is periodic, \( f(x) = \arctan(\tan(x)) \) is also a periodic function.
As \( x \) increases from \( -\frac{\pi}{2} \) to \( \frac{\pi}{2} \) (exclusive), \( \tan(x) \) increases from very small values (\(-\infty\)) to very large values (\(+\infty\)), and \( \arctan(\tan(x)) \) increases from \( -\frac{\pi}{2} \) to \( \frac{\pi}{2} \) (exclusive), since \( \tan(x) \) is undefined at \( -\frac{\pi}{2} \) and \( \frac{\pi}{2} \). In fact, for \( x \in (-\frac{\pi}{2}, \frac{\pi}{2}) \), we have \( \arctan(\tan(x)) = x \).
Since \( \tan(x) \) has a period of \( \pi \), \( \arctan(\tan(x)) \) also has a period of \( \pi \). The graph below shows the graphs of \( \arctan(\tan(x)) \) and \( \tan(x) \) from \( -\frac{\pi}{2} \) to \( \frac{3\pi}{2} \).
Domain of \( f \): \( \mathbb{R} - \left\{ \frac{\pi}{2} + k\pi,\ k \in \mathbb{Z} \right\} \)
Range of \( f \): \( \left( -\frac{\pi}{2}, \frac{\pi}{2} \right) \)
The graph below shows the graphs of \( \arctan(\tan(x)) \) over three periods.
\( f(x) \) is a composite function, and the derivative is computed using the chain rule as follows:
Let \( u = \tan(x) \), hence \( f(x) = \arctan(u(x)) \).
Apply the chain rule of differentiation:
\[ f'(x) = \frac{du}{dx} \cdot \frac{d}{du}(\arctan(u)) = \frac{1}{\cos^2(x)} \cdot \frac{1}{u^2 + 1} \]
Substitute \( u = \tan(x) \): \[ f'(x) = \frac{1}{\cos^2(x)} \cdot \frac{1}{\tan^2(x) + 1} \]
Since \( 1 + \tan^2(x) = \frac{1}{\cos^2(x)} \), \[ f'(x) = 1, \quad \text{for } x \neq \frac{\pi}{2} + k\pi, \; k \in \mathbb{Z}. \]
Below is shown \( \arctan(\tan(x)) \) in red and its derivative in blue. Note that the derivative is undefined for values of \( x \) for which \( \cos(x) = 0 \), that is, at \( x = \frac{\pi}{2} + k\pi \), where \( k \) is an integer. Also, \( f(x) \) itself is undefined at these same points.