Series with fractional part of $nx$ Consider the function 
$$
f(x)=\sum_{n=1}^{\infty}\frac{(nx)}{n^2}
$$
where $(x)$ denotes the fractional part of $x$.  What are the points of discontinuity of $f$, and show they form a countable dense set and is $f$ Riemann-integrable on any bounded interval? I need hint for this one, not home work just solving problem for revision.
 A: Denote
$$
\varphi_k(x)=\frac{(kx)}{k^2}\qquad f_n(x)=\sum\limits_{k=1}^n \varphi_k(x)
$$
Obviously for all $x\in\mathbb{R}$ we have $\varphi_k(x)\geq 0$ hence the sequence $\{f_n(x):n\in\mathbb{N}\}\subset \mathbb{R}_+$ and nondecreasing. Also we may notice that
$$
0\leq \varphi_k(x)\leq\frac{1}{k^2}.
$$
Since $\sum\limits_{k=1}^\infty k^{-2}&lt+\infty$ then by Weierstrass $M$-test we conclude that $\{f_n:n\in\mathbb{N}\}$ uniformly converges  on $\mathbb{R}$ to the function
$$
f(x)=\lim\limits_{n\to\infty}f_n(x)=\sum\limits_{k=1}^\infty \varphi_k(x)
$$
Denote $D_k=\{m/k:m\in\mathbb{Z}\}$, then $\mathbb{I}=\mathbb{R}\setminus\mathbb{Q}=\mathbb{R}\setminus(\cup_{k\in\mathbb{N}} D_k)$. Since $D_k$ is the set of dicontinuiuty of $\varphi_k$, then $\varphi_k\in C(\mathbb{I})$. As the consequence $\{f_n:n\in\mathbb{N}\}\subset C(\mathbb{I})$. But as we proved earlier $f_n\rightrightarrows f$ on $\mathbb{R}$, hence $f\in C(\mathbb{I})$. Now we claim that $\mathbb{Q}$ is the set of discontinuity of $f$. Take $x=p/q\in\mathbb{Q}$, then one can easly check that
$$
\lim\limits_{t\to x-0}\varphi_k(t)-\varphi_k(x)=
\begin{cases}
0& kx\notin\mathbb{Z}\\
\frac{1}{k^2}& kx\in\mathbb{Z}
\end{cases}\qquad
$$
Since $f_n\rightrightarrows f$ on $\mathbb{R}$ we have
$$
\lim\limits_{t\to x-0}f(t)=
\lim\limits_{t\to x-0}\sum\limits_{k=1}^\infty \varphi_k(t)=
\sum\limits_{k=1}^\infty\lim\limits_{t\to x-0} \varphi_k(t)
$$
and consequently
$$
\lim\limits_{t\to x-0}f(t)-f(x)=
\sum\limits_{k=1}^\infty\lim\limits_{t\to x-0} \varphi_k(t)-\sum\limits_{k=1}^\infty\varphi_k(x)=
\sum\limits_{k\in\mathbb{N},kx\in\mathbb{Z}}\frac{1}{k^2}>0.
$$
This means that $x$ is a point of discountinuity of $f$. Since $x\in\mathbb{Q}$ is arbitrary $f$ is discontinuous on $\mathbb{Q}$.
Now we turn to Riemann integrability question. Let $[a,b]\subset\mathbb{R}$. Since $f\in C(\mathbb{I})$ and $\mathbb{R}\setminus\mathbb{I}=\mathbb{Q}$ is countable, then $f$ is continuous almost everywhere on $[a,b]$. By Lebesgue criterion $f$ is Riemann itegrable.
