### 9.3 - Factoring quadratics by completing the square

The completing the square method can be used to factor any quadratic trinomial whatsoever. We assume that you have already read these sections:

 Here is the procedure for factoring any quadratic trinomial using the completing the square method: Manipulate the quadratic trinomial a x 2 + b x + c into completed square form using the completing the square method (click here to see the details): Write the second term inside the big brackets as the square of its own square root: The result is a difference of squares inside the big brackets, which can be factored using the difference of squares formula: A 2 − B 2 = (A + B) (A − B) In this formula let: The final result is that the quadratic trinomial a x 2 + b x + c can be factored as:

Notes on the above formula:
• The quantity b 2 − 4 a c inside the square root is called the discriminant, denoted with the letter D. If the discriminant is a perfect square (e.g. 1, 4, 9, 16, …) then the square root of it will always be an integer. This explains why we demanded that D be a perfect square in the simpler methods for factoring special trinomials. It guaranteed that the factors would always contain simple integers.

• If D = 0 then the above formula reduces to the factorization of a perfect square trinomial, namely:

• If D is negative then the above formula contains the square root of a negative number. Over the real numbers this is not allowed and means that the quadratic trinomial can't be factored, but over the complex numbers this is no problem. This case is described in detail below.

Example: Factor the expression x 2 + 6 x − 5.

• Identify the form of the expression. It is a quadratic trinomial with coefficients a = 1, b = 6, and c = −5. Its discriminant is D = b 2 − 4 · a · c = 6 2 − 4 · 1 · (−5) = 56, which is not a perfect square so we must factor the expression using the completing the square method.

• The next four steps convert the expression to completed square form. First take the coefficient of the linear term, divide it by 2, and then square it. This gives 9.

• Add 9 and subtract 9 back off again just after the linear term, like this:
x 2 + 6 x + 9 − 9 − 5.

• Use brackets to group the first 3 terms. The bracketed group had 9 added to it to make it a perfect square. The rest of the expression had 9 subtracted from it. Call it the rest:
(x 2 + 6 x + 9) − 9 − 5.
• Factor the perfect square group and simplify the rest:
(x + 3) 2 − 14.
• The expression is now in completed square form. Write the rest as the square of its own square root:
• The expression is now a difference of squares. It can be factored using the difference of squares formula:
a 2b 2 = (a + b) (a − b).
• Let a = x + 3 and b = . This causes the difference of squares formula to read:
The right side of this formula gives the expression in factored form.

Example: Factor the expression 2 x 2 + 9 x − 20.

Just for variety we will factor this one using floating point rather than exact arithmetic. Follow these steps:
• Identify the form of the expression. It is a quadratic trinomial with coefficients a = 2, b = 9, and c = −20. Its discriminant is D = b 2 − 4 · a · c = 9 2 − 4 · 2 · (−20) = 241, which is not a perfect square so we must factor the expression using the completing the square method.

• The next five steps convert the expression to completed square form. Factor out the coefficient of the quadratic term:
2 ( x 2 + 4.5 x − 10)
• Now look inside the brackets. Take the coefficient of the linear term, divide it by 2, and then square it. This gives 5.0625.

• Add 5.0625 and subtract 5.0625 back off again just after the linear term, like this:
2 (x 2 + 4.5 x + 5.0626 − 5.0625 − 10)
• Use square brackets to group the first 3 terms. This square-bracketed group had 5.0625 added to it to make it a perfect square. The rest of the expression had 5.0625 subtracted from it. Call it the rest:
2 ( [x 2 + 4.5 x + 5.0626] − 5.0625 − 10)
• Factor the perfect square group and simplify the rest:
2 ( [x + 2.25] 2 − 15.0625)
• The expression is now in completed square form. Write the rest as the square of its own square root:
2 ( [x + 2.25] 2 − 3.88 2 )
• Ignore the factor of 2 (shown above in red) for the moment. The expression inside the round brackets is now a difference of squares. It can be factored using the difference of squares formula:
a 2b 2 = (a + b) (a − b).
• Let a = x + 2.25 and b = 3.88. This causes the difference of squares formula to read:
[x + 2.25] 2 − 3.88 2 = (x + 2.25 + 3.88) (x + 2.25 − 3.88)
• Simplifying the right side of this formula and remembering the factor of 2 gives the expression in factored form:
2 (x + 6.13) (x − 1.63)

 Algebra Coach Exercises

