Find Derivative of \( f(x) = \arccos(\cos(x)) \) and Graph It

A calculus tutorial on how to find the first derivative of \( f(x) = \arccos(\cos(x)) \) and graph \( f \) and \( f' \) for \( x \in \mathbb{R} \).

Graphs of \( \cos(x) \) and \( \arccos(\cos(x)) \)

Since the domain of \( f \) is \( \mathbb{R} \) and \( \cos(x) \) is periodic, then \( f(x) = \arccos(\cos(x)) \) is also a periodic function.

As \( x \) increases from \( 0 \) to \( \pi \), \( \cos(x) \) decreases from \( 1 \) to \( -1 \), and \( \arccos(\cos(x)) \) increases from \( 0 \) to \( \pi \). In fact, for \( x \in [0, \pi] \), \( \arccos(\cos(x)) = x \). As \( x \) increases from \( [\pi, 2\pi] \), \( \cos(x) \) increases from \( -1 \) to \( 1 \), and \( \arccos(\cos(x)) \) decreases from \( \pi \) to \( 0 \).

Since \( \cos(x) \) has a period of \( 2\pi \), \( \arccos(\cos(x)) \) also has a period of \( 2\pi \). The graph below shows the graphs of \( \arccos(\cos(x)) \) and \( \sin(x) \) from \( 0 \) to \( 2\pi \).

Graph of cos(x) and arccos(cos(x)) over one period

The graph below shows the graphs of \( \arccos(\cos(x)) \) and \( \cos(x) \) over 3 periods.

Graph of cos(x) and arccos(cos(x)) over 3 periods

Domain of \( f \): \( (-\infty, +\infty) \)
Range of \( f \): \( [0, \pi] \)

Derivative of \( f(x) = \arccos(\cos(x)) \) and Its Graph

\( f(x) \) is a composite function, and the derivative is computed using the chain rule as follows. Let \( u = \cos(x) \), hence \( f(x) = \arccos(u(x)) \).

Apply the chain rule of differentiation:

\[ f'(x) = \frac{du}{dx} \cdot \frac{d(\arccos(u))}{du} = (-\sin(x)) \cdot \left(-\frac{1}{\sqrt{1 - u^2}}\right) \]

Substitute \( u = \cos(x) \): \[ f'(x) = \sin(x) \cdot \frac{1}{\sqrt{1 - \cos^2(x)}} \]

Simplify: \[ f'(x) = \frac{\sin(x)}{\sqrt{\sin^2(x)}} = \frac{\sin(x)}{|\sin(x)|} \]

Below is shown \( \arccos(\cos(x)) \) in red and its derivative in blue. Note that the derivative is undefined for values of \( x \) for which \( \sin(x) = 0 \), that is, at \( x = k\pi \), where \( k \) is an integer. For these same values of \( x \), \( \arccos(\cos(x)) \) has either a maximum value equal to \( \pi \) or a minimum value equal to \( 0 \).

Note that although \( \arccos(\cos(x)) \) is continuous for all values of \( x \), its derivative is undefined at \( x = k\pi \).

Graph of arccos(cos(x)) and its first derivative

More References and links

Graphing arccos(x) functions
differentiation and derivatives