# Discontinuous for rationals

Show that $f\left(x\right):=\sum_{n=1}^{\infty}\frac{\left\{nx\right\}}{n^2}$, where $\left\{nx\right\}$ is the fractional part of $nx$, is discontinuous for all rationals.

I guess it would be nice to somehow show that for any arbitrarily small irrational $r$, $f\left(\frac{a}{b}\right)<f\left(\frac{a}{b}+r\right)$, but I am not sure how to do that precisely (though it makes sense intuitively since $\left\{n\frac{a}{b}\right\}=0$ for all $n=mb$ for some $m\in\mathbb{N}$ whereas $\left\{n\left(\frac{a}{b}+r\right)\right\}\ne0\,\forall\,n\in\mathbb{N}$.)

Out of curiosity I tried beginning by computing the value of $f\left(x\right)$ for $x\in\mathbb{Q}$. My analysis showed that if $x=\frac{a}{b}$, where (without loss of generality) $\frac{a}{b}\in\left[0,\,1\right]$ and (again, without loss of generality) $\gcd\left(a,\,b\right)=1$ then: $$f\left(\frac{a}{b}\right)=\frac{a}{b^3}\sum_{l=1}^{b-1}l\frac{d}{dx}\left(\ln\left(\Gamma\left(\frac{l}{b}\right)\right)\right)$$ But I don't think that's relevant.

Note: this question comes from Rudin's Principles of Mathematical Analysis Exercise 7.10.

-