Grade by Grade
A. Quadratic Functions · Quadratic Functions

From Standard Form to Vertex Form: Completing the Square

A2.8About 70 minutes
Learning goals
  • I can complete the square to write a quadratic function in vertex form, including when a ≠ 1.
  • I can complete the square when b ÷ a is a fraction or decimal.
  • I can verify that the two forms are equivalent.
  • I can use vertex form to find a maximum or minimum value.

Words to know

completing the square
Rewriting ax² + bx + c as a(x − h)² + k by adding and subtracting the number that makes a perfect square.
perfect square trinomial
A trinomial such as x² + 8x + 16 that equals the square of a binomial, (x + 4)².
(b ÷ 2)²
The number that completes the square for x² + bx.
maximum / minimum value
The y-coordinate k of the vertex: a maximum if a < 0, a minimum if a > 0.

Finding a hidden vertex

You are given f(x) = −2x² + 6x + 1, the height of something, or a profit. Where is the maximum? Standard form hides the vertex. To reveal it, you rewrite the function in vertex form by completing the square.

You learned this method in Grade 10. In Grade 11 you will use it as a tool for functions, including cases where the numbers do not divide nicely (where b ÷ a is a fraction), and verify your answers.

The idea

A perfect square trinomial such as x² + 8x + 16 factors as (x + 4)². For x² + bx, the number that completes the square is (b ÷ 2)², because

(x + b/2)² = x² + bx + (b/2)².

You cannot add a number to a function without changing it. So you add and subtract (b ÷ 2)² at the same time. That is just adding zero, so the function stays the same.

x² + 8xx²4x4x?missingcornerx4(x + 4)² = x² + 8x + 16x²4x4x16x4add 16
x² + 8x is an x-by-x square plus two 4x rectangles. One 4-by-4 corner (16) is missing. Adding it completes a square with side x + 4.
Worked example

Example 1: a = 1

Write f(x) = x² + 8x + 10 in vertex form. State the vertex.

  1. Half of 8 is 4, and 4² = 16.
  2. Add and subtract 16: f(x) = x² + 8x + 16 − 16 + 10.
  3. Group the perfect square: f(x) = (x² + 8x + 16) − 6 = (x + 4)² − 6.
  4. Vertex (−4, −6); it opens up, so −6 is the minimum.

f(x) = (x + 4)² − 6; vertex (−4, −6).

Worked example

Example 2: An odd value of b

Write f(x) = x² + 5x + 2 in vertex form.

  1. Half of 5 is 2.5 (or 5/2), and 2.5² = 6.25 (or 25/4).
  2. f(x) = (x² + 5x + 6.25) − 6.25 + 2 = (x + 2.5)² − 4.25.
  3. With fractions: f(x) = (x + 5/2)² − 17/4. Both are correct.
  4. Vertex (−2.5, −4.25).

f(x) = (x + 2.5)² − 4.25.

When a is not 1

  1. Factor a out of the x² and x terms only: f(x) = a(x² + (b/a)x) + c.
  2. Inside the bracket, add and subtract (half of b/a)².
  3. Move the subtracted number out of the bracket. It is multiplied by a on its way out.
  4. Write the perfect square and collect the constants.
  5. Verify by expanding, or by graphing both forms.
Worked example

Example 3: a = 3

Write f(x) = 3x² − 12x + 7 in vertex form.

  1. Factor 3 from the first two terms: f(x) = 3(x² − 4x) + 7.
  2. Half of −4 is −2, and (−2)² = 4. f(x) = 3(x² − 4x + 4 − 4) + 7.
  3. Move −4 out: it becomes 3 × (−4) = −12. f(x) = 3(x² − 4x + 4) − 12 + 7.
  4. f(x) = 3(x − 2)² − 5.
  5. Verify: 3(x² − 4x + 4) − 5 = 3x² − 12x + 12 − 5 = 3x² − 12x + 7. ✓

f(x) = 3(x − 2)² − 5; vertex (2, −5), minimum −5.

Worked example

Example 4: Negative a, and b ÷ a is a fraction

Write f(x) = −2x² + 6x + 1 in vertex form. State the maximum value.

  1. Factor −2 from the first two terms: f(x) = −2(x² − 3x) + 1. (Check: −2 × −3x = 6x.)
  2. b ÷ a = −3. Half of −3 is −1.5, and (−1.5)² = 2.25.
  3. f(x) = −2(x² − 3x + 2.25 − 2.25) + 1.
  4. Move −2.25 out: −2 × (−2.25) = +4.5. f(x) = −2(x² − 3x + 2.25) + 4.5 + 1.
  5. f(x) = −2(x − 1.5)² + 5.5. The maximum value is 5.5, at x = 1.5.
  6. Verify with x = 0: −2(0)² + 0 + 1 = 1 and −2(2.25) + 5.5 = 1. ✓

