<s>[INST] Calculate $\int_0^1{x·\lceil1/x\rceil dx}$ I am trying to calculate following integral:
$$\int_0^1{x·\biggl\lceil \frac{1}{x}\biggr\rceil dx}$$
I tried usual change t=1/x but not able to further advance.
Thanks! 
 [/INST] $$
\begin{aligned}
\int_0^1x\cdot\left\lceil \frac{1}{x}\right\rceil\; dx
&=
\sum_{k\ge 1}
\int_{1/(k+1)}^{1/k}x\cdot
\underbrace{\left\lceil \frac{1}{x}\right\rceil}_{\in (k,k+1)\text{ a.e}} \;dx
\\
&=
\sum_{k\ge 1}
\int_{1/(k+1)}^{1/k}x\cdot
(k+1)\;dx
\\
&=
\sum_{k\ge 1}
(k+1)
\left[\ \frac 12 x^2\ \right]_{1/(k+1)}^{1/k}
\\
&=
\frac 12
\sum_{k\ge 1}
(k+1)
\left[\  \frac 1{k^2}-\frac 1{(k+1)^2}\ \right]_{1/(k+1)}^{1/k}
\\
&=
\frac 12
\sum_{k\ge 1}
\frac {2k+1}{k^2(k+1)}
\\
&=
\frac 12
\sum_{k\ge 1}
\frac k{k^2(k+1)}
+
\frac 12
\sum_{k\ge 1}
\frac {k+1}{k^2(k+1)}
\\
&=
\frac 12
\sum_{k\ge 1}
\left[
\frac 1k-\frac 1{k+1}\right]
+
\frac 12
\sum_{k\ge 1}
\frac 1{k^2}
\\
&=
\frac 12\cdot 1+\frac 12\cdot\frac{\pi^2}6\ .
\end{aligned}
$$
Computer check, here PARI/GP:
? intnum( x=1.e-12, 1, x*ceil(1/x), 8 )
%12 = 1.3224146303918600341384604269228003273
? 1/2 + Pi^2/12
%13 = 1.3224670334241132182362075833230125946

</s>