Let's do an example first and then summerize what are the techniques to complete the square for quadratic equation in order to solve for x.
-2x^2 + 5x + 12 = 0
-2x^2 + 5x = -12
-2 (x^2 - 5/2 x) = -12
so 2ab = 5/2 x ("2ab" refers to the formula (a+b)^2 = a^2 + 2ab + b^2 or (a+b)^2 = a^2 - 2ab + b^2 )
Since a=1 (because x^2 is the a^2 in the formula), we get 2*1*b = 2b = 5/2 x, so b = 5/4
That means to complete the square we will add "b^2" (which is (5/4)^2 here) and then subtract (5/4)^2 in the parenthesis:
-2 [ x^2 - 5/2 x + (5/4)^2 - (5/4)^2 ] = -12
Now that is same as -2 (x - 5/4 )^2 + (-2) * (-5/4)^2 = -12
To simplify it we follow these steps:
-2 (x - 5/4 )^2 + 2 * 25/16 = -12
-2 (x - 5/4 )^2 + 25/8 = -12
Multiply both sides of the equation by 8 we get this:
-16 (x-5/4)^2 +25 = -96
then -16 (x-5/4)^2 = -121
Techniques summerization:
To complete the square for quadratic equation in order to solve for x, first we need to move the terms without x (which is "c" in the "ax^2+bx+c=0" form) to the right side of the equation. Then we divide both sides of the equation by "a" in the "ax^2+bx+c=0" equation. Through the formula (a+b)^2 = a^2 + 2ab + b^2 or (a+b)^2 = a^2 - 2ab + b^2 we will then figure out the value of "b", so then we know what is the b^2 we need to add then subtract. Finally just simplify the equation.
Hope this helps.