Let us consider the function $$ f(x) = \begin{cases} 1 & \text{if } x \in \mathbb Q \\ -1 & \text{if } x \in \mathbb R \setminus \mathbb Q \end{cases} $$
I have a main question about the distributional derivative of $f$. Let me split it into four thoughts/subquestions:
- This function is not Riemann integrable because it is not continuous anywhere. Is this right?
- This function belongs to $L^1_{loc}$ (just because $|f| = 1$ everywhere, right?).
- As a $L^1_{loc}(\mathbb{R})$ function, $f$ can be identified with distribution $T_f$ that act as $$\langle T_f,\varphi\rangle= \int_{\mathbb{R}} f(x)\varphi(x)dx, \quad \varphi\in \mathcal D(\mathbb{R}).$$
- Every distribution has a distributional derivative. In the case of this function $f$, let's recall the definition of the distributional derivative $T_f '$: $$\langle T_f ', \varphi \rangle := -\langle T_f, \varphi'\rangle = -\int_{\mathbb R} f\varphi' dx, \quad \varphi\in \mathcal D(\mathbb{R}).$$ Now, is it possible to compute this, that is $$ \int_{\mathbb R} \big(1_{\mathbb Q}(x) - 1_{\mathbb R \setminus \mathbb Q}(x)\big) \varphi(x) dx $$ explicitly? Is it only a distribution or also a locally finite measure?