Hello

I have something like this :

$\displaystyle u_{n+1}-u_n = 3(u_n^2 -u_n) +1 = 3(u_n - \frac{1}{2})^2 + \frac{1}{4}$

Can someone explain to me how they went from $\displaystyle u_{n+1}-u_n = 3(u_n^2 -u_n) +1 $ TO $\displaystyle 3(u_n - \frac{1}{2})^2 + \frac{1}{4}$

Thank you very much