# Sobolev spaces on bounded domain

I don't understand why $W_0^{k,p}(U)$ is not the same that $W^{k,p}(U)$ on a bounded domain $U$.

$W_0^{k,p}(U)$ is the closure of $C_0^{\infty}(U)$ in $W^{k,p}(U)$.

Can someone give an example of a function that is in $W_0^{k,p}(U)$ but not in $W^{k,p}(U)$ on a bounded domain? Thanks.

-
I think I got it. In $U=(0,1)$ take a constant function, then it doesn't belong to $W_0^{1,p}(U)$ but it does to $W^{1,p}(U)$ – inquisitor Aug 21 '12 at 20:49
You also have your $1$s and $k$s mixed up, I think... – Nate Eldredge Aug 21 '12 at 22:14
Thank you. I edited the original post – inquisitor Aug 21 '12 at 22:44

For each open bounded set $U$, we have that $\chi_U\in W^{k,p}(U)$ but it's not in $W^{k,p}_0(U)$ (it would contradict Poincaré inequality).
However, if the boundary of $U$ is smooth enough, we have that $W^{k,p}(U)$ is the closure of $C^{\infty}(\overline U)$, that is, the smooth functions such that the derivatives of each order admit a continuous extension to the boundary.