Prove that $\int_0^1{\left\lfloor{1\over x}\right\rfloor}^{-1}\!dx={1\over2^2}+{1\over3^2}+{1\over4^2}+\cdots.$

We observe that: if $x\in\big(\frac{1}{k+1},\frac{1}{k}\big]$, then $\frac{1}{x}\in[k,k+1)$, thus $\left\lfloor{1\over x}\right\rfloor=k$ and hence $$ \left\lfloor{1\over x}\right\rfloor^{-1}=\frac{1}{k}, \quad \text{whenever}\,\, x\in\Big(\frac{1}{k+1},\frac{1}{k}\Big]. $$ Therefore $$ \int_{1/n}^1{\left\lfloor{1\over x}\right\rfloor}^{-1}dx=\sum_{k=1}^{n-1} \int_{1/(k+1)}^{1/k}{\left\lfloor{1\over x}\right\rfloor}^{-1}dx=\sum_{k=1}^{n-1} \int_{1/(k+1)}^{1/k}\frac{1}{k}dx=\sum_{k=1}^{n-1}\frac{1}{k}\cdot\frac{1}{k(k+1)}, $$ and thus $$ \int_0^1 {\left\lfloor{1\over x}\right\rfloor}^{-1}dx=\lim_{n\to\infty} \int_{1/n}^1{\left\lfloor{1\over x}\right\rfloor}^{-1}dx= \sum_{n=1}^\infty \frac{1}{n^2(n+1)}. $$ Meanwhile $$ \sum_{n=1}^\infty \frac{1}{n(n+1)}=\sum_{n=1}^\infty\left(\frac{1}{n}-\frac{1}{n+1}\right)=1 \quad\text{and}\quad \frac{1}{n^2}-\frac{1}{n(n+1)}=\frac{1}{n^2(n+1)}. $$ Hence, finally \begin{align} \frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}+\cdots&=\sum_{n=1}^{\infty}\frac{1}{n^2}-1 =\sum_{n=1}^{\infty}\frac{1}{n^2}-\sum_{n=1}^\infty \frac{1}{n(n+1)}\\&=\sum_{n=1}^\infty \frac{1}{n^2(n+1)}=\int_0^1 {\left\lfloor{1\over x}\right\rfloor}^{-1}dx. \end{align}


$\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{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ \begin{align}&\color{#66f}{\large% \int_{0}^{1}\left\lfloor{1 \over x}\right\rfloor^{-1}\,\dd x} =\int_{\infty}^{1}\left\lfloor x\right\rfloor^{-1}\,\pars{-\,{\dd x \over x^{2}}} =\int_{1}^{\infty}{\dd x \over \floor{x}x^{2}} \\[5mm]&=\lim_{N \to \infty}\bracks{% \int_{1}^{2}{\dd x \over x^{2}} + \int_{2}^{3}{\dd x \over 2x^{2}}+\cdots +\int_{N - 1}^{N}{\dd x \over \pars{N - 1}x^{2}}} \\[5mm]&=\lim_{N \to \infty}\bracks{% \int_{0}^{1}{\dd x \over \pars{x + 1}^{2}} + \int_{0}^{1}{\dd x \over 2\pars{x + 2}^{2}} + \cdots +\int_{0}^{1}{\dd x \over \pars{N - 1}\pars{x + N - 1}^{2}}} \\[5mm]&=\lim_{N \to \infty}\int_{0}^{1} \sum_{k = 1}^{N - 1}{1 \over k\pars{x + k}^{2}}\,\dd x =-\lim_{N \to \infty}\int_{0}^{1} \partiald{}{x}\sum_{k = 0}^{N - 2}{1 \over \pars{k + x + 1}\pars{k + 1}}\,\dd x \\[5mm]&=-\int_{0}^{1}\partiald{}{x}\bracks{\Psi\pars{x + 1} - \Psi\pars{1}\over x} \,\dd x =-\bracks{\Psi\pars{2} - \Psi\pars{1} - \Psi'\pars{1}} \\[5mm]&=\Psi'\pars{1} - 1 = \color{#66f}{\Large{\pi^{2} \over 6} - 1} \approx {\tt 0.6449} \end{align}

$\ds{\Psi\pars{z}}$ is the Digamma Function and we used the properties \begin{align} &\sum_{k = 0}^{\infty}{1 \over \pars{k + \mu}\pars{k + \nu}} = {\Psi\pars{\mu} - \Psi\pars{\nu} \over \mu - \nu}\,,\qquad \begin{array}{|rcl} \ \Psi\pars{z + 1} & = & \Psi\pars{z} + {1 \over z} \\ \Psi'\pars{1} & = & {\pi^{2} \over 6} \end{array} \end{align}