Let $f: \mathbb R \to [0, \infty ) $ be a twice differentiable function with $f''(x) \le 0 , \forall x\in \mathbb R $ , then how to show that $f$ is constant ?
My work:- Consider arbitrary $x\in \mathbb R$ and fix it , then for any $t \in \mathbb R$ , Taylor gives $0\le f(x+t)=f(x)+tf'(x)+\dfrac{t^2}2f''(c) \le f(x)+tf'(x)$ so $f'(x) \ge -\dfrac{f(x)}t , \forall t\in \mathbb R^+$ , thus letting $t \to \infty$ , we get $f'(x) \ge 0 , \forall x \in \mathbb R$ , now since $f'' \le0$ , so $f'$ is decreasing , thus $0\le f'(x) \le f'(z) , \forall z \in (-\infty , x] $ , so if we can show that $\lim_{z \to -\infty} f'(z)$ exists then we are done , because then by L'Hospital's rule we would have $\lim_{z \to -\infty} f'(z)=\lim_{z \to -\infty} \dfrac{f(z)}z \le 0$ (because $f \ge 0$ ) , but due to $f' \ge0$ , we have $\lim_{z \to -\infty} f'(z) \ge 0$ , thus $\lim_{z \to -\infty} f'(z)=0$ and then from $0\le f'(x) \le f'(z) , \forall z \in (-\infty , x] $ we can conclude $f'(x)=0 , \forall x \in \mathbb R$ concluding our proof ; but I cannot show that $\lim_{z \to -\infty} f'(z)$ exists at all ; am I even in the right direction ?