Algebra Help

How Do You Complete the Square?

A step-by-step method for converting quadratics and solving equations.

StudyBAP8 min read

Quick Answer

To complete the square on x² + bx: take half of b, square it, and add it to both sides. This turns x² + bx into (x + b/2)². For ax² + bx + c = 0, divide through by a first, then apply the same steps.

What Does "Complete the Square" Mean?

A perfect square trinomial is an expression like x² + 6x + 9, which factors as (x + 3)². Notice that 9 = (6/2)² — the constant term is the square of half the middle coefficient.

"Completing the square" means adding the right constant to an expression like x² + 6x (which is NOT a perfect square) to turn it into one.

This technique has two main uses:

1. Rewriting a quadratic in vertex form: y = a(x − h)² + k.

2. Solving a quadratic equation when factoring is difficult.

The Four-Step Process (leading coefficient = 1)

For x² + bx + c = 0:

Step 1: Move the constant to the right side.

x² + bx = −c

Step 2: Take half of b, square it, and add it to BOTH sides.

x² + bx + (b/2)² = −c + (b/2)²

Step 3: Factor the left side as a perfect square.

(x + b/2)² = −c + (b/2)²

Step 4: Take the square root of both sides (include ±), then solve for x.

x + b/2 = ±√(−c + (b/2)²)

x = −b/2 ± √(−c + (b/2)²)

When the Leading Coefficient Is Not 1

For ax² + bx + c = 0 where a ≠ 1:

Step 0: Divide every term by a first.

x² + (b/a)x + (c/a) = 0

Then follow the four steps above with the new coefficients.

Alternatively, factor out a from the first two terms only (useful for vertex form):

ax² + bx + c = a(x² + (b/a)x) + c

Then complete the square inside the parentheses, being careful to account for the factor of a when you add to both sides.

Converting to Vertex Form

Vertex form y = a(x − h)² + k reveals the vertex (h, k) directly.

To convert y = ax² + bx + c to vertex form:

1. Factor out a from the first two terms: y = a(x² + (b/a)x) + c.

2. Complete the square inside: add (b/(2a))² inside the parentheses.

3. Subtract a·(b/(2a))² outside to keep the equation balanced.

4. Write the perfect square and simplify.

The vertex is (h, k) = (−b/(2a), c − b²/(4a)).

Worked Examples

Example 1

Solve x² + 8x + 5 = 0 by completing the square.

Solution

  1. Move the constant: x² + 8x = −5.
  2. Half of 8 is 4. Square it: 4² = 16. Add 16 to both sides.
  3. x² + 8x + 16 = −5 + 16 = 11.
  4. Factor: (x + 4)² = 11.
  5. Take square root: x + 4 = ±√11.
  6. x = −4 ± √11.

Answer: x = −4 + √11 or x = −4 − √11.

Example 2

Solve 2x² − 12x + 7 = 0 by completing the square.

Solution

  1. Divide by 2: x² − 6x + 7/2 = 0.
  2. Move the constant: x² − 6x = −7/2.
  3. Half of −6 is −3. Square it: (−3)² = 9. Add 9 to both sides.
  4. x² − 6x + 9 = −7/2 + 9 = −7/2 + 18/2 = 11/2.
  5. Factor: (x − 3)² = 11/2.
  6. x − 3 = ±√(11/2) = ±√22/2.
  7. x = 3 ± √22/2.

Answer: x = 3 ± √22/2.

Example 3

Write y = x² − 4x + 7 in vertex form.

Solution

  1. Group: y = (x² − 4x) + 7.
  2. Half of −4 is −2. Square it: 4. Add and subtract 4 inside.
  3. y = (x² − 4x + 4) − 4 + 7.
  4. Factor: y = (x − 2)² + 3.
  5. Vertex is (2, 3).

Answer: y = (x − 2)² + 3. Vertex: (2, 3).

Example 4

Example 4: Convert to Vertex Form When the Leading Coefficient Is Not 1 — Write y = 2x² + 8x + 3 in vertex form and identify the vertex.

Solution

  1. Factor 2 from the quadratic and linear terms: y = 2(x² + 4x) + 3.
  2. Take half of 4 and square it: (4/2)² = 4.
  3. Add and subtract 4 inside the parentheses: y = 2(x² + 4x + 4 − 4) + 3.
  4. Factor the perfect square: y = 2[(x + 2)² − 4] + 3.
  5. Distribute the 2 outside — note: the subtracted 4 is inside parentheses multiplied by 2, so it contributes −8, not −4: y = 2(x + 2)² − 8 + 3.
  6. Simplify: y = 2(x + 2)² − 5.
  7. Vertex: (−2, −5).

Answer: y = 2(x + 2)² − 5. Vertex: (−2, −5).

Common Mistakes

Adding (b/2)² to only one side. You must add it to BOTH sides of the equation to keep it balanced.

Forgetting to divide by a first when the leading coefficient is not 1. Completing the square only works cleanly when the x² coefficient is 1.

Using b instead of b/2. The number you add is (b/2)², not b². Take HALF of the middle coefficient, then square it.

Sign errors when factoring. x² − 6x + 9 = (x − 3)², not (x + 3)². The sign inside the binomial matches the sign of the middle term.

Practice Problems

Solve x² + 6x − 7 = 0 by completing the square.

Hint: Move −7 to the right, then add (6/2)² = 9 to both sides.

Solve x² − 10x + 16 = 0 by completing the square.

Hint: Half of −10 is −5. Add 25 to both sides.

Write y = x² + 6x + 2 in vertex form. State the vertex.

Hint: Complete the square on x² + 6x, then adjust the constant.

Solve 3x² + 6x − 9 = 0 by completing the square.

Hint: Divide by 3 first to get x² + 2x − 3 = 0.

Frequently Asked Questions

What is the formula for completing the square?

For an expression x² + bx, add (b/2)² to create the perfect square trinomial (x + b/2)².

How do you complete the square when the leading coefficient is not 1?

Divide every term by the leading coefficient first when solving an equation. When converting to vertex form, factor the leading coefficient from the quadratic and linear terms before completing the square inside the parentheses.

How do you rewrite a quadratic in vertex form by completing the square?

Factor out the leading coefficient from the first two terms, complete the square inside the parentheses, and adjust the constant outside. The result will have the form y = a(x − h)² + k.

Related StudyBAP Lessons

Share this articleTwitter/X

Still have a question?

Submit your Algebra question here. The best questions are answered every week on StudyBAP.

Ask a Question