Expected value of maximum of two random variables from uniform distribution

If I have two variables $X$ and $Y$ which randomly take on values uniformly from the range $[a,b]$ (all values equally probable), what is the expected value for $\max(X,Y)$?

-

Here are some useful tools:

1. For every nonnegative random variable $Z$, $\mathrm E(Z)=\int_0^{+\infty}\mathrm P(Z\geqslant z)\,\mathrm dz$.
2. As soon as $X$ and $Y$ are independent, $\mathrm P(\max(X,Y)\leqslant z)=\mathrm P(X\leqslant z)\,\mathrm P(Y\leqslant z)$.
3. If $U$ is uniform on $(0,1)$, then $a+(b-a)U$ is uniform on $(a,b)$.

If $(a,b)=(0,1)$, items 1. and 2. together yield $\mathrm E(\max(X,Y))=\int_0^1(1-z^2)\,\mathrm dz=\frac23$. Then item 3. yields the general case, that is, $\mathrm E(\max(X,Y))=a+\frac23(b-a)=\frac13(2b+a)$.

-

did's excellent answer proves the result. The picture here

may help your intuition. This is the "average" configuration of two random points on a interval and, as you see, the maximum value is two-thirds of the way from the left endpoint.

-