How to bound the following sum I am interested in bounding the sum
$$S(x)=\sum_{i\leq x}\vert\{x/i\}-\{x/(i+1)\}\vert$$
where $\{x\}$ is the fractional part of $x$.
A calculation on MATHEMATICA seems to suggest $$S(x)=O(x^\theta)$$
where $\theta$ is some real number less than 1.
Question: Is there any theoretical evidence for such a conjecture?
 A: We have 
$$
\begin{align}
S(x)&=\sum _{i\le x}\left|\{\tfrac xi\}-\{\tfrac x{i+1}\}\right|\\
&= \sum _{i\le \sqrt x}\left|\{\tfrac xi\}-\{\tfrac x{i+1}\}\right|+\sum _{\sqrt x <i\le x}\left|\{\tfrac xi\}-\{\tfrac x{i+1}\}\right|\\
&\le \lfloor \sqrt x\rfloor+\sum_{1\le k\le \sqrt x}\sum_{\frac x{k+1}<i\le \frac xk} \left|\{\tfrac xi\}-\{\tfrac x{i+1}\}\right|\\
&\le\lfloor \sqrt x\rfloor+\sum_{1\le k\le \sqrt x}\left(1+\sum_{\frac x{k+1}<i\le \frac xk-1} \left|\bigl\{\tfrac xi\bigr\}-\bigl\{\tfrac x{i+1}\bigr\}\right|\right)\\
&=\lfloor \sqrt x\rfloor+\sum_{1\le k\le \sqrt x}\left(1+\sum_{\frac x{k+1}<i\le \frac xk-1} \left|\frac xi-\frac x{i+1}\right|\right)\\
&\le \lfloor \sqrt x\rfloor+\lfloor \sqrt x\rfloor+\sum_{1\le k\le \sqrt x}\left(\frac{x}{x/(k+1)}-\frac{x}{x/k}\right)\\
&=2\lfloor \sqrt x\rfloor+\sum_{1\le k\le \sqrt x}1\\
&= 3\lfloor \sqrt x\rfloor.
\end{align}
$$
(For the crucial step notice that $\{\alpha\}-\{\beta\}=\alpha-\beta$ if $\lfloor \alpha\rfloor = \lfloor \beta\rfloor$.)
Hence $S(x)=O(x^\theta)$ with $\theta=\frac12$.
