Learn Index · Functions and Relations Grade 11–12

Completing the square

Rewriting a quadratic as a(x − h)² + k.

Read

The idea

Completing the square turns x² + bx into a perfect square trinomial by adding the right constant.

The key number: (b/2)², the square of half the coefficient of x.

Expression Add Perfect square
x² + 6x (6/2)² = 9 x² + 6x + 9 = (x + 3)²
x² − 10x 25 (x − 5)²
x² + 5x 25/4 (x + 5/2)²

Picture it

x² + 6x is a square of side x plus two 3-by-x rectangles. Arranging them as an L-shape leaves a missing 3-by-3 corner. Adding 9 "completes the square".

Use 1: Converting to vertex form

Example: y = x² + 8x + 3

  1. Group: y = (x² + 8x) + 3
  2. Add and subtract (8/2)² = 16: y = (x² + 8x + 16) − 16 + 3
  3. Factor: y = (x + 4)² − 13

Vertex form shows the vertex: (−4, −13).

With a ≠ 1: y = 2x² − 12x + 7

  1. Factor 2 from the x terms: y = 2(x² − 6x) + 7
  2. Inside: add and subtract 9: y = 2(x² − 6x + 9 − 9) + 7
  3. y = 2(x − 3)² − 18 + 7
  4. y = 2(x − 3)² − 11 → vertex (3, −11)

Remember to multiply the subtracted constant by a when moving it out.

Use 2: Solving equations

Example: x² + 6x − 7 = 0

  1. Move the constant: x² + 6x = 7
  2. Add 9 to both sides: x² + 6x + 9 = 16
  3. (x + 3)² = 16
  4. x + 3 = ±4 → x = 1 or x = −7

Example with irrational roots: x² − 4x − 1 = 0

  • x² − 4x = 1 → x² − 4x + 4 = 5 → (x − 2)² = 5 → x = 2 ± √5

Use 3: Deriving the quadratic formula

Completing the square on ax² + bx + c = 0 in general gives:

x = [−b ± √(b² − 4ac)]/(2a)

So the quadratic formula is just completing the square done once, for every quadratic.

Use 4: Optimization

Vertex form gives the maximum or minimum directly. A company’s profit P = −2x² + 40x − 50 becomes P = −2(x − 10)² + 150: the maximum profit is 150 at x = 10.

Worked examples

Example 1: Complete the square: x² − 14x + ___ → 49.

Example 2: Vertex of y = x² + 2x − 8 → (x + 1)² − 9 → (−1, −9).

Example 3: Solve x² + 10x + 21 = 0 → (x + 5)² = 4 → x = −3 or −7.

Common mistakes

  • Adding (b/2)² to one side only when solving.
  • Forgetting to multiply by a when factoring a out.
  • Sign of h: (x + 4)² has h = −4.

Try it yourself

  1. What constant completes x² + 12x?
  2. Write y = x² − 6x + 10 in vertex form.
  3. Write y = 3x² + 12x + 5 in vertex form.
  4. Solve x² − 2x − 8 = 0 by completing the square.
  5. Solve x² + 4x − 3 = 0 (exact).

Answers: 1) 36 2) y = (x − 3)² + 1 3) y = 3(x + 2)² − 7 4) 4, −2 5) −2 ± √7

Quick recap

  • Add (b/2)² to make a perfect square trinomial.
  • Completing the square gives vertex form and solves equations.
  • It’s the source of the quadratic formula.