How to calculate the derivative of $\int_0^x \left(\frac{1}{t}-[\frac{1}{t}]\right)dt$ at $x=0$? Let $F(x):=\int_0^x \left(\frac{1}{t}-[\frac{1}{t}]\right)dt$ ,where $[\frac{1}{t}]$ is the largest integer no more than $\frac{1}{t}$.Prove $F'(0)=\frac{1}{2}$.
I have tried in this way:
\begin{equation}
\begin{aligned}
\lim_{n\to\infty}nF\left(\frac{1}{n}\right)&=\lim_{n\to\infty}n\sum_{k=n}^\infty\int_\frac{1}{k+1}^\frac{1}{k}\left(\frac{1}{t}-\left[\frac{1}{t}\right]\right)dt\\&=\lim_{n\to\infty}n\sum_{k=n}^\infty\int_\frac{1}{k+1}^\frac{1}{k}\left(\frac{1}{t}-k\right) dt\\&=\lim_{n\to\infty}n\sum_{k=n}^\infty \left(\ln(1+\frac{1}{k})-\frac{1}{k+1}\right)\\&=\lim_{n\to\infty}n\sum_{k=n}^\infty \left(\frac{1}{k}-\frac{1}{k+1}\right)\\&=1.
\end{aligned}
\end{equation}
Please give me some ideas,thank you!

I have a solution that utilises the digamma function:
\begin{align}  F(\frac{1}{n}) &= \sum_{k=n}^\infty \int_{\frac{1}{k+1}}^{\frac{1}{k}} (\frac{1}{t} - k)dt = \\
&= \sum_{k=n}^\infty \int_{k}^{k+1} \frac{s - k}{s^2} ds = \\
&= \sum_{k=n}^\infty \int_{0}^{1} \frac{s}{(s+k)^2} ds = \\
&= \sum_{k=0}^\infty\int_{0}^{1} s \frac{1}{(s+k+n)^2} ds = \\
&= \int_{0}^{1} s \,\psi'(s+n) ds = \\
&= [s\psi(s+n)]_{s=0}^1 - \int_{0}^{1} \psi(s+n) ds = \\
&= \psi(n+1) - [\ln \Gamma(s+n)]_{s=0}^1 = \\
&= \psi(n+1) - \ln \frac{\Gamma(n+1)}{\Gamma (n)} = \\
&= \psi(n+1) - \ln n\end{align}
For large $n$ we have Stirling formula  $\ln\Gamma(n+1) = (n+\frac12)\ln n - n + \mathcal O(n^{-1})$, so $\psi (n+1) = \ln n + \frac{1}{2n} + \mathcal O(n^{-2}) $, which gives
$$ \lim_{n\rightarrow\infty} nF(\frac{1}{n}) = \frac12$$
We still need to show that $\lim_{x\rightarrow 0} \frac{F(x)}{x} = \frac{1}{2}$ also when we approach by a sequence with $x\neq\frac{1}{n}$. Let $n=\lfloor 1/x\rfloor$, so that $\frac{1}{n+1}<x\le\frac{1}{n}$, that is $n\le\frac{1}{x}<\frac{1}{n+1}$. We have
\begin{align} \left|\frac{F(1/n)}{1/n} - \frac{F(x)}{x}\right| &\le \left|\frac{F(1/n)}{1/n} - \frac{F(1/n)}{x}\right| + \left|\frac{F(1/n)}{x} - \frac{F(x)}{x}\right| \le \\
&\le F(1/n) \left|n-\frac{1}{x}\right| + \frac{1}{n} |F(1/n)-F(x)| \le \\
&\le F(1/n) + \frac{1}{n} \int_{x}^{\frac{1}{n}} \Big(\frac{1}{t}- \lfloor\frac{1}{t}\rfloor\Big) dt \le \\
&\le F(1/n) + \frac{1}{n} \int_{x}^{\frac{1}{n}} 1 \,dt = \\
&\le F(1/n) + \frac{1}{n}(\frac{1}{n}-\frac{1}{n+1}) \rightarrow 0\end{align}
which proves that $$ \lim_{x\rightarrow 0} \frac{F(x)}{x} = \lim_{n\rightarrow\infty} nF(\frac{1}{n}) = \frac12$$
