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?
 A: Roots of the derivative are possible locations of minima or maxima.
That there is no root shows that $f$ is monotonous over the interval.
Now check the function values at the interval ends.

As $\cos x \simeq 1-\frac12x^2$ the roots are not too far from the solutions of the quadratic equation $x-2+\frac{x^2}2=0$ $\iff$ $(x+1)^2=3$ $\iff$ $x=-1\pm \sqrt3$, i.e., $x=0.73205...$ for the root in the interval.
A: 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.
A: 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})$.
