Prove that $\int \binom{n}{k}p^k(1−p)^{n−k}\,dp$ from $0$ to $1$ is $\frac{1}{n+1}$ 
Prove that$$
\int_0^1 \binom{n}{k} p^{k}( 1-p ) ^{n-k}dp=\frac{1}{n+1}.
$$

I met this question in "The Art and Craft of Problem Solving". The whole question is from Bay Area Math Meet 2000, and by using an alternative method to interpret that question, we can get the result. 
The book then asked us to use 2 different methods to solve it, 


*

*repeat integration by part. This is easy, I solve it.

*Using manipulation of the binomial series. I can not solve the question using this method. How can I use the 
binomial series to solve it?

 A: In order to  apply  the binomial series we introduce a  parameter $z$ so  that  $z^k$  can  be   used     to  select the term  with  $\binom{n}{k}$.  We also use the      coefficient of operator $[z^k]$  to denote  the coefficient of $z^k$ of a series.

We  obtain
  \begin{align*}
\color{blue}{\int_{0}^1}&\color{blue}{\binom{n}{k}p^k(1-p)^{n-k}\,dp}\\
&=[z^k]\int_{0}^1\binom{n}{k}\left(pz\right)^k(1-p)^{n-k}\,dp\\
&=[z^k]\int_{0}^1\left(pz+(1-p)\right)^n\,dp\\
&=[z^k]\int_{0}^{1}\left(1+(z-1)p\right)^n\,dp\\
&=[z^k]\frac{1}{n+1}\cdot\left.\frac{(1+(z-1)p)^{n+1}}{z-1}\right|_{p=0}^1\\
&=[z^k]\frac{1}{n+1}\cdot\frac{z^{n+1}-1}{z-1}\\
&=[z^k]\frac{1}{n+1}\left(1+z+\cdots+z^k+\cdots+z^n\right)\\
&\,\,\color{blue}{=\frac{1}{n+1}}
\end{align*}
  and   the  claim   follows.

