3E

Completing the square and the graph

Complete the square for monic and non-monic quadratics, read the vertex from vertex form, and sketch any parabola, with a live vertex-form graph.

Factoring only works when the zeroes are nice numbers. Completing the square works for every quadratic, and it gives you the vertex first, which is exactly what you need for maximum and minimum problems.

Completing the square when $a = 1$

You did this for equations in 1D. For a function the idea is the same: since $(x + p)^2 = x^2 + 2px + p^2$, adding the square of half the coefficient of $x$ turns $x^2 + bx$ into a perfect square. To keep the function unchanged, add that number and subtract it again.

Example 1●

Write $y = x^2 - 8x + 3$ in the form $y = (x - h)^2 + k$.

Add and subtract $16$: $y = (x^2 - 8x + 16) - 16 + 3$
Half of −8 is −4, and (−4)² = 16.
$y = (x - 4)^2 - 13$
The bracket is now a perfect square.

Reading the vertex

Finding the zeroes

Put $y = 0$, move the constant across and take square roots. The completed square shows at once how many zeroes there are.

Example 2●●

Find the zeroes of (a) $y = x^2 - 4x - 1$ (b) $y = x^2 + 6x + 11$ (c) $y = x^2 - 10x + 25$.

(a) $y = (x - 2)^2 - 5$, so $(x - 2)^2 = 5$ and $x = 2 \pm \sqrt5$
Half of −4 is −2; add and subtract 4. Then set y = 0 and take both square roots.
(b) $y = (x + 3)^2 + 2$, so $(x + 3)^2 = -2$: no zeroes. The vertex $(-3, 2)$ is above the axis and the curve opens up.
A square can't equal a negative number.
(c) $y = (x - 5)^2$: one double zero at $x = 5$, where the vertex touches the axis.
It is already a perfect square, with nothing left over.

When $a \ne 1$

Take $a$ out of the $x^2$ and $x$ terms only, complete the square inside the bracket, then multiply back out.

Example 3●●

Complete the square for $y = 2x^2 - 12x + 7$ and state the vertex.

$y = 2(x^2 - 6x) + 7$
Factor 2 from the first two terms. The constant 7 stays outside.
$y = 2(x^2 - 6x + 9 - 9) + 7$
Half of −6 is −3, so add and subtract 9 inside the bracket.
$y = 2(x - 3)^2 - 18 + 7 = 2(x - 3)^2 - 11$
The −9 is inside a bracket that is multiplied by 2, so it leaves as −18.
Vertex $(3, -11)$, concave up, range $y \ge -11$
a = 2 is positive, so this is a minimum.

Quadratics with a given vertex

Every parabola with vertex $(h, k)$ has the form $y = a(x - h)^2 + k$. Changing $a$ changes the width and direction but not the vertex, so you need one more point to find $a$.

Every parabola with vertex (2, −8)

The vertex stays at (2, −8) as a changes.

Try this

Find the value of $a$ that makes the parabola pass through $(0, 4)$. Then check it algebraically: substitute $x = 0$ and $y = 4$ into $y = a(x - 2)^2 - 8$.

Your turn

Complete the square for $y = x^2 + 5x + 2$, and find its zeroes in exact form.

Show the working

Half of $5$ is $\tfrac52$, and $\left(\tfrac52\right)^2 = \tfrac{25}{4}$. So $y = \left(x + \tfrac52\right)^2 - \tfrac{25}{4} + 2 = \left(x + \tfrac52\right)^2 - \tfrac{17}{4}$. The vertex is $\left(-\tfrac52, -\tfrac{17}{4}\right)$.

Zeroes: $\left(x + \tfrac52\right)^2 = \tfrac{17}{4}$, so $x + \tfrac52 = \pm\tfrac{\sqrt{17}}{2}$ and $x = \dfrac{-5 \pm \sqrt{17}}{2}$.

Flashcards
Completing the square on $x^2 + bx$
Add and subtract $\left(\tfrac b2\right)^2$.
Vertex of $y = a(x - h)^2 + k$
$(h, k)$, with axis $x = h$.
Practice
  1. What number must be added to $x^2 + 10x$ to make a perfect square?

  2. $x^2 - 8x + 3 =$

  3. Find the vertex of $y = (x + 3)^2 - 5$. Enter it as $x, y$.

  4. $y = x^2 - 4x - 1$. Find the larger zero, correct to 2 decimal places.

  5. The vertex of $y = x^2 + x + 1$ is:

  6. $2x^2 - 12x + 7 = 2(x - 3)^2 + k$. Find $k$.

  7. The range of $y = -(x - 1)^2 + 4$ is:

  8. Complete the square for $y = 3x^2 + 6x + 1$. Enter the $y$-coordinate of the vertex.

  9. Exam style: a parabola has vertex $(2, -8)$ and passes through $(0, 4)$. Its equation is $y = a(x - 2)^2 - 8$. Find $a$.

  10. Exam style: $y = x^2 + px + q$ has vertex $(3, -4)$. Find $q$.

Formula sheet