1. ## x squared

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

2. ## Re: x squared

They completed the square.

3. ## Re: x squared

If you mean from $\displaystyle 3(u_n^2- u_n)+ 1$ to $\displaystyle 3(u_n- \frac{1}{2})^2+ \frac{1}{4}$, they "completed the square".

Now you should recall that "$\displaystyle (a- b)^2= a^2- 2ab+ b^2$". Compare $\displaystyle a^2+ 2ab+ b^2$ and $\displaystyle u_n^2- u_n$. To be the same, at least for the first two terms, we would have to have $\displaystyle a^2= u_n^2$ so that $\displaystyle a= u_n$ and $\displaystyle -2ab= -u_n= -a$ so that $\displaystyle b=-\frac{1}{2}$. That is, to make [tex]u_n^2- u_n[tex] a "perfect square" we must add $\displaystyle b^2= \frac{1}{4}$. Or course, to keep the whole thing the same, we must also subtract $\displaystyle \frac{1}{4}$. So $\displaystyle 3(u_n^2- u_n)+ 1= 3(u_n^2- u_n+ \frac{1}{4}- \frac{1}{4})+ 1= 3((u_n- \frac{1}{2})^2- \frac{1}{4})+ 1= 3(u_n- \frac{1}{2})^2- \frac{3}{4}+ 1= 3(u_n- \frac{1}{4})^2+ \frac{1}{4}$