I have seen a proof of the following result: "If $M$ is a compact, orientable manifold and $\Delta f \geq 0 $ on $M$, then $\Delta f = 0$ and $f$ is constant."
The proof begins with a computation,
$$0 = \int_M \frac{1}{2}\Delta f^2 = \int_M f\Delta f + |\nabla f|^2.$$
This part is clear to me. However, the author then claims that the assumption on $\Delta f$ is enough to ensure that $\Delta f = 0$, and I just don't see it. To me, it seems we have $$0 \geq \int_M f\Delta f,$$
but I don't understand how this implies the conclusion. Would someone please explain the argument that is implicit here?
Never mind, I think I figured it out. In particular,
$$0 \geq \int_M f\Delta f \geq \left(\min_M f\right)\int_M \Delta f = 0.$$
Please let me know if there is a mistake.