A: Using this, the left-hand side is $$\binom{n}{k}\operatorname{B}(k+1,\,n-k+1)=\frac{\Gamma(n+1)}{\color{blue}{\Gamma(k+1)}\color{green}{\Gamma(n-k+1)}}\frac{\color{blue}{\Gamma(k+1)}\color{green}{\Gamma(n-k+1)}}{\Gamma(n+2)}=\frac{1}{n+1},$$where the blue factors cancel, as do the green ones.
I'm not sure how we can "use the binomial series", if by that you mean expanding $(1-p)^{n-k}$. (Edit: @MarkusScheuer showed how.) But there's another way to use it. Summing over $k$ from $0$ to $n$ inclusive, these integrals give $\int_0^1(p+1-p)^ndp=\int_0^1dp=1$, so we only need show why the integrals are $k$-independent. Indeed, they are values, averaged over a $U(0,\,1)$ distribution of $p$, for the probabilities of a $B(n,\,p)$-distributed variable taking each possible value of $k$. We can argue they are equiprobable when we are that ignorant of the distribution of $p$.
A: It isn't either of the two methods, but you can use the beta function here:
$$\int_0^1 p^k(1-p)^{n-k}dp=B(k+1,n+1-k)=\frac{k!(n-k)!}{(n+1)!}$$
and so:
$$\int_0^1 \begin{pmatrix}n\\k\end{pmatrix}p^k(1-p)^{n-k}dp=\frac{n!}{k!(n-k)!}\frac{k!(n-k)!}{(n+1)!}=\frac{1}{n+1}$$
A: Another possible approach.
Let's indicate the integrand function as
$$
f(p;n,k) = \left( \matrix{
  n \cr 
  k \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - k} 
$$
the derivative wrt $p$ is
$$
\eqalign{
  & {d \over {dp}}f(p;n,k) =   \cr 
  &  = \left( \matrix{
  n \cr 
  k \cr}  \right)\left( {kp^{\,k - 1} \left( {1 - p} \right)^{\,n - k}  - \left( {n - k} \right)p^{\,k} \left( {1 - p} \right)^{\,n - k - 1} } \right) =   \cr 
  &  = k\left( \matrix{
  n \cr 
  k \cr}  \right)p^{\,k - 1} \left( {1 - p} \right)^{\,n - k}  - \left( {n - k} \right)\left( \matrix{
  n \cr 
  n - k \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - k - 1}  =   \cr 
  &  = n\left( \matrix{
  n - 1 \cr 
  k - 1 \cr}  \right)p^{\,k - 1} \left( {1 - p} \right)^{\,n - k}  - n\left( \matrix{
  n - 1 \cr 
  n - k - 1 \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - k - 1}  =   \cr 
  &  = n\left( {f(p;n - 1,k - 1) - f(p;n - 1,k)} \right) \cr} 
$$
Then the integral becomes
$$
\eqalign{
  & S(n,k) = \int_{\,0}^{\,1} {\left( \matrix{
  n \cr 
  k \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - k} dp}  =   \cr 
  &  = \int_{\,0}^{\,1} {f(p;n,k)dp}  =   \cr 
  &  = \left. {\left( {p\,f(p;n,k)} \right)\,} \right|_{\,p = 0}^{\;1}  - \int_{\,0}^{\,1} {p\,df(p;n,k)}  =   \cr 
  &  = \left[ {k = n} \right] - n\int_{\,0}^{\,1} {p\,\left( {f(p;n - 1,k - 1) - f(p;n - 1,k)} \right)dp}  =   \cr 
  &  = \left[ {k = n} \right] - n\int_{\,0}^{\,1} {p\,\left( {\left( \matrix{
  n - 1 \cr 
  k - 1 \cr}  \right)p^{\,k - 1} \left( {1 - p} \right)^{\,n - k}  - \left( \matrix{
  n - 1 \cr 
  k \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - 1 - k} } \right)dp}  =   \cr 
  &  = \left[ {k = n} \right] - n\left( \matrix{
  n - 1 \cr 
  k - 1 \cr}  \right)\int_{\,0}^{\,1} {p^{\,k} \left( {1 - p} \right)^{\,n - k} dp}  + n\left( \matrix{
  n - 1 \cr 
  k \cr}  \right)\int_{\,0}^{\,1} {\,p^{\,k + 1} \left( {1 - p} \right)^{\,n - 1 - k} dp}  =   \cr 
  &  = \left[ {k = n} \right] - {{n\left( \matrix{
  n - 1 \cr 
  k - 1 \cr}  \right)} \over {\left( \matrix{
  n \cr 
  k \cr}  \right)}}\int_{\,0}^{\,1} {\left( \matrix{
  n \cr 
  k \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - k} dp}  + {{n\left( \matrix{
  n - 1 \cr 
  k \cr}  \right)} \over {\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)}}\int_{\,0}^{\,1} {\,\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)p^{\,k + 1} \left( {1 - p} \right)^{\,n - 1 - k} dp}  =   \cr 
  &  = \left[ {k = n} \right] - k\int_{\,0}^{\,1} {\left( \matrix{
  n \cr 
  k \cr}  \right)p^{\,k} \left( {1 - p} \right)^{\,n - k} dp}  + \left( {k + 1} \right)\int_{\,0}^{\,1} {\,\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)p^{\,k + 1} \left( {1 - p} \right)^{\,n - 1 - k} dp}  =   \cr 
  &  = \left[ {k = n} \right] - kS(n,k) + \left( {k + 1} \right)S(n,k + 1) \cr} 
$$
that is:
$$
S(n,k) = S(n,k + 1) + {{\left[ {k = n} \right]} \over {k + 1}}
$$
or better
$$
\eqalign{
  & S(n,n - k) = S(n,n - k - 1) + {{\left[ {0 = n - k} \right]} \over {n + 1}}  \cr 
  & S(n,j) = S(n,j - 1) + {{\left[ {0 = j} \right]} \over {n + 1}} \cr} 
$$
where $[P]$ denotes the Iverson bracket
And that demonstrates the thesis.
A: By integration by parts:
$$\int_0^1 \binom{n}{k} p^{k}( 1-p ) ^{n-k}dp=\int_0^1 \binom{n}{k+1} p^{k+1}( 1-p ) ^{n-(k+1)}dp :=X$$
Then,
$$1 =\int_0^1 1 dp = \int_0^1 (p+ (1-p))^n dp= \sum_{k=0}^n \int_0^1  \binom{n}{k} p^{k}( 1-p ) ^{n-k} dp=\sum_{k=0}^n X= (n+1)X$$
Hence,
$$X= \int_0^1 \binom{n}{k} p^{k}( 1-p ) ^{n-k}dp = \frac{1}{n+1}$$
