For a laboratory assignment, if the equipment is working, the density function of the observed outcome $X$ is
$$ f(x) = \begin{cases} 2(1-x), & 0 <x<1, \\ 0, & \text{otherwise.} \end{cases} $$
Find the variance and standard deviation of $X$.
We know that the variance is related to the mean and the second moment. I am stuck on how to set up the integrals for the both of them.