Let $f$ be a continuous function in $[0,2]$ and differentiable in $(0,2)$, such that $|f'(x)|\leqslant1$ for all $x\in(0,2)$ and also $f(0)=1=f(2)$.
Prove that $f(x)\geqslant0$ for all $x\in(0,2)$.
My approach is to use Intermediate Mean value theorem and then we get, that there exists a point $c\in(0,2)$ such that $|f'(c)|=0$, so $c$ is local extreme. If $c$ is local minimum than the proof is straight forward, bit I have difficulties proving if $c$ is local maximum.
I also need to be sure that I can continue in this way or I need another way to prove the statement.
Thanks a lot!
For any $\,x\in(0,1]\,,\,$ by applying Intermediate Mean Value Theorem to the function $\,f\,$ on the interval $\,[0,x]\,,\,$ we get that there exists $\,c_x\in(0,x)\subseteq(0,1)\,$ such that $\;f(x)-f(0)=f’(c_x)\cdot\!x\;,\;\;$ consequently ,
$f(x)=f(0)+f’(c_x)\cdot\!x\geqslant1-|f’(c_x)|\!\cdot\!x\geqslant1-x\geqslant0\,.$
So, $\;f(x)\geqslant0\;$ for any $\,x\in(0,1]\,.$
Analogously, for any $\,x\in(1,2)\,,\,$ by applying Intermediate Mean Value Theorem to the function $\,f\,$ on the interval $\,[x,2]\,,\,$ we get that there exists $\,d_x\in(x,2)\subseteq(1,2)\,$ such that $\;f(2)-f(x)=f’(d_x)\cdot\!(2-x)\;,\;\;$ consequently ,
$\begin{align}f(x)&=f(2)-f’(d_x)\cdot\!(2-x)\geqslant1-|f’(d_x)|\!\cdot\!(2-x)\geqslant\\[3pt]&\geqslant1-(2-x)=x-1>0\,.\end{align}$
So, $\;f(x)>0\;$ for any $\,x\in(1,2)\,.$
Hence, $\;f(x)\geqslant0\;\;$ for any $\,x\in(0,2)\,.$