9. Given the sequence $a_{n}=\sqrt{4+\frac{1}{n^{2}}}+\sqrt{4+\frac{2}{n^{2}}}+\cdots+\sqrt{4+\frac{n}{n^{2}}}-2 n, n$ is a positive integer, then the value of $\lim _{n \rightarrow \infty} a_{n}$ is $\qquad$
9. $\frac{1}{8}$

Since $\sqrt{4+\frac{\bar{k}}{n^{2}}}\sqrt{2^{2}+\frac{k}{n^{2}}+\left(\frac{k-1}{4 n^{2}}\right)^{2}}=2+$ $\frac{k-1}{4 n^{2}}, 1 \leqslant k \leqslant n$,
thus $a_{n}>\sum_{k=1}^{n}\left(2+\frac{h-1}{4 n^{2}}\right)-2 n=\frac{n-1}{8 n}$.
Therefore, $\frac{n-1}{8 n}<a_{n}<\frac{n+1}{8 n}$, and $\lim _{n \rightarrow \infty} \frac{n-1}{8 n}=\lim _{n \rightarrow \infty} \frac{n+1}{8 n}=\frac{1}{8}$, hence $\lim _{n \rightarrow \infty} a_{n}=\frac{1}{8}$.