integration of $(1-x)^mx^n$ from $0$ to $1$, $m$ and $n$ positive integers trying to integrate $\int_0^1 (1-x)^m x^n dx$, $m$ and $n$ positive integers. I know the answer is a fraction containing gamma functions but don't know how to get there
 A: Another approach, that is closely related to the Beta function, is to integrate by parts, assuming $m\gt0$
$$
\begin{align}
\int_0^1(1-x)^mx^n\,\mathrm{d}x
&=-\frac1{n+1}\int_0^1(1-x)^m\,\mathrm{d}x^{n+1}\\
&=\frac1{n+1}\int_0^1x^{n+1}\,\mathrm{d}(1-x)^m\\
&=\frac{m}{n+1}\int_0^1(1-x)^{m-1}x^{n+1}\,\mathrm{d}x\tag{1}
\end{align}
$$
We can iterate $(1)$ to get
$$
\begin{align}
\int_0^1(1-x)^mx^n\,\mathrm{d}x
&=\frac{m}{n+1}\frac{m-1}{n+2}\cdots\frac1{n+m}\int_0^1x^{n+m}\,\mathrm{d}x\\
&=\frac{m}{n+1}\frac{m-1}{n+2}\cdots\frac1{n+m}\frac1{n+m+1}\\
&=\frac{n!\,m!}{(n+m+1)!}\\
&=\frac{\Gamma(n+1)\Gamma(m+1)}{\Gamma(n+m+2)}\\[6pt]
&=\mathrm{B}(n+1,m+1)\tag{2}
\end{align}
$$
If $m=0$, then $(2)$ does not need iteration.
In fact, the Beta function is often defined as
$$
\mathrm{B}(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}\,\mathrm{d}t\tag{3}
$$
A: Using the binomial expansion, we can write
$$\begin{align}
\int_0^1 (1-x)^m x^n dx&=\int_0^1 \sum_{k=0}^m \binom{m}{k} (-1)^kx^k x^n dx\\
&=\sum_{k=0}^m \binom{m}{k} (-1)^k \int_0^1  x^{k+n} dx\\
&=\sum_{k=0}^m \binom{m}{k} \frac{(-1)^k}{k+n+1}
\end{align}$$
Of course, we could write the binomial coefficient in terms of the gamma function as
$$\binom{m}{k}=\frac{\Gamma(m+1)}{\Gamma(k+1)\Gamma(m+1-k)}$$
