10. Solution: Let $u=x_{1} x_{2}$, then by the basic inequality, we have $0<u$ $\leqslant \frac{k^{2}}{4}$
$$
\begin{aligned}
& \left(\frac{1}{x_{1}}-x_{1}\right)\left(\frac{1}{x_{2}}-x_{2}\right)=\frac{1}{x_{1} x_{2}}-\frac{x_{1}^{2}+x_{2}^{2}}{x_{1} x_{2}}+x_{1} x_{2} \\
= & x_{1} x_{2}-\frac{k^{2}-1}{x_{1} x_{2}}+2=u-\frac{k^{2}-1}{u}+2 .
\end{aligned}
$$

Let $f(u)=u-\frac{k^{2}-1}{u}+2$.
When $k \geqslant 1$, the function $f(u)$ is increasing on $\left(0, \frac{k^{2}}{4}\right]$, then $f(u) \leqslant f\left(\frac{k^{2}}{4}\right)=\left(\frac{k}{2}-\frac{2}{k}\right)^{2}$.
Therefore, for $f(u) \geqslant\left(\frac{k}{2}-\frac{2}{k}\right)^{2}$, we must have $0<k<1$.
Since $f(u)=u+\frac{1-k^{2}}{u}+2$ is decreasing on $\left(0, \sqrt{1-k^{2}}\right]$ and increasing on $\left(\sqrt{1-k^{2}},+\infty\right)$, to ensure that $f(u) \geqslant\left(\frac{k}{2}-\frac{2}{k}\right)^{2}=f\left(\frac{k^{2}}{4}\right)$ for all $u$ in $\left(0, \frac{k^{2}}{4}\right]$, it must be that $\frac{k^{2}}{4} \leqslant \sqrt{1-k^{2}}$.
Solving this, we get $0<k \leqslant 2 \sqrt{\sqrt{5}-2}$.
Thus, the range of $k$ is $0<k \leqslant 2 \sqrt{\sqrt{5}-2}$.
10. (15 points) Given the set $D=\left\{\left(x_{1}, x_{2}\right)\left|x_{1}\right\rangle\right.$ $\left.0, x_{2}>0, x_{1}+x_{2}=k\right\}$, where $k$ is a positive constant. Find the range of $k$ such that the inequality $\left(\frac{1}{x_{1}}-x_{1}\right)\left(\frac{1}{x_{2}}-x_{2}\right) \geqslant$ $\left(\frac{k}{2}-\frac{2}{k}\right)^{2}$ holds for any $\left(x_{1}, x_{2}\right) \in D$.