Solution (source code)

= Solution

The difference of the two <eigenvalues> is $2i\sin U$, hence $\Delta=\sin^2U$. Its <expectation> is
$$
\boxed{\mathbb E\Delta=\frac1{2\pi}\int_0^{2\pi}\sin^2u\,du=\frac12.}
$$
For $0\leq x\leq1$, put $\alpha=\arcsin\sqrt{x}\in[0,\pi/2]$. The set of angles satisfying $|\sin u|\leq\sqrt{x}$ consists of $[0,\alpha]$, $[\pi-\alpha,\pi+\alpha]$ and $[2\pi-\alpha,2\pi]$, of total length $4\alpha$. Thus the full <cumulative distribution function> is
$$
\boxed{F_\Delta(x)=
\begin{cases}
0,&x<0,\\
\dfrac2\pi\arcsin\sqrt{x},&0\leq x\leq1,\\
1,&x>1.
\end{cases}}
$$
Differentiating on $(0,1)$ gives the <probability density function>
$$
\boxed{f_\Delta(x)=\frac1{\pi\sqrt{x(1-x)}},\qquad0<x<1.}
$$
This is the <arcsine distribution>, equivalently the <beta distribution> with both parameters $1/2$. It has no atoms at either endpoint.