Let $\left\{r_1, r_2, \ldots \right\}$ be an enumeration of all the rationals in $[0,1]$ and define $$ g_n(x) = \begin{cases} 1 & \text{if} \ x = r_n \\ 0 & \text{otherwise} \end{cases} $$
a) Is $G(x) = \sum_{n=1}^{\infty} g_n(x)$ (Riemann) integrable on $[0,1]$?
b) Is $F(x) = \sum_{n=1}^{\infty} g_n(x) / n$ integrable on $[0,1]$?
For part a), I think not, but I'm not sure how to prove this. Is $G(x)$ even bounded on $[0,1]$? How do I know this series will converge? For each subinterval $[x_{k-1}, x_k]$, let $m_k = \inf\left\{f(x) \mid x \in [x_{k-1}, x_k] \right\}$ and likewise $M_k$ for the supremum. Can I then just say that, if $P$ is some partition of $[0,1]$, by the density of the rationals we will always have $M_k = 1$ and $m_k = 0$? And so the upper and lower Riemann sum are always different and hence $G$ is not integrable.
For part b) I took as my partition $P_n$ the one that divides $[0,1]$ in equal subintervals. So $x_k = a + k(b-a)/n$. Then $$x_k - x_{k-1} = \frac{b-a}{n}. $$ Then I think I will have $$ \lim_{n \to \infty} [U(F,P_n) - L(F,P_n)] = 0$$ and hance $F$ is Riemann integrable.
Help and/or feedback is appreciated.