Riemann integral of $ f(x) = \begin{cases} \frac{1}{n}, & \text{if $x=\frac{1}{n}, \ \ n=1, 2,3 ,\cdots$ } \\ 0, & \text{other where} \end{cases}$ Let $f:[0, 1]\to\mathbb{R}$ and $  f(x) =
\begin{cases}
\frac{1}{n},  & \text{if $x=\frac{1}{n}, \  \ n=1, 2,3 ,\cdots$ } \\
0, & \text{other where}
\end{cases}$
I want to find $\int_{0}^{1} f\, dx.$ I think the answer is $0$.
Any ideas or insight would be greatly appreciated

You have $0 \le f \le \bar{f}$ where
$$ \bar{f}(x) =
\begin{cases}
1,  & \text{if $x=\frac{1}{n}, \  \ n=1, 2,3 ,\cdots$ } \\
0, & \text{else}
\end{cases}$$
The Riemann integral of $\bar{f}$ is equal to $0$, hence $f$ Riemann integral is also equal to $0$.
To prove it consider the step functions
$$ \bar{f_p}(x) =
\begin{cases}
1,  & \text{if $x \in (\frac{1}{n}-\frac{1}{2^p n(n+1)},\frac{1}{n}+\frac{1}{2^p n(n+1)})  \cap [0,1] \  \ n=1, 2,  \dots ,p$ } \\
1,  & \text{if $x \in [0,\frac{1}{p+1})$ } \\
0, & \text{else}
\end{cases}$$
For all $p \ge 1$ you have $$0 \le f \le \bar{f} \le \bar{f_p}$$ and $$\int_0^1 \bar{f_p(x)} \ dx = \frac{1}{p+1} + \frac{1}{2^{p+1}}\sum_{k=1}^p \frac{1}{k(k+1)}$$
As the RHS is converging to $0$ as $p \to \infty$, you are done.
