Solution to a definite integral as $\int_0^{1}(x^{m}\left(1+x)^{n}dx\right)$ While solving a question based on Binomial series, I encountered a definite integral as : $$\int_0^{1}(x^{m}\left(1+x)^{n}dx\right)$$ where $m,n$ are natural numbers.
My approach : wrote the above expression in two ways (1)- $$\int_0^1\sum_{r=0}^n \binom{n}{r} \left( {x}\right)^{m+r}dx $$ and also as (2)- $$\int_0^1\sum_{r=0}^m \binom{m}{r} \left(-1)^{r}( {1+x}\right)^{m+n-r}dx$$ and tried to solve using both the above mentioned expressions. Did some other simplification of expression (1) , But was unable to proceed further. Can anyone guide me to a "general answer based on any m,n" ? Any help would be highly appreciated. Thanks in advance.!
 A: $$I=\int_0^{1}x^{m}\,(1+x)^{n}\,dx$$ Let $x=-y$ to face the beta function
$$I=(-1)^m \int_0^{-1}y^{m}\,(1-y)^{n}\,dy=(-1)^m\, B_{-1}(m+1,n+1)$$
A: Let $ n $, $ m $ be positive integers. Denoting $ u_{m}':x\mapsto x^{m} $, and $ v_{n}:x\mapsto \left(1+x\right)^{n} $, we have : \begin{aligned}\int_{0}^{1}{x^{m}\left(1+x\right)^{n}\,\mathrm{d}x}&=\int_{0}^{1}{u_{m}'\left(x\right)v_{n}\left(x\right)\mathrm{d}x}\\ &=\left[u_{m}\left(x\right)v_{n}\left(x\right)\right]_{0}^{1}-\int_{0}^{1}{u_{m}\left(x\right)v_{n}'\left(x\right)\mathrm{d}x}\\ &=\frac{2^{n}}{m+1}-\frac{n}{m+1}\int_{0}^{1}{x^{m+1}\left(1+x\right)^{n-1}\,\mathrm{d}x}\end{aligned}
Now choosing $ k \in\mathbb{N} $, we'll have : $$ \int_{0}^{1}{x^{m+k}\left(1+x\right)^{n-k}}=\frac{2^{n-k}}{m+k+1}-\frac{n-k}{m+k+1}\int_{0}^{1}{x^{m+k+1}\left(1+x\right)^{n-k-1}\,\mathrm{d}x} $$
Multiplying both sides by $ \left(-1\right)^{k}\prod\limits_{j=1}^{k}{\frac{n-j+1}{m+j}} $, we'll get : $$ \scriptsize\left(-1\right)^{k}\prod_{j=1}^{k}{\frac{n-j+1}{m+j}}\int_{0}^{1}{x^{m+k}\left(1+x\right)^{n-k}\,\mathrm{d}x}=\left(-1\right)^{k}\frac{2^{n-k}}{m+k+1}\prod_{j=1}^{k}{\frac{n-j+1}{m+j}}+\left(-1\right)^{k+1}\prod_{j=1}^{k+1}{\frac{n-j+1}{m+j}}\int_{0}^{1}{x^{m+k+1}\left(1+x\right)^{n-k-1}\,\mathrm{d}x} $$
Denoting $ \left(\forall p\in\mathbb{N}\right),\ u_{n,m}\left(p\right)=\left(-1\right)^{p}\prod\limits_{j=1}^{p}{\frac{n-j+1}{m+j}}\int_{0}^{1}{x^{m+p}\left(1+x\right)^{n-p}\,\mathrm{d}x} $.
Summing up everything : $$ \sum_{k=0}^{n-1}{\left(u_{n,m}\left(k\right)-u_{n,m}\left(k+1\right)\right)}=\sum_{k=0}^{n-1}{\left(-1\right)^{k}\frac{2^{n-k}}{m+k+1}\prod_{j=1}^{k}{\frac{n-j+1}{m+j}}} $$
Since : \begin{aligned} \sum_{k=0}^{n-1}{\left(u_{n,m}\left(k\right)-u_{n,m}\left(k+1\right)\right)}&=u_{n,m}\left(0\right)-u_{n,m}\left(n\right)\\ &=\int_{0}^{1}{x^{m}\left(1+x\right)^{n}\,\mathrm{d}x}-\left(-1\right)^{n}\prod_{j=1}^{n}{\frac{n-j+1}{m+j}}\int_{0}^{1}{x^{m+n}\,\mathrm{d}x}\\ &=\int_{0}^{1}{x^{m}\left(1+x\right)^{n}\,\mathrm{d}x}-\frac{\left(-1\right)^{n}}{m+n+1}\prod_{j=1}^{n}{\frac{n-j+1}{m+j}} \end{aligned}
And, for any $ k\in\mathbb{N}^{*} $ : \begin{aligned}\prod_{j=1}^{k}{\frac{n-j+1}{m+j}}&=\frac{n!m!}{\left(n-k\right)!\left(m+k\right)!}\\ &=\frac{\binom{n}{k}}{\binom{m+k}{m}}\end{aligned}
We have : $$ \fbox{$\begin{array}{rcl}\displaystyle\int_{0}^{1}{x^{m}\left(1+x\right)^{n}\,\mathrm{d}x}=\sum_{k=0}^{n}{\left(-1\right)^{k}\frac{2^{n-k}\binom{n}{k}}{\left(m+k+1\right)\binom{m+k}{m}}} \end{array}$}$$
A: I think about another IDEA to approach (may be useful)
take $$I(m,n)=\int_0^{1}x^{m}(1+x)^{n}dx$$ so $$I(m,n+1)=\int_0^{1}x^{m}(1+x)^{n+1}dx=\\
\int_0^{1}x^{m}(1+x)^{n}(1+x)dx=\\
\int_0^{1}x^{m}(1+x)^{n}dx+\int_0^{1}x^{m+1}(1+x)^{n}dx=\\
I(m,n)+I(m+1,n)$$
A: I found an answer to this problem :
$$ \fbox{$\begin{array}{rcl}\displaystyle\int_{0}^{1}{x^{m}\left(1+x\right)^{n}\,\mathrm{d}x}=\sum_{r=0}^{n}{\left(-1\right)^{r}\binom{m}{r}\frac{[2^{m+n+1-r}-1]}{m+n+1-r}} \end{array}$}$$
I did it by writing $ x^{m} $ as $ (1+x-1)^{m} $ and finally expanding binomial and integrating
Can anyone confirm this answer please .!
