Is the function Riemann integrable? If yes, obtain the value of $\int_0^1f(x) \ dx$
$f(x) = \begin{cases} \frac {1}{n}, & \frac{1}{n+1}<x\le\frac{1}{n}\\ 0, & x=0 \end{cases}$
My attempt
$f$ is bounded and monotonically increasing on $[0,1]$. Also, $f$ has infinite discontinuities but only one limit point. Therefore $f$ is Riemann integrable. Now, to calculate the integration
$\int_0^1f(x) \ dx=\int_{1/2}^{1}1 \ dx + \int_{1/3}^{1/2}\frac{1}{2} \ dx + \int_{1/4}^{1/3}\frac{1}{3} \ dx+...$
$=\sum_{n=1}^\infty \frac{1}{n^2}-\frac{1}{n}+\frac{1}{n+1}$
How do I proceed from here? How do I calculate these summations? I know $\sum \frac{1}{n}$ is $\log 2$, but not the other two summations.