Solving Quadratics by Factoring and Completing the Square

This section covers:

Note that factoring the difference of cubes, and more advanced factoring, including Factoring with Exponents can be found here in the Rational Expressions and Functions section.

Again, there are several ways to solve quadratics, or find the solution (also known as the x-intercepts, roots, zeros, or values) to a quadratic equation.  (Remember that we solve quadratic equations most easily by getting everything to one side of the equal sign, which sets the quadratic to 0).

In the Quadratics section, we learned two ways to solve quadratics:

In this section, we’ll talk about two other ways:

• Factoring and setting factors to 0  (there are many ways to factor, but not everything can be factored)
• Completing the square and taking the square root of each side (a way where we don’t have to set the quadratic to 0!)

Factoring Methods

So just the way we learned how to multiply binomials (via FOILING), we need to learn how to do the opposite, or factor (or “unfoil”) the resulting trinomials.   After we’ve done enough multiplying binomials and factoring trinomials, this will become second nature.

We’ll also learn other basic polynomial factoring methods, like taking out the Greatest Common Factors (GCF) of polynomials, and factoring the difference of two squares and factoring perfect square trinomials.

Think of factoring as just “pulling apart” things that are multiplied together.  It’s the same principle of factoring 35 and getting 5 and 7.  When we factor in algebra, we do the same thing, but with variables.

NOTE:  Remember that when we factor, we want to set each factor with a variable in it to 0, and solve for the variable to get the roots.  This is because any factor that becomes 0 makes the whole expression 0.  (This is the zero product property: if ab = 0, than a = 0 and/or b = 0).

Also remember that when we factor to solve quadratics or any polynomials, we can never just divide by factors (with variables) on both sides to get rid of them.  If we do this, we may be missing solutions!

Note that not every quadratic can be factored; if it can’t, we’ll have to use one of the other methods.

But let’s learn the factoring techniques so we can solve the quadratics that can be factored; it’s a pretty simple way to solve them.  And later, when we learn how to solve more generic polynomials in the Graphing and Solving Polynomial Functions section, we’ll know how to factor!

Taking out the Greatest Common Factor (GCF)

So let’s first start with polynomials that need some simple factoring.  We always need to pull out the GCF (largest coefficients/variables that go into all the terms) first.  (We learned about the GCF with regular numbers in the Multiplying and Dividing Section here.)

Remember from the Exponents and Radicals in Algebra section that we add exponents when we multiply with the same base, and subtract exponents when we divide with the same base.

Here are some examples of factoring polynomials by taking the GCF out:

See how it’s reversing the distributive property?  It’s “undistributing”.  And it’s always a good idea to multiply back to check your answers!

Factoring Trinomials (Quadratics)

When we factor quadratics, we try to “unfoil” to get two binomials.  Again, remember that when factoring trinomials, we always need to take out any GCF’s first!

And remember that this method does not always work; certain quadratics are “unfactorable” (prime), and must be solved with another method.  Also remember that, with a trinomial, if the discriminant  where a, b, and c are from , isn’t a perfect square (like 25 or 49), you can’t factor it.

Here are some methods that we use:

Guess and Check

“Guess and Check” is just what it sounds; we have certain rules, but we try combinations to see what will work.

Let’s start with an example; let’s “UNFOIL” or factor one of the first examples that we worked with in Quadratics.  Here’s how we FOIL’ed, and how we “UNFOIL”:

So if we were to solve this trinomial, we would set the factors equal to zero:

Note the signs when you “unfoil”;  multiply these back to make sure they work:

Sometimes it’s easier and more visual if you use an “X” when you begin to factor these; we’ll first show this when there are no numbers (coefficients) before the x2 term.  We can put the coefficient of the middle term on the top, the constant term (no variable) on the bottom, and then use the two sides to find 2 numbers multiplied together to equal the bottom, but added together to equal the top.

Let’s try this for the last problem above:

Let’s try another one that’s a little bit more complicated.

Note again that to make the factoring easier, we always want to factor the GCF out of the polynomial before we “unfoil”.

Example:

Let’s factor .  First we take out the GCF (2) to get :

We still need to “unfoil” .  This is a little more complicated, since we have the 4x2.  Now we need two factors of 4 and two factors of 7, so that multiplying the inside terms and multiplying the outside terms and adding them together will give us  –11.

We can see that this trinomial is factorable, since  (the discriminant) is which is a perfect square.

When we’re “guessing and checking”, we’re actually “foiling back” to see if we got the right answer!  You may want to use your factor trees (that we learned in the Multiplying and Dividing section) to write down all the factors of the first and last coefficients.

