I am looking for a proof of the following statement which is known to be true as far as I heard.


Let $g\colon [a,b]\to \mathbb{R}$ be a smooth function. Assume that
$$b-a< \pi.$$
Assume also $$g(a)\geq 0,g(b)\geq 0,$$
$$g''+g\leq 0 \mbox{ on } [a,b].$$
Then $g\geq 0$ on $[a,b]$.



Elementary inequality generalizing convexity of a function on a segment
Write $g=g^+-g^-$ in $[0,\ell]$, multiply $g''+g \le 0$ by $g^-$ (which vanishes at the the endpoints) and integrate. Then we get with $v=g^-$
$$
\int\_0^l v'^2- \int\_0^l v^2 \le 0.$$
Since the first eigenvalue of the Dirichlet laplacian in $[0,\ell]$ is $\pi^2/\ell^2 $ we have also
$$
\int\_0^l v^2 \le \frac{\ell^2}{\pi^2} \int\_0^l v'^2 $$ and then $v=g^-=0$, since $\ell <\pi$.


