Completing the square

Completing the square rewrites a quadratic in the form (x+p)2+q(x + p)^2 + q. Take half the coefficient of xx, square it, add it, and then subtract the same number so the value does not change. In this form you can read off the vertex and the minimum (or maximum) value of the quadratic function right away.

Chalcack concept card · Reviewed by the Chalcack team ·

Filling the corner of x² + 6x with 9 makes a square with side x + 3.

Formulas

  • x2+2px=(x+p)2−p2x^2 + 2px = (x + p)^2 - p^2
  • y=a(x−p)2+q;⇒;vertex (p,q)y = a(x - p)^2 + q ;\Rightarrow; \text{vertex } (p, q)

When to use it

Use it when you need the vertex or the maximum or minimum of a quadratic function, or when solving a quadratic equation by completing the square.

Worked example

Rewrite x2+6x+5x^2 + 6x + 5. Half of 6 is 3, and 32=93^2 = 9. So x2+6x+9−9+5=(x+3)2−4x^2 + 6x + 9 - 9 + 5 = (x + 3)^2 - 4. The vertex of y=x2+6x+5y = x^2 + 6x + 5 is (−3,−4)(-3, -4), and the minimum value is −4-4.

Common mistake

Many students add 9 and forget to subtract it back. If the coefficient of x2x^2 is not 1 (like 2), factor it out first and multiply the number you subtract by that coefficient: 2x2+8x=2(x+2)2−82x^2 + 8x = 2(x + 2)^2 - 8.

Related concepts

All 181 math concepts