The following is the Thomae function:
$$ f(x) = \begin{cases} \frac{1}{q} & if \quad x = \frac{p}{q}, p \in \mathbb{Z}, q \in \mathbb{N},\text{ gcd(p, q) = 1 } \\ 0 & if \quad x\in \mathbb{Q}^c \quad or \quad x=0. \end{cases} $$
My professor said that integrals and derivatives do not kill each other for Thomae function because $\int_{0}^{x} f(t)dt = 0$ and $\frac {d}{dx} \int_{0}^{x} f(t)dt = 0.$
My question is:
I tried to calculate $\int_{0}^{x} f(t)dt$ and I got $\frac{x}{q}$ and not $0.$ Could anyone show me the detailed calculation of this please?