Checking Riemann integrability Let $f:[0,1]\to \mathbb{R}$ be defined as  $\begin{eqnarray*}
f(x)=\left\{ \begin{array}{ll}
 \frac{1}{n} & \textrm{ for }x =\frac{1}{n} \textrm{ where } n \in \mathbb{N}\\
0 & \textrm{ otherwise}
\end{array}\right.
\end{eqnarray*}$.
Is the function Riemann integrable? How do I check this using upper and lower Riemann integrals? Upper Darboux sum for arbitrary partitions is where I am stuck.
Also if the usual integral $\int_{0}^{1}f(x)dx$ exists can I say the function is Riemann integrable? and is there anything wrong in the following arguments?:
$$\int_{\frac{1}{n}}^{1}f(x)dx=\int_{\frac{1}{n}}^{\frac{1}{n-1}}f(x)dx+\cdots+\int_{\frac{1}{2}}^{1}f(x)dx$$
$$=\int_{\frac{1}{n}}^{\frac{1}{n-1}}0dx+\cdots+\int_{\frac{1}{2}}^{1}0dx$$
$$=\sum_{i=1}^{n-1}\int_{\frac{1}{i+1}}^{\frac{1}{i}}0dx$$
$$\int_{0}^{1}f(x)dx=\lim_{n\to \infty}\int_{\frac{1}{n}}^{1}f(x)dx=\lim_{n\to \infty}\sum_{i=1}^{n-1}\int_{\frac{1}{i+1}}^{\frac{1}{i}}0dx$$
$$=\sum_{i=1}^{n-1}0dx=0.$$
 A: Here is an idea for showing that the upper integral is also zero.
Fix a large integer $n>0$.


*

*Use a partition such that:


*

*$[0,1/n]$ is the first subinterval,

*The numbers $1/1,1/2,\ldots,1/(n-1)$ are all isolated from the rest of $[0,1]$ by tiny subintervals of width $<1/n^2$. This forces several subintervals containing none of the numbers $1/k$, but that's the point really.


*Then show that the upper sum related to the above partition is less than $2/n^2$. With an appropriate choice of $n$ this will be as small as you wish.
A: It is clear that the lower integral is zero.
For the upper integral, take a partition with the points $0, 1/k, 2/k, \dots, 1$
Then in the sum $$\sum f(c_k) \Delta x_k$$ with each $c_k$ chosen arbitrarily in the interval, this sum is at most $\dfrac1k \displaystyle \sum_{n=1}^{k} \frac{1}{n} = O\left(\frac{\log k}{k}\right)$. So fix $\varepsilon > 0$ and taking $k$ will make the upper integral at most $\varepsilon$.
Thus the upper and lower integrals coincide.
