Solution (source code)

= Solution

Let $F$ be the <cumulative distribution function> of $X$. Normalisation of the proposed <probability density function> requires $M=\int_{-2}^2F(y)\,dy$. The <integrated cumulative distribution function on a bounded interval> identity gives
$$
M=2-\mathbb E[X]=\boxed{2}.
$$
For a direct symmetry proof, the continuous symmetric <probability distribution> satisfies $F(-y)=1-F(y)$. Hence
$$
\int_{-2}^2F(y)\,dy=\int_0^2[F(y)+F(-y)]\,dy=\int_0^2 1\,dy=2.
$$
In particular $g(y)=F(y)/2$ is nonnegative and has total <integral> one over its stated support.