## Solving Quadratic Equations by Factoring

A quadratic equation of the form $ax^2+bx+c=0$ can sometimes be solved by factoring the quadratic expression.

### Learning Objectives

Use the factors of a quadratic equation to solve it without using the quadratic formula

### Key Takeaways

#### Key Points

• A quadratic equation is a polynomial equation of the second degree. A general quadratic equation can be written in the form: $ax^2 + bx + c = 0$.
• One way to solve a quadratic equation is to factor the polynomial. This is essentially the reverse process of multiplying out two binomials with the FOIL method.
• You can check whether your proposed solutions are actual solutions by plugging them back in to the equation to see if they satisfy the equation.

#### Key Terms

• factor: To find all the mathematical objects that divide a mathematical object evenly.
• degree: the sum of the exponents of a term or the order of a polynomial.
• quadratic: A polynomial of degree two.

To factor an expression means to rewrite it so that it is the product of factors. For example, the expression $x^2-7x+12$ can be written as $(x-3)(x-4)$.

When we multiply $(x-3)$ times $(x-4)$ to obtain $x^2-7x+12$ we call that operation “multiplying out” or sometimes FOILing. (Recall that FOIL stands for First, Outer, Inner, Last, which is how we combine the terms.) The reverse process is called factoring.

### Solving Quadratic Equations by Factoring

Factoring is useful to help solve an equation of the form:

$ax^2+bx+c=0$

For example, if you wanted to solve the equation $x^2-7x+12=0$, if you could realize that the quadratic factors as $(x-3)(x-4)$.

You could then rewrite your equation as $(x-3)(x-4)=0$ and conclude that the two solutions are $x=3$ and $x=4$.

This follows because the only way that two things can multiply together to be $0$ is if one or the other is $0$. So the expression $(x-3)(x-4)=0$ tells us that either $x-3=0$, in which case $x=3$, or $x-4=0$, in which case $x=4.$

### Determining the Factors

You may be wondering: but how does one come up with the two factors? Let’s consider this same example more extensively.

Again, imagine you want to factor $x^2-7x+12$. First set up the desired format: $( \quad )( \quad )$

Now lets look at how to fill in the variable slots in this format. The first two terms in each set of parentheses must multiply together to be $x^2$. So we write $(x \quad )(x \quad )=0$.

Next we think about the fact that the last two terms must multiply together to be $12.$ We consider the following possibilities for how two numbers could multiply together to be $12,$ namely $12 \cdot 1, 6 \cdot 2,$ or $4 \cdot 3.$

Of these possibilities, the ones that add to be $7$ (the middle coefficient) are $4$ and $3$. Since we are trying to get negative $7x$ in the middle, we try $(x-4)(x-3)$. FOILing gives exactly what we want, namely:

\begin{align}(x-4)(x-3)&= x^2-3x-4x+12 \\ &=x^2-7x+12 \end{align}

Note that we can (and should) check that $4$ and $3$ are solutions to the original equation $x^2-7x+12=0.$

### Another Example

Suppose you want to solve:

$x^2+2x-8=0$

We attempt to factor the quadratic. We would need factors of $-8$ which also add together to be $2$. It seems as though $4$ and $-2$ might work, so we try factoring this as $(x-2)(x+4).$

FOILing shows us that this is correct:

\begin{align} (x-2)(x+4) &= x^2 +4x-2x-8 \\ &= x^2 +2x-8 \end{align}

Thus we have $(x-2)(x+4)=0,$ so either $x-2=0$ in which case $x=2,$ or $x+4=0,$ in which case $x=-4.$ We check our work by plugging both of these numbers back into the original equation and seeing that the equation is satisfied.

## Factoring Perfect Square Trinomials

When a trinomial is a perfect square, it can be factored into two equal binomials.

### Learning Objectives

Determine whether a quadratic equation is a perfect square and factor it accordingly if it is

### Key Takeaways

#### Key Points

• Some quadratics, known as perfect squares, can be factored into two equal binomials.
• Perfect squares have the form $a^2+2ab+b^2$.
• Perfect square quadratics have only one root.

#### Key Terms

• trinomial: A polynomial expression consisting of three terms, or monomials, separated by addition and/or subtraction symbols.
• binomial: A polynomial consisting of two terms, or monomials, separated by addition or subtraction symbols.

### Recognizing Perfect Square Trinomials

Note that if a binomial of the form $a+b$ is squared, the result has the following form: $(a+b)^2=(a+b)(a+b)=a^2+2ab+b^2.$ So both the first and last term are squares, and the middle term has factors of $2,$ $a$, and $b,$ where the latter are the square roots of the first and last term respectively.

