Suppose that a random variableX has distribution function

F(x):

1-(1+x)exp(-x) - (x > 0)

0 - (x<0)

(a) Find the density function ofX.

(b) Find the mean and variance of X.

Could anyone please go through this in steps please. I know the theory but havn't seen a practical example. Thanks alot!