Okay so I'm trying to determine whether $\int_{0}^{1}\left(\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor\right) \, dx$ converges and if so, to what value? So the function $\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor = 0$ when $x=\frac{1}{k}$ where $k$ is a natural number, and everywhere else $\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor = 1$ From there I split the integral:
\begin{align*} \int_0^1 \left(\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor\right) \, dx &= \int_{1/2}^1 1 \, dx +\int_{1/3}^{1/2} 1 \, dx + \int_{1/3}^{1/4} 1 \, dx + \cdots \\[10pt] &= (1 - 1/2) + (1/2 - 1/3) + (1/3 - 1/4) + \cdots \\[10pt] &= \lim_{m \to \infty} 1-1/m = 1\;. \end{align*}
Am I correct?