Let $U \subset \mathbb{R}^n$ be an open set, and let $u \in L^1_{\mathrm{loc}}(U)$ be a locally integrable function. Let $\alpha = (\alpha_1, \dots, \alpha_n)$ be a multi-index. A function $v \in L^1_{\mathrm{loc}}(U)$ is called the $\alpha$-th weak derivative of $u$ if the following integral identity holds for every test function $\phi \in C^\infty_c(U)$ (the space of infinitely differentiable functions with compact support in $U$):
\begin{align}
\int_U u(x) D^\alpha \phi(x) \, d\mathcal{L}^n(x) = (-1)^{|\alpha|} \int_U v(x) \phi(x) \, d\mathcal{L}^n(x).
\end{align}
If such a function $v$ exists, we denote it by $D^\alpha u$. Here, $\mathcal{L}^n$ denotes the $n$-dimensional Lebesgue measure.