f(x) = −2(x − 1.5)² + 5.5; maximum 5.5 at x = 1.5.

xy−101234−3−2−101234567vertex (1.5, 5.5)(0, 1)(3, 1)axis x = 1.5f(x) = −2x² + 6x + 1= −2(x − 1.5)² + 5.5
Graphing both forms in Desmos gives one curve. The vertex (1.5, 5.5) comes from the vertex form; the y-intercept 1 comes from the standard form. The points (0, 1) and (3, 1) are symmetric about x = 1.5.

Verify every time

Completing the square has many small steps, so check your answer:

  • Expand your vertex form. You should get the original standard form.
  • Or substitute x = 0 into both forms: both should give c.
  • Or graph both in Desmos: you should see one curve.
Just for fun

Completing the square is one of the few times in math when you add something and immediately take it away again, and it is not cheating. You are just adding zero in a very fancy outfit.

Hands-on activity

Build the square with paper tiles

You need: paper or sticky notes, a ruler, a pencil, and scissors (take care; a grown-up can help).

  1. Cut one large square (say 8 cm by 8 cm) and label it x².
  2. Cut six strips, each 8 cm by 1 cm. Label each one x.
  3. Cut a dozen small 1 cm by 1 cm squares. Label each 1.
  4. Model x² + 6x: lay out the big square and the six strips. Put three strips along the right side and three along the bottom.
  5. How many small squares do you need to fill the corner and make one big square? Write the result as (x + __)².
  6. Repeat for x² + 4x and x² + 2x. What pattern links the number of strips to the number of small squares?

What to look for: x² + 6x needs 9 small squares: x² + 6x + 9 = (x + 3)². x² + 4x needs 4, and x² + 2x needs 1. With b strips you split them in half on two sides and need (b ÷ 2)² small squares.

Your turn

1

Write f(x) = x² + 6x + 1 in vertex form and state the vertex.

2

Write f(x) = x² − 10x + 30 in vertex form.

3

Write f(x) = x² + 3x − 1 in vertex form.

4

Write f(x) = 2x² + 8x + 3 in vertex form.

5

Write f(x) = −x² + 4x + 6 in vertex form and state the maximum value.

6

Write f(x) = 4x² − 4x + 5 in vertex form.

7

Verify your answer to the a = 2 question by expanding.

More practice: warm-up

1

What number completes the square x² + 10x + __?

2

What number completes x² − 6x + __?

3

What number completes x² + 7x + __?

4

Factor x² + 12x + 36.

5

State the vertex of f(x) = (x − 1)² − 9.

More practice: on your own

1

Write f(x) = 3x² + 18x + 20 in vertex form. State the minimum value.

2

Write f(x) = −2x² + 12x − 11 in vertex form.

3

Write f(x) = 0.5x² − 3x + 1 in vertex form.

4

Write f(x) = x² − 5x + 4 in vertex form. Use it to find the zeros, and check by factoring.

5

A band's revenue in dollars is R(x) = −0.5x² + 20x, where x is the number of T-shirts sold at a show. Complete the square to find the maximum revenue.

Challenge

1

Write f(x) = 2x² + 3x − 1 in vertex form. Give the answer with fractions.

2

A ball's height is h(t) = −4.9t² + 19.6t + 1.5 metres after t seconds. Complete the square to find the maximum height and when it happens.

3

Complete the square for f(x) = x² + bx + c in general. What are the coordinates of the vertex?

Check your understanding

Quiz

1.

What number completes the square x² + 14x + __?

2.

What is x² − 4x + 1 in vertex form?

3.

What is the correct first step for f(x) = 2x² + 12x + 5?

4.

What is the maximum value of f(x) = −x² + 2x + 4?

5.

What is x² + 3x in vertex form?

6.

How can you verify a vertex form found by completing the square?

For parents and teachers

Big idea: expectation A2.8 asks students to express a quadratic function in vertex form, given standard form, by completing the square, including cases where b ÷ a is a simple rational number, and to verify with graphing technology that the forms are equivalent.

How to help: completing the square is a recipe. Have your teen say each step aloud: "factor out a, half of b over a, square it, add and subtract, move it out times a." Insist on a check (expand or x = 0) every time.

Common difficulties:

  • Forgetting to multiply the subtracted number by a when it leaves the bracket.
  • Halving b instead of b ÷ a when a ≠ 1.
  • Factoring a out of the constant too.
  • Sign errors with negative a (−2 × −2.25 = +4.5).
  • Arithmetic with fractions: allow decimals if they are exact (1.5, 2.25), but practise fractions too.