Expected value of the maximum and minimum of $n$ independent random vairables In my statistics book I was encountered by the task to calculate the maximum and minimum of $n$ independent random variables, which are uniformly distributed over $(0,1)$. Knowing the definition of the density function I get that
$f_{\mathbb{X}}(x) = {1\over {b-a}}, a=0, b=1$
which gives
$f_{\mathbb{X}}(x) = {1\over {1-0}}, 1$
The distribution function then becomes, simply, $x$. To get the maximum of the $n$ variables (let's call this $\mathbb{Z}$) I get
$F_{\mathbb{Z}}(x) = \Pi_{i=1}^{n} F_{\mathbb{X}_i}(x) = x^n$
For the minimum ($\mathbb{Y}$) I get
$F_{\mathbb{Z}}(x) = 1-\Pi_{i=1}^{n} 1- F_{\mathbb{X}_i}(x) = 1-(1-x)^n$
So, to the get the expected values I have two choices (which are really the same thing); integrate the density functions over $(0,1)$, or just take $F(1)-F(0)$. Either way, I get that
$E(\mathbb{Z}) = F_{\mathbb{Z}}(1)-F_{\mathbb{Z}}(0) = 1^n - 0^n = 1$
$E(\mathbb{Y}) = F_{\mathbb{Y}}(1)-F_{\mathbb{Y}}(0) = (1-(1-1)^n) - (1-(1-0)^n) = (1-0)-(1-1) = 1$
My books disgree, claiming that the expected values are
$E(\mathbb{Z}) = {n \over {n+1}}$
$E(\mathbb{Y}) = {1\over n}$
Since I can't see how this is true, I'd simply like to know where I went wrong, and what I should've done?

$f_Z(x)=nx^{n-1}$ then $EZ=\int_0^1 x nx^{n-1}dx=n\int_0^1x^ndx=n\left(\frac{x^{n+1}}{n+1}|_0^1\right)=\frac{n}{n+1}$
$f_Y(x)=n(1-x)^{n-1}$ then $EY=\int_0^1 x n(1-x)^{n-1}dx=n\int_0^1x(1-x)^{n-1}dx$
$=-\int_0^1xd(1-x)^{n}=-x(1-x)^n|_0^1+\int_0^1(1-x)^ndx=-\int_0^1(1-x)^nd(1-x)$
$=-\frac{(1-x)^{n+1}}{n+1}|_0^1=\frac{1}{n+1}$
