Solution (source code)

= Solution

Normalize the <Rayleigh distribution> by substituting $s=x^2/(2\sigma^2)$:
$$
1=A\int_0^\infty xe^{-x^2/(2\sigma^2)}\,dx=A\sigma^2,
\qquad\boxed{A=\sigma^{-2}}.
$$
For its sketch, the density starts at zero, is positive for $x>0$, and tends to zero at infinity. <Differentiation> gives
$$
f'(x)=\frac{e^{-x^2/(2\sigma^2)}}{\sigma^2}
\left(1-\frac{x^2}{\sigma^2}\right).
$$
It therefore has a single maximum at $x=\sigma$, with height $e^{-1/2}/\sigma$.

\Image[/past-exam-of-the-mathematics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2014/paper-2-rayleigh-density.png]
{title=Rayleigh density in units of its scale parameter, with its mode and mean}

The <expected value> is
$$
E[X]=\frac1{\sigma^2}\int_0^\infty x^2e^{-x^2/(2\sigma^2)}\,dx.
$$
Integrating by parts with $x\,dx\,e^{-x^2/(2\sigma^2)}=-\sigma^2\,d(e^{-x^2/(2\sigma^2)})$ makes the boundary term vanish and leaves $\int_0^\infty e^{-x^2/(2\sigma^2)}\,dx$. The <Gaussian integral> gives
$$
\boxed{E[X]=\sigma\sqrt{\frac\pi2}}.
$$