Can I get a little help proving equality between a summation and integral? Prove$$\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)^{x}dt.$$
Can someone show me the steps please?  Here is the hint my book gave me:
"Integrate by parts or differentiate both sides with respect to p".
I have no clue how to even begin this problem. Never integrated anything that looks like this before or let alone take the derivative of.
 A: HINT: Solve the integral using integration by parts:
First step:
take $u=(1-t)^x$ and $dv=t^{n-x-1}$.
$$ \int_0^{1-p} t^{n-x-1}(1-t)^x dt = $$
$$ \left.(1-t)^x\frac{t^{n-x}}{n-x}\right\rvert_0^{1-p} - \int_0^{1-p} -x(1-t)^{x-1}\frac{t^{n-x}}{n-x} dt=$$
$$ = \frac{p^x(1-p)^{n-x}}{n-x} + \frac{x}{n-x}\int_0^{1-p} (1-t)^{x-1}t^{n-x} dt$$
continue this way and then do a induction argument.
A: $$
{\cal F}\left(p\right)
\equiv
\sum_{k = 0}^{x}{n \choose k}p^{k}\left(1 - p\right)^{n - k}\,,
\qquad
{\cal F}\left(1^{-}\right) \equiv \lim_{p \to 1^{-}}{\cal F}\left(p\right) = 0
$$
$$----------------------------$$
\begin{align}
{\cal F}'\left(p\right)
&=
\sum_{k = 0}^{x}{n \choose k}kp^{k - 1}\left(1 - p\right)^{n - k}
-
\sum_{k = 0}^{x}{n \choose k}p^{k}\left(n - k\right)\left(1 - p\right)^{n - k - 1}
\\[3mm]&=
\sum_{k = 0}^{x - 1}{n! \over k!\left(n - k - 1\right)!}p^{k}
\left(1 - p\right)^{n - k - 1}
-
\sum_{k = 0}^{x}{n \choose k}p^{k}\left(n - k\right)\left(1 - p\right)^{n - k - 1}
\\[3mm]&=
\sum_{k = 0}^{x - 1}\overbrace{\left[%
{n! \over k!\left(n - k - 1\right)!}
-
{n!\left(n - k\right) \over k!\left(n - k\right)!}
\right]}^{\LARGE=\ 0}\
p^{k}\left(1 - p\right)^{n - k - 1}
\\[3mm]&-
\\[3mm]&
{n \choose x}\,p^{x}\,\left(n - x\right)\left(1 - p\right)^{n - x - 1}
\end{align}
$$----------------------------$$
$$
{\cal F}'\left(p\right)
=
-{n \choose x}p^{x}\left(n - x\right)\left(1 - p\right)^{n - x - 1}\,,
\qquad
{\cal F}\left(1^{-}\right) = 0
$$
$$----------------------------$$
\begin{align}
{\cal F}\left(p\right) - \overbrace{{\cal F}\left(1^{-}\right)}^{\Large =\ 0}
&=
-\left(n - x\right){n \choose x}\int_{1}^{p}t^{x}\left(1 - t\right)^{n - x - 1}\,
{\rm d}t
\\[3mm]&=
-\left(n - x\right){n \choose x}\int_{0}^{p - 1}\left(t + 1\right)^{x}
\left(-t\right)^{n - x - 1}\,{\rm d}t
=\\[3mm]&=
\left(n - x\right){n \choose x}\int_{0}^{1 - p}\left(-t + 1\right)^{x}
\left(t\right)^{n - x - 1}\,{\rm d}t
\end{align}
$$
\begin{array}{|c|}\hline\\
\color{#ff0000}{\large\quad%
{\cal F}\left(p\right)
\color{#000000}{\ =\ }
\sum_{k = 0}^{x}{n \choose k}p^{k}\left(1 - p\right)^{n - k}
\color{#ff0000}{\ =\ }
\left(n - x\right){n \choose x}\int_{0}^{1 - p}t^{n - x - 1}
\left(1 - t\right)^{x}\,{\rm d}t
\quad}
\\ \\ \hline
\end{array}
$$
