Differentiating cubic Bezier into 3 terms. I'm new so go easy please.
The cubic bezier curve is well known as:
B(t)=(1−t)3P0 + 3(1−t)2tP1 + 3(1−t)t2P2 + t3P3 
But I've only just found out that a second way to differentiate this results in:
d/dt = 3(1-t)2(P1 - P0) + 6t(1-t)(P2 - P1) + 3t2(P3 - P2)
Please can someone help me figure out how this middle 6t(1-t) term come about?

If you expand $B(t)=(1−t)^3 P_0 + 3(1−t)^2tP_1 + 3(1−t)t^2P_2 + t^3P_3$,  you get:
$B(t)=(-t^3 + 3t^2 - 3t + 1)P_0 + (3t^3 - 6t^2 + 3t)P_1 + (-3t^3 + 3t^2)P_2 + (t^3)P_3$
Then differentiate to get:
$d/dt=(-3t^2 + 6t - 3)P_0 + (9t^2 - 12t + 3)P_1 + (-9t^3 + 6t)P_2 + (3t^2)P_3$
Then collect up the terms from the $P_3$ to $P_0$ (I've highlighted what changes at each step):
$d/dt=(-3t^2 + 6t - 3)P_0 + (9t^2 - 12t + 3)P_1 + (\color{red}{-6t^2} + 6t)P_2 + \color{red}{3t^2(P_3 - P_2)}$
$d/dt=(-3t^2 + 6t - 3)P_0 + (9t^2 - 12t + 3)P_1 + \color{red}{6t(1 - t)P_2} + 3t^2(P_3 - P_2)$
$d/dt=(-3t^2 + 6t - 3)P_0 + (\color{red}{3t^2 - 6t} + 3)P_1 + 6t(1 - t)\color{red}{(P_2 - P_1)} + 3t^2(P_3 - P_2)$
$d/dt=\color{red}{3(1-t)^2(P_1 - P_0)} + 6t(1 - t)(P_2 - P_1) + 3t^2(P_3 - P_2)$
