Solution (source code)

= Solution

On $0<x<2$, $2x-x^2=x(2-x)>0$. A valid <probability density function> must integrate to one, so
$$
1=\alpha\int_0^2(2x-x^2)\,dx=\alpha\left[x^2-\frac{x^3}{3}\right]_0^2=\frac43\alpha.
$$
Thus $\alpha=3/4$, which is positive and ensures nonnegativity. Its <expected value> is
$$
\mathbb E[X]=\frac34\int_0^2(2x^2-x^3)\,dx=\frac34\left[\frac{2x^3}{3}-\frac{x^4}{4}\right]_0^2=1.
$$
Therefore
$$
\boxed{\text{Valid with }\alpha=\frac34,\qquad\mathbb E[X]=1.}
$$
The <probability density function> is symmetric around $1$, providing a second check on the <expected value>.