Completing the Square 101
Imagine you have something of the form
\[\Large z^2 + \color{purple}pz = k\]
And for some reason or another, you need to express it in terms of a perfect square trinomial.
The first thing to watch out for is to make sure that the square bit... (this part)\[\Large \color{red}{z^2 }+ \color{purple}pz = k\] is unadorned... meaning, it has
no number next to it... if it does, well, remedy it by dividing the entire expression by that number...
So now, pay attention to the coefficient of the 'unsquared' variable, in this case, \(\large \color{purple}p\). What you need to do is halve it, resulting in \(\Large
\frac{\color{purple}p}{2}\) and then square it, yielding \(\Large \frac{\color{purple}p^2}{4}\).
Next, you add this to both sides of your equation, like so..
\[\Large z^2 + \color{purple}pz+\frac{\color{purple}p^2}4 = k+\frac{\color{purple}p^2}{4}\]
You'll notice that the left side is now a perfect square, in particular, the square of \(\Large z+\frac{\color{purple}p}2\)...
\[\Large \left(z+\frac{\color{purple}p}2\right)^2=k+\frac{\color{purple}p^2}{4}\]
And that's it!
You have successfully 'completed the square'
:)
[[EXAMPLE]]
[USING COMPLETING THE SQUARE TO SOLVE A SIMPLE QUADRATIC EQUATION]
Say we have \[\Large 4x^2 -8x=60\]First of all, you'll notice that the coefficient of the square \(\large x^2\) is not 1, so we had best get rid of that coefficient by dividing the entire expression by it (-4). And we get
\[\Large x^2 \color{purple}{-2}x=15\]
Now, the coefficient of the unsquared x is -2. Half of that is -1, and the square of -1 is 1.
We therefore add 1 to both sides of the equation, like so
\[\Large x^2-2x \color{blue}{+1}=15\color{blue}{+1} \]
Notice now that the left-hand side of the equation is now a perfect square trinomial, specifically, it is the square of \(\large x-1\).
Thus, the equation is as follows:
\[\Large (x-1)^2 = 16\]
now, extracting the square roots of both sides of the equation, (and be careful, you must consider the positive and negative square roots of the constant 16 in equations like this)
\[\Large x-1=\pm 4\]
\[\Large x = 1\pm 4\]Which means
x could either be
1+4 =5
or
1-4 = -3
Indeed, plugging either of these values in checks out for our original equation
\[\Large 4x^2 -8x = 60 \]
And that... is the basic principle of completing the square
^_^