Solution (source code)

= Solution

Independence gives $\phi_{X-Y}(u)=\phi_X(u)\phi_X(-u)=|\phi_X(u)|^2=1$ for $|u|<\varepsilon$. Taking real parts shows $\mathbb E[1-\cos(u(X-Y))]=0$. The integrand is nonnegative, so it vanishes almost surely for each such $u$.

Choose a countable sequence of positive $u_j\to0$ in that interval, and intersect the corresponding probability-one events. On their intersection, a nonzero difference $D=X-Y$ would give $0<|u_jD|<2\pi$ for large $j$, contradicting $\cos(u_jD)=1$. Thus $X=Y$ almost surely, and part (a) proves \b[$X$ is almost surely constant].