For example, if the expression $2x+3$ were squared, we would obtain $(2x+3)(2x+3)=4x^2+12x+9.$ Note that the first term $4x^2$ is the square of $2x$ while the last term $9$ is the square of $3$, while the middle term is twice $2x\cdot3$.

It is important to be able to recognize such trinomials, so that they can the be factored as a perfect square.

### Factoring Perfect Square Trinomials

If you are attempting to to factor a trinomial and realize that it is a perfect square, the factoring becomes much easier to do.

### Example 1

Suppose you were trying to factor $x^2+8x+16.$ One can see that the first term is the square of $x$ while the last term is the square of $4$. Since the middle term is twice $4 \cdot x$, this must be a perfect square trinomial, and we can factor it as:

$x^2+8x+16=(x+4)^2$

### Example 2

Suppose you were trying to solve $9x^2+6x+1=0.$ You might try to factor the quadratic expression on the left-hand side of the equation. Since the first term is $3x$ squared, the last term is one squared, and the middle term is twice $3x\cdot 1$, this is a perfect square, and we can write:

$9x^2+6x+1=(3x+1)^2$

Thus the original equation has the form $(3x+1)^2=0$, so the only solution is when $3x+1=0$, which is when $3x=-1,$ or $x=-\frac{1}{3}.$ This quadratic equation has only that one solution.

## Factoring a Difference of Squares

When a quadratic is a difference of squares, there is a helpful formula for factoring it.

### Learning Objectives

Determine whether a quadratic equation is a difference of squares and factor it accordingly if it is.

### Key Takeaways

#### Key Points

• We can factor $x^2-y^2$, the difference of two squar  es, as $(x-y)(x+y).$
• It is useful to be able to spot these kinds of quadratics so that they can be factored quickly and easily.

#### Key Terms

• square: The second power of a number, value, term or expression.
• binomial: A polynomial consisting of two terms, or monomials, separated by addition or subtraction symbols.

When we multiply together the two binomials $(x-y)$ and $(x+y)$, we obtain the product $x^2-y^2.$ Usually when we multiply two binomials we obtain a trinomial, but in this case, when we FOIL, the outer and inner terms cancel. When we recall this fact in the reverse direction, it is called the difference of squares formula:

$x^2-y^2=(x-y)(x+y)$

Another way to think about this formula is to consider trying to solve the equation $x^2=a^2$ for $x$. Taking the square root of both sides of the equation gives the answer $x = \pm a$.

But $x^2 = a^2$ can also be solved by rewriting the equation as $x^2-a^2=0$ and factoring the difference of squares. From this, you would obtain:

$(x-a)(x+a)=0$

Thus  there are two solutions, where $x-a=0$ ($x=a$) and where $x+a=0$, ($x=-a$); the same as above. Using the difference of squares is just another way to think about solving the equation.

### Example 1

Suppose you were trying to factor the quadratic expression:

$x^2-16$

If you recognize the first term as the square of $x$ and the term after the minus sign as the square of $4$, you can then factor the expression as:

$(x-4)(x+4)$

### Example 2

Suppose you were trying to solve the equation:

$16x^4=9$

We could write this as:

$16x^4-9=0$

If we recognize the first term as the square of $4x^2$ and the term after the minus sign as the square of $3$, we can rewrite the equation as:

$(4x^2-3)(4x^2+3)=0$

This means that either $4x^2-3=0$ or $4x^2+3=0$. This latter equation has no solutions, since $4x^2$ is always greater than or equal to $0.$ However, the first equation $4x^2-3=0$ can be factored again as the difference of squares, if we consider $3$ as the square of $\sqrt3$.

Thus we have $(2x-\sqrt3)(2x+\sqrt3)=0.$

Our two solutions occur where $2x-\sqrt3=0$ (which is at $x=\frac{\sqrt3}{2}$), and where $2x+\sqrt3=0$ (which is at $x=-\frac{\sqrt3}{2}$).

Polynomials of the form $ax^2+bx+c$ can be factored via the trial and error method.

### Learning Objectives

Employ techniques to see whether a general quadratic equation can be factored

### Key Takeaways

#### Key Points

• Quadratic polynomials can often be factored with the trial and error method
• The first step in factoring is often to look for factors of the first and last terms. Our goal is to choose the proper combination of factors for the first and last terms such that they yield the middle term.

#### Key Terms

• coefficient: a constant by which an algebraic term is multiplied.
• linear: Of or relating to a class of polynomial of the form $y=ax+b$.

