# Why are test functions in the definition of weak derivatives required to be $\mathcal{C}^{\infty}$?

Recall that a function $$u \in L^1_{\text{loc}}(a,b)$$ is said to be weakly differentiable with weak derivative $$\nu$$ if the equation \begin{align} \int_{a}^{b} u(x) \phi'(x) dx = - \int_{a}^{b} v(x) \phi(x) dx, \end{align} holds for all $$\phi \in \mathcal{C}_{\text{c}}^{\infty}(a,b)$$.

In understand we why need $$\phi$$ to be compactly supported but why do we require our test functions $$\phi$$ to be differentiable infinitely many times?

The definition per se only needs $$\phi \in \mathcal{C}^1(a,b)\cap\mathcal{C}[a,b]$$, right?

Any help is greatly appreciated.

• You are correct. But often we want more than one derivative because the differential equation that we want to solve weakly has more derivatives. – md2perpe Apr 9 at 20:15
• By the way, $\mathcal{C}^1(a,b) \subseteq \mathcal{C}[a,b]$ so there's no need to take the intersection of these. – md2perpe Apr 9 at 20:16
• @md2perpe I don't think so. Consider $a = 0, b = 1$ and $$f: [0,1] \to [0,1], \ x \mapsto \begin{cases} 0, & x \in (0,1), \\ 1, & x \in \{0,1\} \end{cases}.$$ – Viktor Glombik Apr 10 at 11:30
• You are right; I didn't notice that one interval was open and the other closed. – md2perpe Apr 10 at 14:35
• @ViktorGlombik I guess it depends on your interpretation of what it means for $f:[a,b] \to \mathbb{R}$ to be in $C^1(,a,b)$. Notice, however, that every $f \in C^1(a,b)$ is uniformly continuous, so each $f$ has a unique extension to $C[a,b]$. – Strants Apr 10 at 20:49

Let $$\Omega$$ be an open subset of $$\mathbb R^n$$. We define the space of distributions $$\mathcal D'(\Omega)$$ as being the topological dual of the space of test functions $$C^\infty_c(\Omega)$$. For more details about this topology you can refer to Walter Rudin's Functional Analysis (pp. 151-153). For a given distribution $$\tau$$, its weak i-th derivative $$\partial_{x_{i}}\tau$$ in the sense of distributions is defined as $$\begin{equation} \forall \phi \in C^\infty_c(\Omega) \;\;\langle\partial_{x_{i}}\tau, \phi\rangle \;:= -\langle\tau, \partial_{x_{i}}\phi\rangle \end{equation}$$ To come back to your question, there is a canonical injection of the space $$L^1_{loc}(\Omega)\hookrightarrow \mathcal D'(\Omega)$$, indeed one can show that $$\langle f,\phi\rangle \;= \int_{\Omega} f\phi$$ for $$f \in L^1_{loc}(\Omega)$$ is a distribution. Then we define a weak derivative for an $$L^1_{loc}(\Omega)$$ function as its derivative in the sense of distributions: $$\forall \phi \in C^\infty_c(\Omega)\;\; \langle f', \phi\rangle \;:= - \langle f, \phi'\rangle$$ Which is also: $$\int_{\Omega} f'\phi = - \int_{\Omega}f\phi'$$ Hope this helps!