Consider a $u$ that solves $$ \begin{cases} Lu &= f \qquad \text{ in } U,\\ u &= 0 \qquad \text{ on } \partial U, \end{cases} $$ with $U = (0,1)^n \subset \mathbb{R}^n$ the unit hypercube, and $L$ an elliptic differential operator $$ Lu = -\sum_{i,j=1}^n a^{ij}(x) u_{x_i x_j} + \sum_{i=1}^n b^i(x) u_{x_i} + c(x) u. $$ with $a^{ij}, b^i$ and $c$ smooth functions.
I was wondering how many weak derivatives $u$ has. Theorem $5$ in subsection $6.3$ of Partial Differential Equations by L. Evans shows that if for some $m \in \mathbb{N}$, $f \in H^m(U)$ and $\partial U$ is $C^{m+2}$, then $u \in H^{m+2}(U)$.
However, the boundary of the unit cube is not $C^{m+2}$ of course. Still, it is $C^{\infty}$ a.e., so one might hope that $u$ has $m+2$ weak derivatives. Is something known for this situation?
This is false in general, and fails for the Laplacian when $n=2.$ A good reference of problems of this type is the following text.
Grisvard, P., Elliptic problems in nonsmooth domains, Monographs and Studies in Mathematics, 24. Pitman Advanced Publishing Program. Boston-London-Melbourne: Pitman Publishing Inc. XIV, 410 p. (1985). ZBL0695.35060.
Taking polar coordinates $x=(x_1,x_2) = (r\cos\theta,r\sin\theta)$ we can define $$ u(x) = r^2 \left( \log r \sin (2\theta) + \theta \cos \theta\right). $$ We can check that $u$ is smooth in $U = (0,1)^2$ and is harmonic, that is $$ \Delta u = \partial_r^2u + \frac1r\partial_ru + \frac1{r^2} \partial_{\theta}^2 u= 0 $$ in $U.$ This satisfies $u(x_1,0) = 0$ and $u(0,x_2) = -\frac{\pi}2 x_2^2$ so the boundary data $u|_{\partial U}$ is smooth near the origin, however we have $$ |\nabla^2u| \sim 1 + \log r $$ for $r \sim 0.$ Hence $u \not\in C^2(\overline U).$
In general for second order elliptic PDEs on convex domains, the best one can expect is regularity in $W^{2,2}$ - we refer to the above text for details.