$$ {\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} $$