Q1: Let $p\geq 1$, and let $f\in W^{1,p}(\Omega)\cap C(\Omega)$. Assume also $f\in L^{\infty}(\Omega)$ and $f=0$ on $\partial \Omega$. Is it true that $f\in W^{1,p}_{0}(\Omega)$ even if $f\notin C(\bar{\Omega})$ ?
Thanks
Q1: Let $p\geq 1$, and let $f\in W^{1,p}(\Omega)\cap C(\Omega)$. Assume also $f\in L^{\infty}(\Omega)$ and $f=0$ on $\partial \Omega$. Is it true that $f\in W^{1,p}_{0}(\Omega)$ even if $f\notin C(\bar{\Omega})$ ?
Thanks
(The question got modified and this may not answer it anymore.)
It is possible to have a function $f$ which is $C^\infty$ and bounded on $\Omega$ and is in $W^{1,p}_0(\Omega)$, yet does not have any continuous extension to $\overline{\Omega}$; in particular, setting $f = 0$ on $\partial \Omega$ does not result in a continuous function.
Let $\Omega$ be some domain in $\mathbb{R}^d$, $d \ge 2$, and let $\varphi$ be some smooth bump function supported inside the unit ball and with $\varphi(0) = 1$. Let $\varphi_\epsilon(x) = \varphi(x/\epsilon)$. With a change of variables, you can compute that $\|\varphi_\epsilon\|_{W^{1,p}} \approx \epsilon^{d-1}$.
Now choose a sequence of disjoint open balls $B_n$ inside $\Omega$ of radius $r_n$, where $\sum r_n < \infty$, whose centers $x_n$ converge to some $x \in \partial \Omega$. Let $g_n(x) = \varphi_{r_n}(x-x_n)$, which is compactly supported inside $B_n$ and has $g_n(x_n)=1$. Then the sum $f = \sum_n g_n$ converges in $W^{1,1}_0(\Omega)$, but $f$ is greater than $1/2$ everywhere on some neighborhood of $\{x_1, x_2, \dots\}$, so $f$ cannot be continuous up to the boundary, even after modification on a null set. Moreover, $f$ is continuous (even $C^\infty$) inside $\Omega$, since the sum is locally finite inside $\Omega$.
The answer is No.
There can be $f\in W^{1,p}(\Omega)\cap C(\Omega) \cap L^{\infty}(\Omega)$ such that $f=0$ on $\partial \Omega$ but $f\notin W^{1,p}_{0}(\Omega)$.
If $f\notin C({\bar{\Omega}})$, then its trace on $\partial \Omega$ can be different from zero, and in that case $f\notin W^{1,p}_{0}(\Omega)$.
Example: simply the characteristic function $\chi_{\Omega}$
The trace of a function $f \in C(\Omega)$ at $x\in \partial \Omega$ is the limit of $f$ when we move from the interior of $\Omega$ toward $x$. If $f\in C(\Omega) \cap L^{\infty}(\Omega)$ then its trace exists. If $f\in C({\bar{\Omega}})$ then the trace (the limit) at any $x\in\partial \Omega$ coincides with $f(x)$. So, assuming $f=0$ on $\partial \Omega$ and continuity on $\Omega$ are not enough.