Evaluating $E[\max(X,Y)]$ Let X and Y be positive independent random variables, and
$$W=\max(X,Y)$$
Define the CDFs of X and Y as $F(x)$ and $G(y)$, respectively.
$$\Pr(W\le w)=\Pr(X\le w)\Pr(Y\le w)=F(w)G(w)$$
$$E[W]=\int_0^{\infty}wF(w)g(w)dw+\int_0^{\infty}wf(w)G(w)dw$$
In an earlier post the second answer says that "if X and Y are independent with uniform distribution on $(0,1)$, then $E[W]=2/3$."  I am having trouble seeing how this is so.  Please spell it out for me.
In particular, I am having trouble seeing how an integral like $$\int_0^{\infty}wF(w)g(w)dw$$ can be evaluated since $F(w)$ is itself an integral.  If $F(w)$ is the normal CDF, for example, it is already intractable.  So it seems to me that integrating something with $F(w)$ in it must be super duper intractable.
 A: 
"if X and Y are independent with uniform distribution on $(0,1)$ , then $\mathsf E[W]=2/3$ ." I am having trouble seeing how this is so. Please spell it out for me.

For two independent and uniform distributions, we have:
$$\begin{align}
F(w) & = w \;\mathbf 1_{(0;1)}(w)
\\ & = G(w) 
\\[1ex]
 f(w) & = \mathbf 1_{(0;1)}(w) 
\\ & = g(w)
\\[2ex] 
\mathsf E(W) 
 & = \int_0^\infty w \;F(w)\; g(w)\operatorname d w + \int_0^\infty w \;f(w)\; G(w)\operatorname d w
\\[1ex] & = 2 \int_0^\infty w \;F(w)\; f(w)\operatorname d w
\\[1ex] & = 2 \int_0^\infty w\cdot w\;\mathbf 1_{(0;1)}(w)\cdot \mathbf 1_{(0;1)}(w) \operatorname d w
\\[1ex] & = 2 \int_0^1 w^2\; \operatorname d w
\\[1ex] & = 2 \Big[\tfrac 1 3 w^3\Big]_{w=0}^{w=1}
\\[1ex] & = \tfrac 2 3
\end{align}$$

Alternatively we can obtain this by:
$$\begin{align}
\mathsf E(\max(X,Y)) 
& = \int_{-\infty}^\infty \int_{-\infty}^\infty \max(x,y)\; f_{X,Y}(x,y)\operatorname d y
\\[1ex] 
& = \int_{-\infty}^\infty \int_{\infty}^x x\; f_X(x)\;f_Y(y)\operatorname d y+\int_x^\infty y\; f_X(x)\,f_Y(y)\operatorname d y \operatorname d x
\\[1ex] 
& = \int_0^1 x \int_0^x 1\operatorname d y+\int_x^1 y \operatorname d y \operatorname d x
\\[1ex] 
& = \int_0^1 x^2 + \tfrac 1 2 (1-x^2)\operatorname d x
\\[1ex] 
& = \tfrac 1 2 \int_0^1 x^2 + 1\operatorname d x
\\[1ex] 
& = \tfrac 1 2 \Big[\tfrac 1 3 x^3 + x\Big]_{x=0}^{x=1}
\\[1ex] 
& = \tfrac 2 3
\end{align}$$
A: One example of where integrating a CDF isn't "intractable" - if $X$ is a continuous random variable, then with Tonelli's theorem we can show that
$$ \mathbb E[F(X)] = \int_{-\infty}^\infty F(x)f(x)\mathsf dx = \left[\frac12F(x)^2\right]_{-\infty}^\infty=\frac12.$$
For your particular example, where $X,Y\stackrel{\mathrm{i.i.d.}}\sim U(0,1)$, we can evaluate $\mathbb E[W]$ where $W=\max\{X,Y\}$ from the result in the previous question by a straightforward computation:
\begin{align}
\mathbb E[W] &= \int_{\mathbb R} w(f_X(w)F_Y(w) +F_x(w)f_y(w))\mathsf dw\\
&= \int_0^1 w(1\cdot w + 1\cdot w)\mathsf dw\\
&= \int_0^1 2w^2 \mathsf dw\\
&= \frac23.
\end{align}
A: A uniform random variable has a density function $f(w) = 1$ for $w \in [0, 1]$ and distribution:
    $$F(w) = P(X \leq w) = w$$
So plugging these into
$$E[W]=\int_0^{\infty}wF(w)g(w)dw+\int_0^{\infty}wf(w)G(w)dw$$
we have:
\begin{eqnarray*}
E[W] &=& \int_0^{1}w^2dw+\int_0^1w^2dw \\
&=& 2 \frac{w^3}{3}|_0^1 \\
&=& 2/3
\end{eqnarray*}
A: For $X$ and $Y$ uniform (and independent) on $[0,1]$ we can find the cdf of $W=\max\{X,Y\}$ fairly easily:
$P(W\le w)=P(X\le w \wedge Y\le w)=w^2$ ($0\le w \le 1)$.
So the pdf of $W$ is $2w$ for $0\le w \le 1$ from there you can find the expected value of $W$.
A: CDF of a uniform distribution is simply $F(w)=w$ and $G(w)=w$. Then, we have $Z(w)=F(w)G(w)=w^2$.
Expectation of a positive random variable can be calculated over it CDF as 
$$\int_{0}^\infty (1-Z(w))\mathrm{d}w=\int_{0}^1 (1-w^2)\mathrm{d}w=2/3.$$
