Differentiating an integral with variable as a limit
Since $$ (x-y)^n=\sum_{k=0}^{n}{n \choose k}x^k(-y)^{n-k}, $$ we have $$ G(x)=\int_0^x(x-y)^nf(y)dy=\sum_{k=0}^n{n \choose k}x^k\int_0^x (-y)^{n-k}f(y)dy. $$ Computing the derivative of $G$, we get \begin{eqnarray} G'(x) &=&\sum_{k=1}^n{n \choose k}kx^{k-1}\int_0^x (-y)^{n-k}f(y)dy\cr &&+\sum_{k=0}^n{n \choose k}x^k(-x)^{n-k}f(x)\cr &=&\sum_{k=1}^n k\cdot \frac{n!}{k!(n-k)!}x^{k-1}\int_0^x (-y)^{n-k}f(y)dy\cr &&+f(x)\sum_{k=0}^n{n \choose k}x^k(-x)^{n-k}\cr &=& \sum_{k=1}^n \frac{n!}{(k-1)!(n-k)!}x^{k-1}\int_0^x (-y)^{n-k}f(y)dy\cr &&+f(x)\cdot(x-x)^n \cr &=&\sum_{p=0}^{n-1} \frac{n!}{p!(n-1-p)!}x^{p}\int_0^x (-y)^{n-p-1}f(y)dy+f(x)\cdot0\cr &=&n\sum_{p=0}^{n-1} \frac{(n-1)!}{p!(n-1-p)!}x^{p}\int_0^x (-y)^{n-1-p}f(y)dy\cr &=&n\sum_{p=0}^{n-1} {n-1 \choose p}x^{p}\int_0^x (-y)^{n-1-p}f(y)dy\cr &=&n\int_0^x\sum_{p=0}^{n-1} {n-1 \choose p}x^{p} (-y)^{n-1-p}f(y)dy\cr &=&n\int_0^x(x-y)^{n-1}f(y)dy \end{eqnarray}