When the coefficient of x² is not 1, factor it out of the x² and x terms before completing the square inside the bracket.
2x² − 12x + 7 = 2(x² − 6x) + 7
The number to halve is now −6. It gives −3, so the squared bracket is (x − 3)².
Subtract 9 inside the bracket. Since the whole bracket is multiplied by 2, that subtraction becomes −18 outside.
A common slip: subtracting only 9 outside would change the original expression.
What if the middle coefficient is odd?
Use fractions rather than rounding. For example:
x² + 5x + 2 = (x + 5/2)² − 17/4
Half of 5 is 5/2; its square is 25/4. The constant is 2 − 25/4 = −17/4.
Every line stays visibleWorked example
2x² − 12x + 7
Factor out 2 from the terms containing x.
= 2(x² − 6x) + 7
Complete the square inside the bracket.
= 2[(x − 3)² − 9] + 7
Multiply both terms in the bracket by 2.
= 2(x − 3)² − 18 + 7
= 2(x − 3)² − 11
The multiplier stays in front of the squared bracket.