## Completing the Square and the Quadratic Formula

### Learning Outcomes

• Complete the square to solve a quadratic equation.
• Use the discriminant to determine the number and type of solutions to a quadratic equation.

Not all quadratic equations can be factored or can be solved in their original form using the square root property. In these cases, we may use other methods for solving a quadratic equation.

## Completing the Square

One method is known as completing the square. Using this process, we add or subtract terms to both sides of the equation until we have a perfect square trinomial on one side of the equal sign. We then apply the square root property. To complete the square, the leading coefficient, $a$, must equal 1. If it does not, then divide the entire equation by $a$. Then, we can use the following procedures to solve a quadratic equation by completing the square.

We will use the example ${x}^{2}+4x+1=0$ to illustrate each step.

1. Given a quadratic equation that cannot be factored and with $a=1$, first add or subtract the constant term to the right sign of the equal sign.
${x}^{2}+4x=-1$
2. Multiply the b term by $\frac{1}{2}$ and square it.
$\begin{array}{l}\frac{1}{2}\left(4\right)=2\hfill \\ {2}^{2}=4\hfill \end{array}$
3. Add ${\left(\frac{1}{2}b\right)}^{2}$ to both sides of the equal sign and simplify the right side. We have
$\begin{array}{l}{x}^{2}+4x+4=-1+4\hfill \\ {x}^{2}+4x+4=3\hfill \end{array}$
4. The left side of the equation can now be factored as a perfect square.
$\begin{array}{l}{x}^{2}+4x+4=3\hfill \\ {\left(x+2\right)}^{2}=3\hfill \end{array}$
5. Use the square root property and solve.
$\begin{array}{l}\sqrt{{\left(x+2\right)}^{2}}=\pm \sqrt{3}\hfill \\ x+2=\pm \sqrt{3}\hfill \\ x=-2\pm \sqrt{3}\hfill \end{array}$
6. The solutions are $x=-2+\sqrt{3}$, $x=-2-\sqrt{3}$.

### Properties of Equality and taking the square root of both sides

Remember that we are permitted, by the properties of equality, to add, subtract, multiply, or divide the same amount to both sides of an equation. Doing so won’t change the value of the equation but it will enable us to isolate the variable on one side (that is, to solve the equation for the variable).

The square root property gives us another operation we can do to both sides of an equation, taking the square root. We just have to remember when taking the square root (or any even root, as we’ll see later), to consider both the positive and negative possibilities of the constant.

The square root property

If $\sqrt{x}=k$

Then $x = \pm{k}$

### Example: Solving a Quadratic by Completing the Square

Solve the quadratic equation by completing the square: ${x}^{2}-3x - 5=0$.

### Try It

Solve by completing the square: ${x}^{2}-6x=13$.

Note that when solving a quadratic by completing the square, a negative value will sometimes arise under the square root symbol. Later, we’ll see that this value can be represented by a complex number (as shown in the video help for the problem below). We may also treat this type of solution as unreal, stating that no real solutions exist for this equation, by writing DNE. We will study complex numbers more thoroughly in a later module.

The fourth method of solving a quadratic equation is by using the quadratic formula, a formula that will solve all quadratic equations. Although the quadratic formula works on any quadratic equation in standard form, it is easy to make errors in substituting the values into the formula. Pay close attention when substituting, and use parentheses when inserting a negative number.

We can derive the quadratic formula by completing the square. We will assume that the leading coefficient is positive; if it is negative, we can multiply the equation by $-1$ and obtain a positive a. Given $a{x}^{2}+bx+c=0$, $a\ne 0$, we will complete the square as follows:

1. First, move the constant term to the right side of the equal sign:
$a{x}^{2}+bx=-c$
2. As we want the leading coefficient to equal 1, divide through by a:
${x}^{2}+\frac{b}{a}x=-\frac{c}{a}$
3. Then, find $\frac{1}{2}$ of the middle term, and add ${\left(\frac{1}{2}\frac{b}{a}\right)}^{2}=\frac{{b}^{2}}{4{a}^{2}}$ to both sides of the equal sign:
${x}^{2}+\frac{b}{a}x+\frac{{b}^{2}}{4{a}^{2}}=\frac{{b}^{2}}{4{a}^{2}}-\frac{c}{a}$
4. Next, write the left side as a perfect square. Find the common denominator of the right side and write it as a single fraction:
${\left(x+\frac{b}{2a}\right)}^{2}=\frac{{b}^{2}-4ac}{4{a}^{2}}$
5. Now, use the square root property, which gives
$\begin{array}{l}x+\frac{b}{2a}=\pm \sqrt{\frac{{b}^{2}-4ac}{4{a}^{2}}}\hfill \\ x+\frac{b}{2a}=\frac{\pm \sqrt{{b}^{2}-4ac}}{2a}\hfill \end{array}$
6. Finally, add $-\frac{b}{2a}$ to both sides of the equation and combine the terms on the right side. Thus,
$x=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$

