Why the quadratic formula works
Tonight's idea
Start with a picture. \(x^2 + 6x\) is a square of side \(x\) with two strips of width 3 glued on. Those strips almost make a bigger square of side \(x + 3\). What is missing is the \(3 \times 3\) corner. So
\(x^2 + 6x = (x + 3)^2 - 9\). In general, \(x^2 + bx = \left(x + \tfrac{b}{2}\right)^2 - \tfrac{b^2}{4}\).
Half the coefficient of \(x\), square it, add it inside the bracket and subtract it outside. That move is completing the square, and it solves every quadratic. Take \(ax^2 + bx + c = 0\) with \(a \neq 0\). Divide by \(a\), then complete the square on the left:
\[\left(x + \frac{b}{2a}\right)^2 - \frac{b^2}{4a^2} = -\frac{c}{a} \quad\Longrightarrow\quad \left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}.\]
Take square roots of both sides (one positive, one negative) and move the \(\tfrac{b}{2a}\) across:
\[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.\]
That is the quadratic formula: completing the square with letters instead of numbers.
The same move finds the turning point. Written as \(y = a(x - h)^2 + k\) (vertex form), the square is never negative and is zero only at \(x = h\), so the graph turns at \((h, k)\): a minimum if \(a > 0\), a maximum if \(a \lt 0\).
Watch one: \(2x^2 - 12x + 7 = 0\)
Factor the leading coefficient out of the \(x\) terms only: \(2(x^2 - 6x) + 7\). Inside the bracket, half of \(-6\) is \(-3\), and \((-3)^2 = 9\):
\[2\big((x - 3)^2 - 9\big) + 7 = 2(x - 3)^2 - 11.\]
So the vertex is \((3, -11)\), a minimum since \(a = 2 > 0\). Solving \(2(x-3)^2 = 11\) gives \(x = 3 \pm \sqrt{\tfrac{11}{2}} = 3 \pm \tfrac{\sqrt{22}}{2}\), about 0.65 and 5.35. The formula gives \(\dfrac{12 \pm \sqrt{88}}{4}\), the same thing.
Play with \(a\), \(b\), \(c\) and watch the vertex and roots move: mathdetours.com/demos/quadratic.html.
Your turn
- Write each in the form \((x + p)^2 + q\): \(x^2 + 10x + 7\) and \(x^2 - 3x + 1\).
- Solve \(x^2 + 8x - 20 = 0\) by completing the square. No formula allowed.
- Write \(3x^2 + 12x - 4\) in vertex form. Give the vertex, say whether it is a maximum or a minimum, and find the exact roots.
- You have 40 m of fencing and a long straight wall. You fence a rectangle using the wall as one side, so the fence covers three sides. If the two sides perpendicular to the wall have length \(x\), write the area as a quadratic in \(x\), complete the square, and find the largest possible area.
Stretch: equal numbers win
Two numbers add to 10. What is the smallest possible value of the sum of their squares? Write the sum of squares as a quadratic in one variable and complete the square. Then: for which values of \(k\) does \(x^2 + kx + 9 = 0\) have exactly one solution?
Answers
- \(x^2 + 10x + 7 = (x + 5)^2 - 18\). \(x^2 - 3x + 1 = \left(x - \tfrac32\right)^2 - \tfrac54\).
- \((x + 4)^2 - 16 - 20 = 0\), so \((x + 4)^2 = 36\), \(x + 4 = \pm 6\), \(x = 2\) or \(x = -10\).
- \(3(x^2 + 4x) - 4 = 3\big((x+2)^2 - 4\big) - 4 = 3(x + 2)^2 - 16\). Vertex \((-2, -16)\), a minimum since \(a = 3 > 0\). Roots: \((x+2)^2 = \tfrac{16}{3}\), so \(x = -2 \pm \tfrac{4\sqrt3}{3}\), about 0.31 and \(-4.31\).
- The side along the wall is \(40 - 2x\), so \(A = x(40 - 2x) = -2x^2 + 40x = -2(x - 10)^2 + 200\). Largest area \(200\) m², when \(x = 10\): a 10 m by 20 m rectangle.
Stretch. If the numbers are \(x\) and \(10 - x\), then \(x^2 + (10 - x)^2 = 2x^2 - 20x + 100 = 2(x - 5)^2 + 50\). The minimum is 50, when both numbers are 5; the \(2(x-5)^2\) term is zero only when both numbers are 5, and positive otherwise. Exactly one solution needs the square root in the formula to vanish: \(k^2 - 36 = 0\), so \(k = 6\) or \(k = -6\).