Absolute max and min, inverse of function $f(x) = \sin x − x \cos x$ Let $f(x) = \sin x − x \cos x$, $0 \le x \le \pi$. Find the absolute maximum and
the absolute minimum of f. Hence, or otherwise, determine the range
of f. Finally, determine whether f has an inverse or not. You need not
find the formula of the inverse function if exists.
I can find that the critical points are at $x=0$ and $x=\pi$ but when I do the sign test the abs max and min are also =0 What does this mean? 
 A: $f$ is continuous, $\lim\limits_{k \to +\infty} f(2k \pi)=-\infty$ and $\lim\limits_{k \to -\infty} f(2k \pi)=+\infty$. Hence the range of $f$ is $\mathbb R$.
Also, $f$ vanishes for an infinite number of values as for $k \in \mathbb N$, you have $f(2k \pi)=-2k \pi <0$ and $f(2k \pi + \pi)=2k \pi + \pi >0$. Consequently, $f$ is not injective and do not have an inverse.
Now considering the interval $[0,\pi]$, which I saw a bit late is the original question...
You have $$f^\prime(x)=\cos x -\cos x +x \sin x=x \sin x$$ which is stricly positive in $(0,\pi)$. So $f$ is strictly increasing on $(0,\pi)$. As $f$ is continuous, $f$ is a bijection from $(0, \pi)$ to $f[(0,\pi)]=(0,\pi)$. And as $f(0)=0$ and $f(\pi)=\pi$, $f$ is a bijection from $[0,\pi]$ to itself.
A: As I mentioned in other comments, I believe you plugged the values in $f'$ instead of $f$. As a matter of fact,
$$
f(0) = 0,\qquad f(\pi) = \pi
$$
Hence the maximum is $\pi$ and the minimum is 0.
For the inverse existence, a sufficient condition is that the function be strictly increasing or strictly decreasing on the whole domain. Can you prove that?