### A General Note: The Quadratic Formula

Written in standard form, $a{x}^{2}+bx+c=0$, any quadratic equation can be solved using the quadratic formula:

$x=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$

where a, b, and c are real numbers and $a\ne 0$.

### How To: Given a quadratic equation, solve it using the quadratic formula

1. Make sure the equation is in standard form: $a{x}^{2}+bx+c=0$.
2. Make note of the values of the coefficients and constant term, $a,b$, and $c$.
3. Carefully substitute the values noted in step 2 into the equation. To avoid needless errors, use parentheses around each number input into the formula.
4. Calculate and solve.

Solve the quadratic equation: ${x}^{2}+5x+1=0$.

### Recall adding and subtracting fractions

The form we have used to recall adding and subtracting fractions can help us write the solutions to quadratic equations.

$\dfrac{a}{b}\pm\dfrac{c}{d} = \dfrac{ad \pm bc}{bd}$

Ex. The solutions

$x=\dfrac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$

can also be written as two separate fractions

$x=\dfrac{-b}{2a} \pm \dfrac{\sqrt{{b}^{2}-4ac}}{2a}$.

Use the quadratic formula to solve ${x}^{2}+x+2=0$.

### Try It

Solve the quadratic equation using the quadratic formula: $9{x}^{2}+3x - 2=0$.

https://ohm.lumenlearning.com/multiembedq.php?id=4014&theme=oea&iframe_resize_id=mom3

https://ohm.lumenlearning.com/multiembedq.php?id=35639&theme=oea&iframe_resize_id=mom4

## The Discriminant

The quadratic formula not only generates the solutions to a quadratic equation, it tells us about the nature of the solutions when we consider the discriminant, or the expression under the radical, ${b}^{2}-4ac$. The discriminant tells us whether the solutions are real numbers or complex numbers as well as how many solutions of each type to expect. The table below relates the value of the discriminant to the solutions of a quadratic equation.

Value of Discriminant Results
${b}^{2}-4ac=0$ One rational solution (double solution)
${b}^{2}-4ac>0$, perfect square Two rational solutions
${b}^{2}-4ac>0$, not a perfect square Two irrational solutions
${b}^{2}-4ac<0$ Two complex solutions

### recall rational and irrational numbers are real numbers

• Rational numbers: A rational number is a number that can be expressed as a ratio of integers (a fraction with an integer numerator and a positive, non-zero integer denominator). The square root of a perfect square, such as $\sqrt{25}$ is rational because it can be expressed as $\dfrac{5}{1} = 5$. Solutions containing only rational numbers are themselves rational solutions.
• Irrational numbers: All the real numbers that are not rational are called irrational numbers. These numbers cannot be expressed as a fraction of integers. As quadratic solutions, irrational numbers arise in the form of a square root of a numbers that is not a perfect square. For example, $\sqrt{6}$ cannot be expressed as a ratio of two integers. $\sqrt{6}$ is an irrational number. Solutions containing an irrational number are themselves irrational solutions.
• Both rational and irrational numbers are real numbers. Quadratic solutions that are either rational or irrational are real solutions.
• Quadratic solutions that are unreal (they have a negative under the square root symbol, the radical symbol) are called complex solutions.

### A General Note: The Discriminant

For $a{x}^{2}+bx+c=0$, where $a$, $b$, and $c$ are real numbers, the discriminant is the expression under the radical in the quadratic formula: ${b}^{2}-4ac$. It tells us whether the solutions are real numbers or complex numbers and how many solutions of each type to expect.

### Example: Using the Discriminant to Find the Nature of the Solutions to a Quadratic Equation

Use the discriminant to find the nature of the solutions to the following quadratic equations:

1. ${x}^{2}+4x+4=0$
2. $8{x}^{2}+14x+3=0$
3. $3{x}^{2}-5x - 2=0$
4. $3{x}^{2}-10x+15=0$