Discontinuities of $f(x)=\sum \limits_{n=1}^{\infty}\frac{\{nx\}}{n^2}$ Let $f(x)=\sum \limits_{n=1}^{\infty}\dfrac{\{nx\}}{n^2}$ where $\{\}$ is fractional part. Find all discontinuities of function $f(x)$.
I think that $f(x)$ is discontinuous at every rational point. 
Can anyone show how to prove strictly that $f$ for example is discontinuous at $0$ or $1/2$?
 A: Note that $f_n(x) := \{nx\}$ is a periodic function of period $1/n$. It's only discontinuity are at the rational points $\frac{1}{n}\mathbb{Z} := \left\{\frac{p}{n}: p \in \mathbb{Z}\right\}$. In particular by periodicity we have $$J_{f_n}(p/n) = \lim\limits_{x \to \frac{p}{n}^{+}} f_n(x) - \lim\limits_{x \to \frac{p}{n}^{-}} f_n(x) = \lim\limits_{x \to 0^{+}} f_n(x) - \lim\limits_{x \to 0^{-}} f_n(x) = -1.$$ Now note that for a point $x = p/q$ with $(p,q) = 1$ this jump discontinuity occurs only for functions $f_{kq}$ where, $k \in \mathbb{N}$. Since the convergence of $\displaystyle \sum\limits_{n=1}^N \frac{1}{n^2}f_n \to f$ is uniform on $\mathbb{R}$ (by Weierstrass $M$-test for example) we get $$J_f(p/q) = \sum\limits_{n=1}^\infty \frac{1}{n^2}J_{f_n}(p/q) = \sum\limits_{k=1}^\infty \frac{1}{(kq)^2}J_{f_{kq}}(p/q) = -\sum\limits_{k=1}^\infty \frac{1}{(kq)^2}.$$
On the other hand if $x \not\in \mathbb{Q}$ then $f_n$ is continuous at $x$ for all $n \in \mathbb{N}$, which proves the continuity of $f$ at $x$ by uniform convergence.
A: Start with $x = a$ and conclude that $f(x) = f(a)$.  What if we are not sure of the value of $x$.  Is it true that $x \approx a$ implies $f(x) \approx f(a)$.  This is the basis of our concept of "continuity" - often we are able to guess the value of a function based on "nearby" or "similar values".
Continuous functions behave nicely under limits: $\displaystyle \lim_{x \to a} f(x) = f(a)$ 
Let's use this definition to try to check your function is continuous for irrational $x \not \in \mathbb{Q}$ such as $x = \sqrt{\color{#0055FF}{2}}, \sqrt{3}$.  If I just write out the equations.
$$ \lim_{x \to \sqrt{\color{#0055FF}{2}}}\; \sum \limits_{n=1}^{\infty}\frac{\{nx\}}{n^2} \stackrel{?}{=} \sum \limits_{n=1}^{\infty}\frac{\{n \sqrt{\color{#0055FF}{2}}\}}{n^2} $$ 
I have no idea about the number on the right side.  Is it even finite?  It's smaller than another number I am familiar with.  Even if the function is discontinuous or not, at east point it has a finite value.
$$ \sum \limits_{n=1}^{\infty}\frac{ \{ n \sqrt{2}\}}{n^2} \leq \sum \limits_{n=1}^{\infty}\frac{ 1}{n^2}  = \frac{\pi^2}{6} < \infty $$
What about nearby points?  Can we show that for $x \approx \sqrt{2}$ this function attains close values?
$$ \sum \limits_{n=1}^{\infty}\frac{ \{ n (\sqrt{2} \pm \color{red}{\epsilon})\}}{n^2} \stackrel{?}{\approx}  \sum \limits_{n=1}^{\infty}\frac{ \{ n \sqrt{2} \}}{n^2} $$
Let $\epsilon \ll 1$ be a really small number.  How about $\epsilon = \frac{1}{1000}$ or $\frac{1}{M}$.  We can bound the error in one of two possible ways.


*

*$ \{ n \sqrt{2}  \} - n \epsilon < \{ n \sqrt{2} \pm \epsilon \} < \{ n \sqrt{2}  \} + n \epsilon$

*the error here is smaller than $\frac{1}{n^2} \times n \epsilon = \frac{\epsilon}{n} \leq \epsilon$
Jumping does not occur before the $M = \frac{1}{\epsilon}$ term. For $n > M$:  $ \displaystyle 0 \leq  \frac{ \{ n \sqrt{2} \pm \epsilon \}}{n^2} \leq \frac{1}{M^2} = \epsilon^2$.
It seems we have established uniform convergence in the terms of the series and therefore our limit is correct for $x \notin \mathbb{Q}$.


Here's the plot I found.   
It certainly looks discontinuous at $x = \frac{1}{2}$ as we expected.  It looks like a kind of "swoosh" shape repeated many times,  but a similar jump discontinuity should appear at all $x \in \mathbb{Q}$.
It's a totally reasonable-looking function. It's defined at all points in $[0,1]$, $\int_0^1 f(x) \, dx$ makes perfect sense and yet this function has horrible discontinuities everywhere!
