<s>[INST] 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? 
 [/INST] \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.
</s>