integral with combinatorics I have to solve the integral
    $$\int_{0}^{1} u^n*(1-u)^m\, du$$
using only combinatorics.
Let suppose you have the interval $(0,1)$ and you can choose $n+m$ numbers, The probability that n numbers are $< u$ and m number are $ > u$, is
    $$ u^n*(1-u)^m = \tfrac{n!*m!}{(n+m)!}$$
and then  $$\int_{0}^{1} u^n*(1-u)^m\, du=\tfrac{n!*m!}{(n+m)!}*\int_{0}^{1}du=\tfrac{n!*m!}{(n+m)!}$$
But the suggested solution is 
$$\tfrac{n!*m!}{(n+m+1)!}$$
and i don't understand why
 A: You should be careful in using $*$ or $\cdot$, because in a probabilistic context they mean very different things (convolution / usual product). Assume that $P_1,P_2,\ldots,P_n,P_{n+1},P_{n+2},\ldots,P_{n+m}$ are chosen uniformly (and independently) at random in the interval $[0,1]$. For any $u\in[0,1]$, the probability that all $P_1,\ldots,P_n$ lie in $[0,u]$ is $u^n$ and the probability that all $P_{n+1},\ldots,P_{n+m}$ lie in $[u,1]$ is $(1-u)^m$. As a consequence,
$$ \int_{0}^{1} u^n(1-u)^{m}\,du $$
is not the probability that all the $P_1,\ldots,P_n$ points come before any of the $P_{n+1},\ldots,P_{n+m}$ points, but it is the average value of $\max(P_1,\ldots,P_n)$ in the previous assumption. There are $(n+m)!$ permutations in $S_{n+m}$ and $n! m!$ of them fulfill the constraint $$\max(P_1,\ldots,P_n)\leq \min(P_{n+1},\ldots,P_{n+m}),$$
but since $n+m$ points break the interval $[0,1]$ in $n+m+1$ sub-intervals, ultimately
$$ \int_{0}^{1}u^n(1-u)^m\,du = \frac{n!m!}{(n+m)!}\cdot\frac{1}{n+m+1} = \frac{m! n!}{(m+n+1)!}$$
and the mistery is solved.