Here are all the combinations we could have.  Note that the factors of 4 are 2 and 2, or 4 and 1.  The factors of 7 are just 7 and 1.

So the complete factoring is:  2(4x – 7)(x – 1).  If we were to solve this trinomial, we would get  by setting each factor to 0 and solving for x.  (Ignore the factor of 2, since 2 can never be 0.  If we had an x on the outside, an additional factor would be 0).

Note that if we had , we’d also have to split the y’s at the end, so we would factor to 2(4x – 7y)(x – y).  Multiply it all to together to show that it works!  (This is one we wouldn’t be asked to solve).

Special Products of Binomials – Easily Factored

There are two special cases where you can use a shortcut to factor the trinomials: Difference of Two Squares and Perfect Square Trinomials.  We saw these in the Introduction to Polynomials section in the table here.

Here are the two cases and how to factor them:

Grouping Method, or the “ac” Method

The Grouping Method for factoring trinomials has gotten more popular since the FOILing hasn’t been taught as much recently.  (The reason it’s not taught as much is because it can be only used with binomial multiplication.  I still like FOILing since I believe learning to factor is easier if we learn FOILing first).

We will turn the trinomial into a quadratic with four terms, to be able to do the grouping.  Then we have to find a pattern of binomials so we can use the distributive property to put them together (like a puzzle!).

Let’s look at the same problem as above (with the 2 already factored out, but let’s keep the y’s at the end):

Let’s use our “X” again to help us solve by the grouping method.

We can put the middle term’s coefficient (–11) on the top part of the “X”, but this time we multiply the first and last coefficients  (4  x  7 = 28) and put it on bottom part of an “X”.  Remember that the sign of a term comes before it, and pay attention to signs.

So since we found that –4  and –7 “work”, we can rewrite the trinomial and separate the middle term, so we can do some grouping and factor with the grouping method:

Grouping Method with Four Terms

Here are some examples of the grouping method when we start out with 4 terms.  Notice that the first one is a 4-term quadratic and the second is a cubic polynomial that includes factoring with the difference of squares.

Remember the difference of squares factoring is

Note that having four terms to factor doesn’t always work with the grouping method above; sometimes we have to look for differences of squares (sometimes combined with the grouping method):

The Box Method

One more method that is getting popular is called the “box” method.  This is a modified “ac” method, but we use greatest common factors (GCF) to help us factor.

This is sort of the opposite of what we did with the “multiplication box” earlier.

We put the first term in the upper left hand corner, the last term in the lower right hand corner, and we divide up the middle term in the remaining two corners so they add up to the middle term, and are factors of the first term times the last term (thus, the “ac” method).  You can put the middle terms (upper right and lower left corners) in any order, but make sure the signs are correct so they add up to the middle term.

If you have set up the box correctly, the diagonals should multiply to the same product.

Then we get the GCFs across the columns and down the rows, using the same sign of the closest box (boxes either on the left or the top).

Let’s try this for :

Then read across and down to get the factors:  (5x + 2)(2x – 3).  Foil it back, and we see that we got it correct!  If we were to solve this trinomial, we would get  by setting each factor to 0 and solving for x.

Note: when we do the box method, we have to make sure the x2 has a positive coefficient;  otherwise, we have to take the negative out across all three terms, do the factoring, and then put the negative in the front of the factored answer.

The “ac” Method without Grouping

There’s another new method to factor trinomials out there and it’s kind of cool.  It’s similar to the “ac” method above, but a little simpler.  Again, let’s use :

Completing the Square (Square Root Method)

Completing the square is what is says: we take a quadratic in standard form  and manipulate it to have a binomial square in it, like .  This way we can solve it by isolating the binomial square (getting it on one side) and taking the square root of each side.  This is commonly called the square root method.

We can also complete the square to find the vertex more easily, since the vertex form is .

What we want to do for the square root method is to make a square out of the side with the variable, and move the numbers (constants) to the other side, so we can take the square root of both sides.  Then we don’t have to use the quadratic equation, or “unfoil” to solve.

Let’s first think about what happens when we square a binomial by looking at:

(We first saw these perfect square trinomials in Introduction To Polynomials.)

Since we add the product of the middle terms twice, we have twice the product of the first (x) and second (3) terms in the middle (to get 6x).  See also how we have the square of the second term (3) at the end (9).

So to complete the square of a trinomial that isn’t a perfect square, we need to halve the second term and take the square of it – and then add that number so the square can be complete.  Then we have to make sure to add the same thing to the other side.

