TITLE: When does Poincaré inequality hold?
QUESTION [6 upvotes]: Poincaré inequality is given by $$\int_\Omega u^2\le C\int_\Omega|\nabla u|^2dx ,$$  where $\Omega$ is bounded open region in $\mathbb R^n$. 
However this inequality is not satisfied by all the function. Take for example a constant function $u=10$ in some region. 
Happy to have have some discussions about it.
Thanks for your help.

REPLY [3 votes]: This inequality is, as you have shown by a simple example, not valid as stated. Things can be fixed up in various ways:
In the Wikipedia article on the Poincaré inequality it is assumed that the mean value $u_\Omega$ of $u$ on $\Omega$ is zero, resp., the left side of the inequality is replaced by $\int_\Omega|u-u_\Omega|^2\ {\rm d}x$. 
In the quoted source the author refers  to a certain Sobolev space which is the completion of $C_0^1(\Omega)$. Here the ${}_0$ means that compact support is assumed; in particular these functions vanish on the boundary.