Rolles Theorem - problem with interval I am trying to show that there is only one solution for the equation $x-\cos x = 1$ in the interval $]0,\frac{\pi}{2}[$.
Using $f(x) = x-\cos x -1 = 0$, I took the derivative $1 + \sin x$.
Now I would expect to find solutions for $1 + \sin x = 0$  within the interval, but the next candidate to the left is $-\frac{\pi}{2}$, which is outside of the interval - this does not prove the existence of a solution within the interval, does it?.
What am I doing wrong?

Let $f(x)=x-\cos(x)-1$ .
we use the reasoning absurd and we
assume there are two roots $a$ and $\; b$ in $(0,\frac{\pi}{2})$ such that
$f(a)=f(b)=0.$
$f$ is continuous at $[a,b]$ and
 diffetentiable at $(a,b)$, thus using Rolle's theorem, there will exist $c\in(a,b)\subset (0,\frac{\pi}{2})$ such that
$f'(c)=1+\sin(c)=0$ which is in contradiction with $\;\;\sin(c)>0$.
So, there is only one root in $(0,\frac{\pi}{2})$.