Then we take the square root of each side, remember that we need to include the plus and minus of the right hand side, since by definition, the square root is just the positive.  Another way to think of it is the absolute value of the left side equals the right side, so we have to include the plus and minus of the right side.

(Note: you may want to review Solving Exponential and Radical Equations to review how to solve square root equations.)

Let’s work with  first, since it just starts with an  (coefficient of  of 1):

Note that it would have been much easier to factor this quadratic, but, like the quadratic equation, we can use the completing the square method for any quadratic. (We may not always get a real number for the answer(s); we’ll talk about imaginary numbers later).

Here’s one that’s a little trickier, because of the radical in the coefficient of x:

Here’s one where the coefficient of the  isn’t 1.  (Remember again that if we can take out any factors across the whole trinomial, do it first and complete the square with the trinomial only.)  This gets a little more complicated, but it’s not too bad:

Completing the Square to get Vertex Form

We can use the same technique to put  (standard form, or  ) into vertex form ().  In this case, we want to leave everything on one side, so we have to undo what we’ve added or subtracted by completing the square:

Note:  There is another way to convert from Standard Form to Vertex Form.   We can use a General Vertex Form equation   $$y=a{{\left( {x+\frac{b}{{2a}}} \right)}^{2}}-\frac{{{{b}^{2}}-4ac}}{{4a}}$$.  Let’s try this for the example above:  a = 2, b = –5, and c = –12.    We would get  $$y=a{{\left( {x+\frac{b}{{2a}}} \right)}^{2}}-\frac{{{{b}^{2}}-4a}}{{4a}}=2{{\left( {x+\frac{{-5}}{{2\left( 2 \right)}}} \right)}^{2}}-\frac{{{{{\left( {-5} \right)}}^{2}}-4\left( 2 \right)\left( {-12} \right)}}{{4\left( 2 \right)}}=2{{\left( {x-\frac{5}{4}} \right)}^{2}}\,\,-\,\,\frac{{121}}{8}\,\,$$.   Pretty cool!

Obtaining Quadratic Equations from a Graph or Points

Sometimes you will be asked to look at a quadratic graph (or given the vertex and a point) and write the equation (in all three forms) for that graph.  The easiest way to do this is to find the vertex from the graph (usually it’s obvious!), put the equation in vertex form, and then compute the “a”  (coefficient of ) from another point on the graph, such as a root or y-intercept, if given.

If you’re given the x-intercepts (roots), you can also put it in factored form, and use another point (not one of the roots) to find the “a” part of the equation.  Remember that the “a” in all three forms (standard, factored, and vertex) will be the same.

Here are some examples:

Here’s another type of problem you might see where you have to write a Quadratic Function given a Parabola’s Axis of Symmetry and two Non-Vertex Points.  Note that we have to use a System of Equations:

Quadratics Review

So again, here are different forms of Quadratics and also the methods for finding roots of Quadratics.

Note that the “a” (coefficient of the ) is the same for all three forms!

Note:  Sometimes we’ll have a Quadratic in “almost” vertex form and play around with it to get it in vertex form.  For example, if we have   $$y=-8{{\left( {\frac{1}{2}x+2} \right)}^{2}}+3$$  and want to change it to vertex form, we can take out the  coefficient of x and do some algebra:  $$y=-8{{\left( {\frac{1}{2}x+2} \right)}^{2}}+3=-8{{\left( {\left( {\frac{1}{2}} \right)\left( {x+4} \right)} \right)}^{2}}+3$$$$=-8{{\left( {\frac{1}{2}} \right)}^{2}}{{\left( {x+4} \right)}^{2}}+3=-2{{\left( {x+4} \right)}^{2}}+3$$,  so the vertex is (–4, 3).

Note:  if we are really having a difficult time factoring a quadratic trinomial, we could, as a last resort, use the Quadratic Formula, get the roots, and, if they are rational (integers or fractions), put the quadratic back in factored form.  For example, if we used the Quadratic Formula and got roots  and –3, our factors would be .

Learn these rules, and practice, practice, practice!

For Practice: Use the Mathway widget below to try a Factoring problem. Click on Submit (the blue arrow to the right of the problem) and click on Factor to see the answer.

You can also type in your own problem, or click on the three dots in the upper right hand corner and click on “Examples” to drill down by topic.

If you click on Tap to view steps, or Click Here, you can register at Mathway for a free trial, and then upgrade to a paid subscription at any time (to get any type of math problem solved!).

On to Quadratic Inequalities – you are ready!