Completing the Square

Rewrite ax² + bx + c in vertex form a(x − h)² + k — exact fractions for the vertex, the axis of symmetry and every algebraic step.
Computed
The vertex form and the full working are shown below.
Vertex formexact
(x+3)2−4\left(x + 3\right)^{2} - 4
Vertex

(-3, -4)

Axis of symmetry

x = -3

Graph
(-3, -4)-6-5-4-3-2-1-5-4-3-2-11 0

Step-by-step solution

  1. 1

    The quadratic

    Rewrite the quadratic expression in vertex form a(x − h)² + k, reading off a = 1, b = 6 and c = 5.

    x2+6x+5x^{2} + 6x + 5
  2. 2

    Halve the x-coefficient and square it

    Half of 6 is 3; squaring it gives 9. This is the number that completes the square inside the bracket.

    (62)2=(3)2=9\left(\frac{6}{2}\right)^{2} = \left(3\right)^{2} = 9
  3. 3

    Add inside the bracket, compensate outside

    Adding 9 inside the bracket adds 9 to the whole expression (the bracket is multiplied by 1), so subtract 9 outside to keep everything unchanged.

    1(x2+6x+9)+5−91\left(x^{2} + 6x + 9\right) + 5 - 9
  4. 4

    Write the bracket as a perfect square

    The bracket is a perfect square: x² + 6x + 9 = (x + 3)², which is (x − h)² with h = -3.

    x2+6x+5=(x+3)2−4x^{2} + 6x + 5 = \left(x + 3\right)^{2} - 4
  5. 5

    Vertex form, vertex and axis of symmetry

    With h = -3 and k = -4 the vertex is (-3, -4) and the axis of symmetry is the vertical line x = -3.

    x2+6x+5=(x+3)2−4,vertex=(−3, −4)x^{2} + 6x + 5 = \left(x + 3\right)^{2} - 4, \qquad \text{vertex} = \left(-3,\ -4\right)