Integral: $\int_{0}^{x}\lfloor\frac{1}{1-t}\rfloor \,dt$ I'm working on an integral problem(the rest of which is irrelevant) and this integral arises, which has stumped me.
$$\int_{0}^{1}\int_{0}^{x}\left\lfloor\frac{1}{1-t}\right\rfloor dt \,dx$$
$\bf\lfloor\quad\rfloor$ is Floor function.
Looking at $\int\limits_{0}^{x}\left\lfloor\dfrac{1}{1-t}\right\rfloor dt$:
Clearly this diverges for x = 1, but is there any representation in terms of $\zeta(x)$?
So far I have:
$$\int_{0}^{1}\left\lfloor\frac{1}{1-t}\right\rfloor dt = \sum_{n=0}^{\infty}\int_{\frac{n}{n+1}}^{\frac{n+1}{n+2}} \thinspace (n+1)\,dt = \zeta(1)-1$$
But I am unsure how to address the issue of finding what interval x is between and calculate the area up to x in relation to x since there are different bounds x could be located in. I suppose something like this could work but it doesn't seem like something that could be further integrated form 0 to 1.
$$A = \left\lfloor\frac{1}{1-x}\right\rfloor-1$$
$$\sum_{n=0}^{A}\int_{\frac{n}{n+1}}^{\frac{n+1}{n+2}} \thinspace (n+1)\,dt + \int_{\frac{A}{A+1}}^{x}(A+1)\,dt$$
 A: Denote $f(t) = \lfloor 1/(1-t) \rfloor$, and consider the function
$$
g(x,t) = \Theta(x - t) f(t),
$$
where $\Theta(u)$ is the Heaviside step function.  Since $g(x,t) = f(t)$ on the original region of integration, we can expand the region of integration to the unit square:
$$
\int_{0}^{1}\int_{0}^{x} f(t) \, dt \, dx = \int_0^1 \int_0^1 \Theta(x - t) f(t) \, dt \, dx.
$$
The function $g(x,t)$ is non-negative and measurable, so by Tonelli's Theorem (credit to @RRL for pointing this out in the comments), we can exchange the order of integration:
$$
\int_0^1 \int_0^1 \Theta(x - t) f(t) \, dt \, dx = \int_0^1 \int_0^1 \Theta(x - t) f(t) \, dx \, dt = \int_0^1 \left[ \int_t^1 f(t) \, dx \right] dt.
$$
This integral can then be performed:
\begin{align*}
\int_{0}^{1} \left[ \int_{t}^{1} f(t) \, dx  \right] dt &= \int_0^1 (1 - t) f(t) \, dt \\
&= \sum_{n = 0}^\infty \int_{n/(n+1)}^{(n+1)/(n+2)} (1-t) (n+1) \, dt \\
&= \sum_{n = 0}^\infty (n+1)\left[ t - \frac{t^2}{2} \right]_{n/(n+1)}^{(n+1)/(n+2)} \\
&= \sum_{n = 0}^\infty \frac{3 + 2n}{2(n+1)(n+2)^2} \\
&= \sum_{n = 0}^\infty \left[ \frac{1}{2(n+1)} - \frac{1}{2(n+2)} + \frac{1}{2 (n+2)^2} \right] \\
&= \sum_{n = 1}^\infty \left[ \frac{1}{2n} - \frac{1}{2(n+1)}\right] + \frac{1}{2} \sum_{n=2}^\infty  \frac{1}{n^2}  \\&= \frac{1}{2} + \frac{1}{2} (\zeta(2) - 1)  = \frac{\zeta(2)}{2} = \frac{\pi^2}{12}.
\end{align*}
In the last step, we have used telescoping series to perform the first sum, and the second sum is the definition of $\zeta(2)$ except that it's missing the $n = 1$ term ($1/1^2$).
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
\int_{0}^{1}\int_{0}^{x}\left\lfloor{1 \over 1 - t}\right\rfloor\,\dd t\,\dd x
& =
\int_{0}^{1}\left\lfloor{1 \over 1 - t}\right\rfloor\,\int_{t}^{1}\dd x\,\dd t =
\int_{0}^{1}\left\lfloor{1 \over 1 - t}\right\rfloor\pars{1 - t}\,\dd t =
\int_{0}^{1}\left\lfloor{1 \over t}\right\rfloor t\,\dd t
\\[3mm] &=
\int_{1}^{\infty}{\left\lfloor t\right\rfloor \over t^{3}}\,\dd t =
\int_{1}^{2}{1 \over t^{3}}\,\dd t + \int_{2}^{3}{2 \over t^{3}}\,\dd t + \cdots
\\[3mm] & =
\int_{1}^{2}\bracks{{1 \over t^{3}} + {2 \over \pars{t + 1}^{3}} + \cdots}
\,\dd t =
\int_{1}^{2}\sum_{k = 0}^{\infty}{k + 1\over \pars{t + k}^{3}}
\,\dd t
\\[3mm] & = \int_{1}^{2}\bracks{%
\Psi\,'\pars{t} + \half\pars{t - 1}\Psi\,''\pars{t}}\,\dd t
\\[3mm] & =
\Psi\pars{2} - \Psi\pars{1} + \half\,\Psi\,'\pars{2} -
\half\int_{1}^{2}\Psi\,'\pars{t}\,\dd t
\\[3mm] & =
\half\bracks{\Psi\pars{2} - \Psi\pars{1}} + \half\,\Psi\,'\pars{2}
= \color{#f00}{\pi^{2} \over 12} \approx 0.8225
\end{align}
$\Psi$ is the digamma function.
