Application of mean value and Rolle's theorems - twice differentiable functions Let $f$ be a function from $[a,b]$ to $\Bbb{R}$ that is twice-differentiable (that is, $f'$ and $f''$ exist), and assume that $f(a) = f(b) = 0$ and $f''(x) \leq 0$ for every $x\in (a,b)$. Show that $f(x) \geq 0$ on $[a,b]$.
I think we must use the mean value/ Rolle's theorems There will be a $c$ in $(a,b)$ such that $f'(c) = \frac{f(a) - f(b)}{b-a}= 0$. Where do I go from here?
Any help will be appreciated!
 A: Assume that $f(c) < 0$ for some $c \in (a, b)$, and apply Rolle's theorem
repeatedly:


*

*There is an $x_1 \in (a, c)$ with $f'(x_1) = \frac{f(c)-f(a)}{c-a} < 0$.

*There is an $x_2 \in (c, b)$ with $f'(x_2) = \frac{f(b)-f(c)}{b-c} > 0$.

*There is an $x_3 \in (x_1, x_2)$ with $f''(x_3) = \frac{f'(x_2)-f'(x_1)}{x_2-x_1} > 0$.
This is a contradiction to the assumption that $f''(x) \le 0$
for all $x \in (a, b)$.

An alternative approach: Fix any $c \in (a, b)$ and define
$$
 g(x) = (c-a)(c-b)f(x) - (x-a)(x-b)f(c) \, .
$$
Then $g(a) = g(c) = g(b) = 0$, and repeated application of Rolle's
theorem shows that $g''(\xi) = 0$ for some $\xi \in (a, b)$. 
Then
$$
 0 = g''(\xi) = (c-a)(c-b)f''(\xi) - 2f(c) \\
\implies f(c) = \frac 12 (c-a)(c-b)f''(\xi) \ge 0 \, .
$$

Yet another approach: Assume that $f$ attains its minimum at $c \in (a, b)$ and $f(c) < 0$. Then $f'(c) = 0$ and Taylor's formula gives
a contradiction:
$$
 f(b) = f(c) + \frac 12 (b-c)^2 f''(\xi) < 0
$$
for some $\xi \in (c, b)$.
The real idea here is that $f$ is  concave,
and a continuous concave function on a compact interval attains its
minimum at one of the boundary points: Therefore 
$$
f(x) \ge \min (f(a), f(b)) = 0
$$
for $x \in (a, b)$.
A: $f$ is continuous in $[a,b]$ and differentiable in $(a,b), f(a)=f(b)=0$
By Rolle's Theorem, $\exists c\in(a,b)$ such that $f'(c)=\frac{f(b)-f(a)}{b-a}=0$
$f''(x)\leq0,\ \forall x\in(a,b)$
$\implies\forall x\in(a,c), \int_{x}^{c}f''(x)dx=f'(c)-f'(x)=-f'(x)\leq0$
$\implies\forall x\in(a,c), f'(x)\geq0$
$\implies \int_{a}^{x} f'(x)dx=f(x)-f(a)=f(x)\geq0$
Similarly, $\forall x\in(c,b), f'(x)\leq0$
$\implies\int_{x}^{b} f'(x)dx=f(b)-f(x)=-f(x)\leq0$
$\implies f(x)\geq0$
As far as $f(c)$ is concerned, continuity requires $f(c)\geq0$
A: By Rolle's theorem, there exists $c\in(a,b)$ such that $f'(c)=0$.
Now  $f''(x)\le 0$ in $(a,b)$ implies $f'(x)$ is non-increasing in $[a,b]$, so


*

*if $a\le x\le c$, then $f'(x)\ge f'(c)=0$, in other words $f(x)$ is non-decreasing in $[a,c]$, so that for all $x\in[a,c]$, $f(x)\ge f(a)=0$;

*if $c\le x\le b$, then $f'(x)\le f'(c)=0$, in other words $f(x)$ is non-increasing in $[c,b]$, so that for all $x\in[c,b]$, $f(x)\ge f(b)=0$.


Thus, in each case, $f(x)\ge 0$.
