<s>[INST] Proving two binomial identities I would like to show that
\begin{align}
&\sum_{j=n-k}^n\binom nj(1-x)^{n-j-1}x^{j-1}(j-nx)\\
&\qquad=\binom n{n-k}(n-k)(1-x)^kx^{n-k-1}\sum_{k=0}^{n-1}\frac{(-1)^k}n\binom{n-1}k\binom n{n-k}(n-k)(1-x)^kx^{n-k-1}\\
&\qquad=(-1)^{n-1}\sum_{k=0}^{n-1}\binom{n-1}k\binom{n+k-1}k(-x)^k
\end{align}
I feel I exhausted all identities/properties of binomials without success. Mathematica says it is true, but how to show it?
 [/INST] $\def\peq{\mathrel{\phantom{=}}{}}$For the first identity, because for $0 \leqslant j \leqslant n - 1$,\begin{align*}
&\peq \binom{n}{j} j (1 - x)^{n - j} x^{j - 1} - \binom{n}{j + 1} (j + 1) (1 - x)^{n - j - 1} x^j\\
&= \frac{n!}{(j - 1)!\, (n - j)!} (1 - x)^{n - j} x^{j - 1} - \frac{n!}{j!\, (n - j - 1)!} (1 - x)^{n - j - 1} x^j\\
&= \frac{n!}{j!\, (n - j)!} (1 - x)^{n - j - 1} x^{j - 1} (j(1 - x) - (n - j)x)\\
&= \binom{n}{j} (1 - x)^{n - j - 1} x^{j - 1} (j - nx),
\end{align*}
so\begin{align*}
&\peq \sum_{j = n - k}^n \binom{n}{j} (1 - x)^{n - j - 1} x^{j - 1} (j - nx)\\
&= nx^{n - 1} + \sum_{j = n - k}^{n - 1} \left( \binom{n}{j} j (1 - x)^{n - j} x^{j - 1} - \binom{n}{j + 1} (j + 1) (1 - x)^{n - j - 1} x^j \right)\\
&= nx^{n - 1} + \left( \binom{n}{n - k} (n - k) (1 - x)^k x^{n - k - 1} - nx^{n - 1} \right)\\
&= \binom{n}{n - k} (n - k) (1 - x)^k x^{n - k - 1}.
\end{align*}
For the second identity, note that\begin{gather*}
\frac{1}{n} \binom{n - 1}{k} \binom{n}{n - k} (n - k) = \frac{1}{n} · \frac{(n - 1)!}{k!\, (n - k - 1)!} · \frac{n!}{k!\, (n - k)!} · (n - k)\\
= \frac{(n - 1)!}{k!\, (n - k - 1)!} · \frac{(n - 1)!}{k!\, (n - k - 1)!} = \left( \binom{n - 1}{k} \right)^2,
\end{gather*}
thus dividing by $x^{n - 1}$ on both sides of the second identity and denoting $m = n - 1$, $t = -\dfrac{1}{x}$, it is equivalent to prove that\begin{gather*}
\sum_{k = 0}^m \left( \binom{m}{k} \right)^2 (t + 1)^k = \sum_{k = 0}^m \binom{m}{k} \binom{m + k}{k} t^{m - k}.\tag{2$'$}
\end{gather*}
Consider the polynomial $(s + t + 1)^m (s + 1)^m$. Since\begin{gather*}
(s + t + 1)^m (s + 1)^m = \left( \sum_{k = 0}^m \binom{m}{k} (t + 1)^k s^{m - k} \right) \left( \sum_{k = 0}^m \binom{m}{k} s^k \right),\\
(s + t + 1)^m (s + 1)^m = (s + 1)^m \sum_{k = 0}^m \binom{m}{k} (s + 1)^k t^{m - k} = \sum_{k = 0}^m \binom{m}{k} t^{m - k} (s + 1)^{m + k},
\end{gather*}
then\begin{gather*}
\left( \sum_{k = 0}^m \binom{m}{k} (t + 1)^k s^{m - k} \right) \left( \sum_{k = 0}^m \binom{m}{k} s^k \right) = \sum_{k = 0}^m \binom{m}{k} t^{m - k} (s + 1)^{m + k}.\tag{3}
\end{gather*}
Treating $t$ as a constant and $s$ as a variable for the moment, the coefficient of $s^m$ of the LHS of (3) is$$
\sum_{k = 0}^m \binom{m}{k} (t + 1)^k · \binom{m}{k} = \sum_{k = 0}^m \left( \binom{m}{k} \right)^2 (t + 1)^k,
$$
and that of the RHS of (3) is$$
\sum_{k = 0}^m \binom{m}{k} t^{m - k} · \binom{m + k}{m} = \sum_{k = 0}^m \binom{m}{k} \binom{m + k}{k} t^{m - k}.
$$
Therefore (2$'$) is true.
</s>