Suppose that $f(x)$ is differentiable everywhere such that
$f(0) = 2$, $f(\pi)=4$ and $f'(x)\ge\sin(x)\quad \forall x.$
then prove that $f(x) = 3-\cos(x)$ for all $x \in [0, \pi]$
Suppose that $f(x)$ is differentiable everywhere such that
$f(0) = 2$, $f(\pi)=4$ and $f'(x)\ge\sin(x)\quad \forall x.$
then prove that $f(x) = 3-\cos(x)$ for all $x \in [0, \pi]$
Hint: let $\,g(x)=f(x)-3+\cos(x)\,$, then the problem can be restated as "given $\,g(0)=g(\pi)=0\,$ and $\,g'(x)\ge 0\,$ then prove that $\,g(x) = 0\,$ on $\,[0,\pi]\,$".