Is the function in $W^{k,p}$ with $0$ $k$-th weak derivative a polynomial of at most $k-1$ degree? Assume we have $u\in W^{k,p}(\Omega)$ where $\Omega$ is open bounded domain with $C^1$ boundary in $\mathbb{R}^d$ and $1\le p\le\infty$. Now if we know that $D^{\alpha}u=0$ for any multi-index $\alpha$ with $|\alpha|=k$ can we conclude that $u$ equals to a polynomial of degree at most $k-1$ a.e.? If not, can we find polynomials $\{p_n\}$ of degree $k-1$ converges to $u$ in $W^{k,p}(\Omega)$?
My attempt: by the definition of the weak derivative, as $D^{\alpha}u=0$ we have $\int_{\Omega}uD^{\alpha}\phi=0$ where $\phi\in C_{c}^{\infty}(\Omega)$. We know $\int_{\Omega}pD^{\alpha}\phi=0$ for any $p$ polynomials of degree $k-1$. So, I need to show that polynomials of degree $k-1$ is the set $A:=\{u\in W^{k,p}:\int_{\Omega}uD^{\alpha}\phi=0\}$ or it is at least dense in A.
 A: You need $\Omega$ to be connected. Anyway, fix $\delta>0$ and consider the domain $\Omega_\delta=\{x\in\Omega:\, \text{dist}\,(x,\partial \Omega)>\delta\}.$ Let $U$ be a connected component of $\Omega_\delta$. Consider the mollification $u_\varepsilon=\varphi_\varepsilon \star u$ of $u$. If $x\in U$, then for $0<\varepsilon<\delta$, since $\varphi_\varepsilon$ has support in $B(0,\varepsilon)$  you can integrate by parts to see that
$$D^\alpha u_\varepsilon(x)=(\varphi_\varepsilon \star D^\alpha u)(x)=0.$$
Hence all the derivativatives of order $k$ of $u_\varepsilon$ are zero in $U$. Since $u_\varepsilon$ is smooth, it must be a polynomial of degree less than $k$ in $U$. But since $u_\varepsilon$ converges to $u$ in $W^{k,p}(U)$, it follows that $u$ must be a polynomial of degree less than $k$ in $U$ (are you OK proving this?). Then you send $\delta$ to $0$. 
Edit
I'll add more details as requested. Write
$$u_\varepsilon(x)=\sum_{0\le |\alpha|\le k-1} a_{\alpha,\varepsilon}x^\alpha.$$
Since for $|\alpha|=k-1$, $D^\alpha u_\varepsilon=a_{\alpha,\varepsilon}\to D^\alpha u$ in $L^2(U)$, you get that 
$|a_{\alpha,\varepsilon}-a_{\alpha,\eta}||U|^{1/2}=||D^\alpha u_\varepsilon-D^\alpha u_\eta||_{L^2(U)}\to 0$ as $\eta, \varepsilon\to 0$ and so by completeness
$a_{\alpha,\varepsilon}\to a_{\alpha}$. 
Next compute the derivative of order $k-2$ and so on. 
Alternatively you could use the fact that since $u_\varepsilon(x)\to u(x)$ at a.e. $x\in \Omega$ you must have that $a_{\alpha,\varepsilon}\to a_{\alpha}$ for every $\alpha$. 
