# Counterexamples

Let all of the following integrals to be over a compact interval $$[a, b]$$ with $$0 \leq a < b$$.

• Is $$f$$ bounded?
• What is the discontinuity set $$D_f$$?
• What is the non-differentiability locus $$D'_f$$?
• Is $$f \in \mathcal{R}$$, i.e. Riemann integrable?
• If $$f \in \mathcal{L}$$, i.e. Lebesgue integrable?
• If so, what is $$\int_{\mathbf{R}}f$$?

Note that $$D_f \in F_\sigma$$!

## Weierstrass Function

FunctionBounded?$$D_f$$$$D'_f$$$$\mathcal{R}$$?$$\mathcal{L}$$?
Dirichlet $$\chi_{\mathbf{Q}}(x)$$✅, $${\left\lvert {f} \right\rvert} \leq 1$$$${\mathbf{R}}$$$${\mathbf{R}}$$✅, $$\int f=0$$
Dirichlet 2 $$x\chi_{\mathbf{Q}}(x)$$$${\mathbf{R}}\setminus\left\{{0}\right\}$$$${\mathbf{R}}$$❌, $$U(f) > 1/4 > 0 = L(f)$$?
Dirichlet 3 $$x^2\chi_{\mathbf{Q}}(x)$$$${\mathbf{R}}\setminus\left\{{0}\right\}$$$${\mathbf{R}}\setminus\left\{{0}\right\}$$?
Dirichlet 4 $$f(x) = x\qty{ \chi_{\mathbf{Q}}(x) - \chi_{{\mathbf{Q}}^c}(x)}$$$${\mathbf{R}}\setminus\left\{{0}\right\}$$$${\mathbf{R}}$$?
Thomae $$(x={p\over q} \mapsto {1\over q})\chi_{{\mathbf{Q}}}(x)$$$${\mathbf{Q}}$$$${\mathbf{R}}$$✅, $$\int f = 0$$ 1
Weierstrass $$f(x)=\sum_{n=0}^{\infty} a^{n} \cos \left(b^{n} \pi x\right)$$?$$\emptyset$$$${\mathbf{R}}$$??

Full definition of the Weierstrass function:

\begin{align*} f(x)=\sum_{n=0}^{\infty} a^{n} \cos \left(b^{n} \pi x\right) && a \in (0, 1), b \in {\mathbf{Z}}_{\geq 0}, ab > 1 + {3\pi \over 2} .\end{align*}

Note that this series converges uniformly since it’s bounded above by $$\sum {\left\lvert {a^n} \right\rvert}$$, which is geometric.

Full definition of the Thomae function:

\begin{align*} f ( x ) = \begin{cases} \frac 1 q, & x = \frac p q \in {\mathbf{Q}},~(p,q) = 1 \\ 0, & \text{else} \end{cases} \end{align*}

Restrict attention to $${\left[ {\frac 1 2, 1} \right]}$$ \begin{align*} \overline{\int_0^1} f &= \inf \left\{{ \sum \sup f(x) (x_i - x_{i-1}) }\right\} \\ \sup f(x) = x_i \implies \sum \sup f(x) (x_i - x_{i-1}) &= \sum x_i (x_i - x_{i-1}) \\ &> \sum \frac 1 2 (x_i - x_{i-1}) \\ &= \frac 1 2 \left(\frac 1 2\right) = \frac 1 4 \\ \implies \overline{\int_0^1} f &\geq \frac 1 4 \end{align*} and \begin{align*} \underline{\int_0^1} f &= \sup \left\{{ \sum \inf f(x) (x_i - x_{i-1})}\right\} \\ \inf f(x)= -x_i \implies \sum \inf f(x) (x_i - x_{i-1}) &= \sum -x_i (x_i - x_{i-1}) \\ &< -\sum \frac 1 2 (x_i - x_{i-1}) \\ &= -\frac 1 2 \left( \frac 1 2 \right) = -\frac 1 4 \\ \implies \underline{\int_0^1} f &\leq -\frac 1 4 \end{align*} So we have $$\underline{\int_0^1} f \lneq 0 \lneq \overline{\int_0^1} f$$.

Footnotes
1.
Riemann integrable by the Lebesgue criterion.