$E[X] = \Large \int_{0}^{4} x \ cx$
$E[X] = \Large \int_{0}^{4} \frac{x^2}{8}$
$E[X] = \Large \frac{1}{8} \int_{0}^{4} x^2$
$E[X] = \Large \frac{1}{8} [\ \frac{x^3}{3} ]_{0}^{4}$
$E[X] = \Large \frac{1}{8} [\ \frac{4^3}{3} ]$
$E[X] = \Large \frac{8}{3} $
and $E[X^2] = \Large \int_{0}^{4} x^2 \ cx$
$E[X^2] = \Large\frac{1}{8} \int_{0}^{4} x^3$
$E[X^2] = \Large\frac{1}{8} [ \frac{x^4}{4}]_0^4$
$E[X^2] = \Large\frac{1}{8} [ \frac{4^4}{4}] = 8$
$Var[X] = E[X^2] - (E[X])^2$
$Var[X] = 8 - (\frac{8}{3})^2$
$Var[X] = \Large \frac{8}{9}$