# What are the absolute extrema of  f(x)= cos(1/x)−xsin(1/x) in [-1/pi,1/pi]?

Jul 2, 2017

An infinite number of relative extrema exist on $x \in \left[- \frac{1}{\pi} , \frac{1}{\pi}\right]$ are at $f \left(x\right) = \pm 1$

#### Explanation:

First, let's plug the endpoints of the interval $\left[- \frac{1}{\pi} , \frac{1}{\pi}\right]$ into the function to see the end behavior.

$f \left(- \frac{1}{\pi}\right) = - 1$

$f \left(\frac{1}{\pi}\right) = - 1$

Next, we determine the critical points by setting the derivative equal to zero.

$f ' \left(x\right) = \frac{1}{x} \cos \left(\frac{1}{x}\right) + \frac{1}{{x}^{2}} \sin \left(\frac{1}{x}\right) - \sin \left(\frac{1}{x}\right)$

$\frac{1}{x} \cos \left(\frac{1}{x}\right) + \frac{1}{{x}^{2}} \sin \left(\frac{1}{x}\right) - \sin \left(\frac{1}{x}\right) = 0$

Unfortunately, when you graph this last equation, you get the following

Because the graph of the derivative has an infinite number of roots, the original function has an infinite number of local extrema. This can also be seen by looking at the graph of the original function.

However, none of them ever surpass $\pm 1$