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!

With the help of reuns,I can complete the proof.
\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}{2k^2}-\frac{1}{k+1}\right)\\&=\frac{1}{2}.
\end{aligned}
\end{equation}
Since
$$\frac{1}{n}=\sum_{k=n}^\infty \frac{1}{k(k+1)}<\sum_{k=n}^\infty \frac{1}{k^2}<\sum_{k=n}^\infty \frac{1}{k(k-1)}=\frac{1}{n-1}$$
and
$$\frac{1}{n^3}\leq\sum_{k=n}^\infty\frac{1}{k^3}\leq\frac{1}{n}\sum_{k=n}^\infty\frac{1}{k^2}<\frac{1}{n(n-1)}.$$
Thanks to Martin R for reminding.
The following part is by Adam Latosiński, I just modified the typographical errors.Thanks for his help!
We still need to show that $\lim\limits_{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=[ 1/x]$, so that $\frac{1}{n+1}<x\le\frac{1}{n}$, that is $n\le\frac{1}{x}<{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 F(1/n) \left|n-\frac{1}{x}\right| + (n+1) |F(1/n)-F(x)|  \\
&\le F(1/n) + (n+1) \int_{x}^{\frac{1}{n}} \Big(\frac{1}{t}- \left[\frac{1}{t}\right]\Big) dt  \\
&\le F(1/n) + (n+1) \int_{x}^{\frac{1}{n}} 1 \,dt  \\
&\le F(1/n) + (n+1)(\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$$
