2. Given $x \in\left(0, \frac{\pi}{2}\right), \sin ^{2} x, \sin x \cdot \cos x$, and $\cos ^{2} x$ cannot form a triangle, and the length of the interval of $x$ that satisfies the condition is $\arctan k$. Then $k$ equals $\qquad$ (Note: If $x \in(a, b), b>a$, then the length of such an interval is $b-a$).
2.2.

First, find the range of $x$ that can form a triangle.
(1) If $x=\frac{\pi}{4}$, then $\sin ^{2} \frac{\pi}{4} 、 \cos ^{2} \frac{\pi}{4} 、 \sin \frac{\pi}{4} \cdot \cos \frac{\pi}{4}$ can form a triangle.
(2) If $x \in\left(0, \frac{\pi}{4}\right)$, at this time,
$$
\sin ^{2} x\cos ^{2} x$, that is,
$$
\tan ^{2} x+\tan x-1>0 \text {. }
$$

Solving this, we get $\arctan \frac{\sqrt{5}-1}{2}<x<\frac{\pi}{4}$.
(3) If $x \in\left(\frac{\pi}{4}, \frac{\pi}{2}\right)$, similarly, we get
$$
\frac{\pi}{4}<x<\arctan \frac{\sqrt{5}+1}{2} \text {. }
$$

Thus, the range of $x$ for which these three positive numbers can form the side lengths of a triangle is $\left(\arctan \frac{\sqrt{5}-1}{2}, \arctan \frac{\sqrt{5}+1}{2}\right)$. The length of this interval is $\arctan \frac{\sqrt{5}+1}{2}-\arctan \frac{\sqrt{5}-1}{2}=\arctan \frac{1}{2}$. Therefore, the length of the interval of $x$ that satisfies the condition is $\frac{\pi}{2}-\arctan \frac{1}{2}=\arctan k$. It is easy to find that $k=2$.