### The complex case

We saw above that any quadratic trinomial a x 2 + b x + c can be factored as:
The quantity b 2 − 4 a c inside the square root is called the discriminant, and is denoted with the letter D. If D is negative then the above formula contains square roots of negative numbers. Over the real numbers this is not allowed and means that the quadratic trinomial can't be factored. But if we are doing algebra over the complex numbers then the square root of a negative number is simply an imaginary number. Thus the only complication is that the factors contain imaginary numbers.

Example: Factor the expression x 2 + 4 x + 14.

We will factor using exact (rather than floating point) arithmetic. Follow these steps:
• Identify the form of the expression. It is a quadratic trinomial with coefficients a = 1, b = 4, and c = 14. Its discriminant is D = b 2 − 4 · a · c = 4 2 − 4 · 1 · 14 = −40. Since this is negative we know that the factors will be complex and that we must factor the expression using the completing the square method.

• The next four steps convert the expression to completed square form. First take the coefficient of the linear term, divide it by 2, and then square it. This gives 4.

• Then add 4 and subtract 4 back off again just after the linear term, like this:
x 2 + 4 x + 4 − 4 + 14.

• Use brackets to group the first 3 terms. The bracketed group had 4 added to it to make it a perfect square. The rest of the expression had 4 subtracted from it. Call it the rest:
(x 2 + 4 x + 4) − 4 + 14.
• Factor the perfect square group and simplify the rest:
(x + 2) 2 + 10.
The expression is now in completed square form. At this point we can proceed in two different directions. Either way the result will be the same.
• Procedure I: As before we write the rest as the square of its own square root:
• The expression is now a sum of squares. It can be factored using the sum of squares formula:
a 2 + b 2 = (a + b i ) (a − b i ).
• Let a = x + 2 and b = . This causes the sum of squares formula to read:
The right side of this formula gives the expression in factored form. The other direction in which to proceed is this:
• Procedure II: Write the completed square expression (x + 2) 2 + 10 as a difference instead of a sum like this:
(x + 2) 2(−10)
• Now write the rest (shown above in red) as the square of its own square root:
• Now use the fact that the square root is imaginary, , so that:
• The expression is now a difference of squares. It can be factored using the difference of squares formula:
a 2b 2 = (a + b) (a − b).
• Let a = x + 2 and b = i. This causes the difference of squares formula to read:
The right side of this formula gives the expression in factored form.

Example: Factor the expression 2 x 2 + 9 x + 14.

We will factor using floating point arithmetic. Follow these steps:
• Identify the form of the expression. It is a quadratic trinomial with coefficients a = 2, b = 9, and c = 14. Its discriminant is D = b 2 − 4 · a · c = 9 2 − 4 · 2 · 14 = −31. Since this is negative we know that the factors will be complex and that we must factor the expression using the completing the square method.

• The next five steps convert the expression to completed square form. Factor out the coefficient of the quadratic term:
2 ( x 2 + 4.5 x + 7 )
• Now look inside the brackets. Take the coefficient of the linear term, divide it by 2, and then square it. This gives 5.0625.

• Add 5.0625 and subtract 5.0625 back off again just after the linear term, like this:
2 (x 2 + 4.5 x + 5.0626 − 5.0625 + 7 )
• Use square brackets to group the first 3 terms. This square-bracketed group had 5.0625 added to it to make it a perfect square. The rest of the expression had 5.0625 subtracted from it. Call it the rest:
2 ( [x 2 + 4.5 x + 5.0626] − 5.0625 + 7 )
• Factor the perfect square group and simplify the rest:
2 ( [x + 2.25] 2 + 1.9375)
• The expression is now in completed square form. Write the rest as the square of its own square root:
2 ( [x + 2.25] 2 + 1.39 2 )
• Ignore the factor of 2 (shown above in red) for the moment. The expression inside the round brackets is now a sum of squares. It can be factored using the sum of squares formula:
a 2 + b 2 = (a + b i ) (a − b i ).
• Let a = x + 2.25 and b = 1.39. This causes the sum of squares formula to read:
[x + 2.25] 2 + 1.39 2 = (x + 2.25 + 1.39 i ) (x + 2.25 − 1.39 i )
• Remembering the factor of 2 gives the expression in factored form:
2 (x + 2.25 + 1.39 i ) (x + 2.25 − 1.39 i )

 Algebra Coach Exercises

If you found this page in a web search you won’t see the