Determine if the function is Riemann Integrable $$f(x) = \begin{cases}
1/n,  & \text{if $\frac{1}{n+1} < |x| \le \frac{1}{n}$ where $n\in\mathbb{N}$}\\ 
0, & \text{if x = 0} 
\end{cases}$$
I want to check if this function $f:[-1,1] \mapsto \mathbb{R}$ is Riemann integrable. I am not sure how to calculate $U(f)$ and $L(f)$. I think $M_{i}(f,P) = 1/n$ but how do I find $U(f)$? Also I am not sure how to get $m_{i}(f,P)$. I just started learning about Riemann integration recently, I am still a beginner at this. Thank you for helping me!
 A: Let for $N \ge 2$
$$ P_N \equiv x_1 = -1, x_2 = - \frac{1}{2}, \dots, x_N = - \frac{1}{N}, x_{N+1} = \frac{1}{N}, \dots, x_{2N-1} = \frac{1}{2}, x_{2N} = 1$$
You have (using the fact that $f$ is even)
$$U(f,P_N)= 2\sum_{n=1}^N \left(\frac{1}{n}- \frac{1}{n+1}\right)\frac{1}{n}+ \frac{2}{N^2}$$ and $$L(f,P_N)= 2\sum_{n=1}^N \left(\frac{1}{n}- \frac{1}{n+1}\right)\frac{1}{n}.$$
Therefore for any partition $P$ with $P_N \subseteq P$:
$$0 \le U(f,P) - L(f,P) \le  \frac{2}{N^2}.$$
This proves that $f$ is Riemann integrable. Its Riemann integral is
$$\int_{-1}^1 f(t) \ dt = 2\sum_{n=1}^\infty \frac{1}{n^2(n+1)}$$
A: Yes, this function is Riemann-integrable. If you're OK with non-constructive proofs, then here it is:
Theorem (Lebesgue, Vitali): A bounded function on a closed bounded interval is Riemann-integrable if and only if the set of its discontinuities is a null set.
By definition, a null set $S$ is such that, for every $\varepsilon > 0$, $S$ can be covered by a system of open intervals whose total length is $< \varepsilon$.
In your case, the discontinuity points are $x = \pm 1/n.$ You can easily see that these points form a null set. Indeed, pick $\varepsilon > 0$. The union $[-1,-\varepsilon/4] \cup [\varepsilon/4,1]$ contains finitely many discontinuity points, and they are all isolated. Therefore they can be covered by a set of open intervals with the total length $< \varepsilon/2$. The total length of the covering is $< \varepsilon/4 + \varepsilon/4 + \varepsilon/2 = \varepsilon$.
