Right well what you're doing when completing the square is adding a little bit which must be taken away again to keep the maths consistent.
say if we want to complete the square on
[x2+2x]+2I've put square brackets around the bit we'll actually be modifying the appearance of.
So we do the regular thing here;
=[(x+1)2+adj]+2I have written 'adj' to indicate an adjustment that needs to be made, this is because
(x+1)2=x2+2x, in fact;
(x+1)2=x2+2x+1 as we can clearly see by multiplying out.
We are just trying to get x^2 + 2x and we don't want the '+1' so our adjustment is going to be to take away 1, i.e. adj = -1
So now we have
[(x+1)2−1]+2 which we then tidy up to get
(x+1)2+1since the constant term from the (x+1)^2 is 1, and similarly if it was (x+2)^2 it would be 4 etc. It is always the square of the constant term inside the bracket that is being squared.
So, generally for a quadratic [x^2 + bx] + c, we'd write it as
[(x+2b)2+adj]+c and then the adjustment would be
−(2b)2=−4b2 to give us
[x2+bx]+c=(x+2b)2−4b2+c