Solution (source code)

= Solution

A <locally integrable function> $u$ has <weak derivative> $g_i$ in direction $i$ when $g_i$ is locally integrable and
$$
\boxed{\int_{B_1}u\,\partial_i\phi\,dx=-\int_{B_1}g_i\phi\,dx
\qquad\text{for every }\phi\in C_c^\infty(B_1).}
$$
The <test functions> have <compact support> inside the domain, so no boundary values enter this definition. Such $g_i$ is unique <almost everywhere> and is denoted $\partial_i u$.

For $1\leq p<\infty$, the first-order <Sobolev space> consists of the <Lp space> classes whose first <weak derivatives> are also in that <Lp space>:
$$
\boxed{W^{1,p}(B_1)=\{u\in L^p(B_1):\partial_i u\in L^p(B_1),\ i=1,\ldots,n\},\qquad
\|u\|_{W^{1,p}}=\left(\|u\|_p^p+\sum_{i=1}^n\|\partial_i u\|_p^p\right)^{1/p}.}
$$
This <Sobolev norm> is equivalent to $\|u\|_p+\|\nabla u\|_p$; either convention is acceptable. When $p=2$, this is the <Hilbert space> $H^1(B_1)$.