Let $H$ be a seperable Hilbert space, and $T$ is self-adjoint. I am asked to prove that $T$ is cyclic iff it is unitary equivalent to a multiplication operator on $L^2(X,\mu)$, where $X\subset \mathbb{R}$ is compact and $\mu$ is a finite Borel measure, which means there exists an unitary operator $U:H\rightarrow L^2(X,\mu)$ and a multiplication operator $M$ on $L^2(X,\mu)$ such that $UTU^{-1}=M$.
Here, $T $ is cyclic means there exists a cyclic vector $x\in H$. We call $x\in H$ is cyclic if $\{T^n x:\,n\in\mathbb{N}\}$ is dense in $H$.
If $T$ is cyclic, I can prove $T$ is unitary to $M_\psi$, where $X=\sigma(T)$ is the spectrum set, $\psi(t)=t$ and $M_\psi(f)=\psi f$. However, I can not prove the other direction, since the space $X$ is totally unknown. Can anyone give me some hints or solutions? Thanks a lot!