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?

Rolles theorem does not apply here : For Rolles theorem you need two distinct real numbers $a$ and $b$ with $\ f(a)=f(b)\ $. Here, no such pair within the interval $\ [0,\frac{\pi}{2}]\ $ exists.
The correct way is using $\ f'(x)=1+\sin(x)>0\ $ to show that there is at most one solution and looking at the signs of $f(0)$ and $f(\frac{\pi}{2})$ to see that there is at least one solution.