We can factor quadratic equations of the form $ax^2 + bx + c$ by first finding the factors of the constant $c$.  The factored form of a quadratic equation takes the general form:

$(\alpha_1 x + \beta_1)(\alpha_2 x + \beta_2)$

When $a$ is equal to one, $\alpha_1$ and $\alpha_2$ both equal one, and $\beta_1$ and $\beta_2$ are factors of the constant $c$ such that:

$b = \beta_1 + \beta_2$

When $a$ is not equal to one and not equal to zero, you can FOIL the above expression for the factored form of the quadratic to find that $\alpha_1$ and $\alpha_2$ are factors of $a$ such that:

$a=\alpha_1 \alpha_2$ and $b = \alpha_1 \beta_2 + \alpha_2 \beta_1$

In other words, the coefficient of the $x^2$ term is given by the product of the coefficients $\alpha_1$ and $\alpha_2$, and the coefficient of the $x$ term is given by the inner and outer parts of the FOIL process.

In some cases, it will be impossible to factor the quadratic such that $\alpha_1$ and $\alpha_2$ are integers.

### Example: $a=1$

$-4x + x^2 - 21$

To factor this, we have to arrange the quadratic equation in order of largest exponent value to smallest exponent value.

$x^2-4x-21$

Next, we identify the constants $b$ and $c$, which in this case are $-4$ and $-21$, respectively.

Then we list the possible pairs of factors of the constant $c$, which yields the sets 1 and -21, -1 and 21, 3 and -7, and -3 and 7. Next we need to find the factored set of values that add to equal the value of $b$.  In this case, the correct values are 3 and -7, since they add to equal $-4$.  This leads to the factored form:

$x^2 - 4x - 21 = (x - 7)(x + 3)$

### Example: $a \neq 1$

$6x^2+16x+8$

First, we factor $a$, which has one pair of factors 3 and 2. Then we factor the constant $c$, which has one pair of factors 2 and 4. Using these factored sets, we assemble the final factored form of the quadratic

$(\alpha_1 x + \beta_1)(\alpha_2 x + \beta_2)$

Such that $b = \alpha_1 \beta_2 + \alpha_2 \beta_1$.  This leads to the equation:

$(3x +2)(2x+4)$

## Completing the Square

Completing the square is a method for solving quadratic equations, and involves putting the quadratic in the form $0=a(x-h)^2 + k$.

### Learning Objectives

Solve for the zeros of a quadratic function by completing the square

### Key Takeaways

#### Key Points

• Quadratics can be put in the form $a(x-h)^2 + k$, where $h$ and $k$ are constants specific to a given quadratic.
• Once a quadratic polynomial is in the form: $0=a(x-h)^2+k$, one can solve for two values of $x$ (using the positive and negative square roots).

#### Key Terms

• quadratic equation: A polynomial equation of the second degree.

Along with factoring and using the quadratic formula, completing the square is a common method for solving quadratic equations.  It is often implemented when factoring is not an option, such as when the quadratic is a not already a perfect square.

Consider the formula for a generic quadratic equation:

$0=ax^2+bx+c$

The method of completing the square allows for the conversion to the form:

$0=a(x-h)^2+k$

where $h$ and $k$ are constants with a specific value.

The value of $k$ is meant to adjust the function to compensate for the difference between the expanded form of $a(x-h)^2$ and the general quadratic function $ax^2+bx+c$.  This adjustment is what mathematically allows for the two forms to be equal.

Once completing the square has been performed, the quadratic is easy to solve; because there is only one place where the variable $x$ is squared, the $(x-h)^2$ term can be isolated on one side of the equation, and then the square root of both sides can be taken.

### Example

As an example, consider the following quadratic polynomial:

${ x }^{ 2 }+10x+22$

This quadratic is not a perfect square.  The closest perfect square is the square of $5$, which was determined by dividing the $b$ term (in this case $10$) by two and producing the square of the result.

${ { (x+5) }^{ 2 }=x }^{ 2 }+10x+25$

However, it is possible to write the original quadratic as the sum of this square and a constant:

\begin{align} { x }^{ 2 }+10x+22 &= x^2 + 10x + 25 - 3 \\ &= (x+5)^2 - 3 \end{align}

Thus, the constant $h$ takes the value $-5$ and the constant $k$ takes the value $-3$.

Knowing this, we can now solve for x:

\begin{align} (x+5)^2-3& =0 \\ (x+5)^2 &=3 \\ x+5&=\pm \sqrt 3\\ x&= \pm \sqrt 3 -5\end{align}