Completing the square
An expression like x squared plus 6 x is almost a square. Completing the square means writing it as a square plus or minus a number.
Had the expression been x squared plus 6 x plus 9, it would have been a square already: multiplied out, the quantity x plus 3, squared is exactly x squared plus 6 x plus 9. Our x squared plus 6 x lacks the 9. But adding 9 and taking it away again changes nothing, so
The first three terms make up the quantity x plus 3, squared, so
Why it works
As a picture: x squared is a square x wide, and 6 x is two strips, each 3 wide and x long, laid along two sides of it. Together they almost make a square x plus 3 wide, but a small 3-by-3 corner is missing. So x squared plus 6 x is the big square, the quantity x plus 3, squared, minus the corner, 9.
To complete the square of x squared plus b x: halve b, square the bracket x plus that half, and take away the half squared.
When b is odd, the half is a fraction:
Solving with it
Completing the square turns an equation into one that taking the square root can solve:
So x plus 3 is 4 or minus 4, which gives x equals 1 or x equals minus 7.
Completing the square also shows the lowest point of a graph: the quantity x plus 3, squared minus 16 is never smaller than minus 16, and it is minus 16 exactly when x equals minus 3. And with vectors, it finds the centre and radius of a sphere from its equation, as in Spheres.
Where the quadratic formula comes from
Doing the same with letters instead of numbers gives the quadratic formula. We follow the same steps as above, one at a time, starting from
1. Make the number in front of x² equal to 1. Divide every term by a:
2. Move the constant term to the other side:
3. Complete the square on the left. The number in front of x is b over a, and half of it is b over 2 a. So the left-hand side is the quantity x plus b over 2 a, squared minus b over 2 a squared, which is b squared over 4 a squared. Moving that over to the right as well:
4. Write the right-hand side as one fraction. Its bottom is 4 a squared, so c over a becomes 4 a c over 4 a squared:
5. Take the square root of both sides. The root of the bottom 4 a squared is 2 a, and we mustn't forget the ±:
6. Move b over 2 a over, and put the two fractions together, since they have the same bottom:
That is the quadratic formula. It is nothing more than completing the square, done once and for all with letters, so that we never have to do it again with numbers.