Prove that $\sum_{k=0}^x {n \choose k}p^k(1-p)^{n-k}=(n-x){n \choose x}\int_0^{1-p}t^{n-x-1}(1-t)^xdt $ For $0\le p \le 1$ and $x=0,1,2,...,n$, I need to prove that $\sum_{k=0}^x {n \choose k}p^k(1-p)^{n-k}=(n-x){n \choose x}\int_0^{1-p}t^{n-x-1}(1-t)^xdt  $ and the two hints are either differentiate both sides with respect to $p$ or integrate by parts.  
First since this is a finite sum 
$$\frac{d}{dp}\sum_{k=0}^x {n \choose k}p^k(1-p)^{n-k} =\sum_{k=0}^x \frac{d}{dp} {n \choose k}p^k(1-p)^{n-k} =\sum_{k=0}^x {n \choose k}\left(kp^{k-1}(1-p)^{n-k}-(n-k) p^{k}(1-p)^{n-k-1}\right)$$
and $$  \frac{d}{dp} \int_0^{1-p}t^{n-x-1}(1-t)^xdt = -(1-p)^{n-x-1}(p)^{x}   $$
and assuming I didn't make a mistake I don't see how this helps. I was also having trouble trying to make integration by parts to work. Could someone please help put me in the right direction? 
 A: \begin{align*}
(n-x){n \choose x}&\int_0^{1-p}t^{n-x-1}(1-t)^xdt \\
&= (n-x)\frac{n!}{x!(n-x)!}\left\{ \left.\frac{t^{n-x}}{n-x}(1-t)^x \right|_0^{1-p} + \int_0^{1-p} x(1-t)^{x-1}\frac{t^{n-x}}{n-x}dt\right\}\\
&= (n-x)\frac{n!}{x!(n-x)!}\left\{\frac{(1-p)^{n-x}p^x}{n-x} + \int_0^{1-p} x(1-t)^{x-1}\frac{t^{n-x}}{n-x}dt\right\} \\
&= \binom{n}{x}(1-p)^{n-x}p^x \\
& + \frac{n!}{x!(n-x)!}\int_0^{1-p} x(1-t)^{x-1}t^{n-x}dt \\
&= \binom{n}{x}(1-p)^{n-x}p^x \\
& + \frac{n!}{(x-1)!(n-x)!}\left\{\left.\frac{t^{n-x+1}}{n-x+1}(1-t)^{x-1}\right|_0^{1-p} + \int_0^{1-p}(x-1)(1-t)^{x-2}\frac{t^{n-x+1}}{n-x+1}\right\} \\
&=\binom{n}{x}(1-p)^{n-x}p^x +\binom{n}{x-1}(1-p)^{n-x+1}p^{x-1} \\
& + \frac{n!}{(x-2)!(n-x+1)!}\int_0^{1-p}(1-t)^{x-2}t^{n-x+1}dt
\end{align*}
and we see the pattern.
A: This is an old question, and i couldn't find any answer using differentiation on the site, so i will leave one. I hope it helps.
First, it is true that
$$
\frac{d}{dp}(n-x)\binom{n}{x}\int_0^{1-p}t^{n-x-1}(1-t)^x dt = -(n-x)\binom{n}{x}p^x (1-p)^{n-x-1}
$$
and, since the sum is finite,
\begin{align}
\frac{d}{dp}\sum_{k=0}^x \binom{n}{k}p^k(1-p)^{n-k} &= \sum_{k=0}^x \binom{n}{k}\left[ kp^{k-1}(1-p)^{n-k} - (n-k)p^k(1-p)^{n-k-1} \right] \\\
&= \sum_{k=0}^x k\binom{n}{k}p^{k-1}(1-p)^{n-k} - (n-k)\binom{n}{k}p^k(1-p)^{n-k-1} \\
&= n\sum_{k=1}^x \binom{n-1}{k-1}p^{k-1}(1-p)^{n-k} - n\sum_{k=0}^x \binom{n-1}{k}p^k(1-p)^{n-k-1} \\
&= -n\left[ \sum_{k=0}^x \binom{n-1}{k}p^k(1-p)^{n-k+1} - \sum_{k=1}^x \binom{n-1}{k-1} p^{k-1}(1-p)^{n-k}\right] \\
&= -n\binom{n-1}{x}p^x(1-p)^{n-k-1} \\
&= -(n-x)\binom{n}{x}p^x(1-p)^{n-x-1}
\end{align}
and we see that both are equal. Then, taking $p=1$, the constant is $C=0$ so
$$
\sum_{k=0}^x \binom{n}{k}p^k(1-p)^{n-k} = (n-x)\binom{n}{x}\int_0^{1-p}t^{n-x-1}(1-t)^xdt
$$
