# Using the Quadratic Formula

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 [latex]-1[/latex] and obtain a positive

*a*. Given [latex]a{x}^{2}+bx+c=0[/latex], [latex]a\ne 0[/latex], we will complete the square as follows:

- First, move the constant term to the right side of the equal sign:
[latex]a{x}^{2}+bx=-c[/latex]
- As we want the leading coefficient to equal 1, divide through by
*a*:[latex]{x}^{2}+\frac{b}{a}x=-\frac{c}{a}[/latex] - Then, find [latex]\frac{1}{2}[/latex] of the middle term, and add [latex]{\left(\frac{1}{2}\frac{b}{a}\right)}^{2}=\frac{{b}^{2}}{4{a}^{2}}[/latex] to both sides of the equal sign:
[latex]{x}^{2}+\frac{b}{a}x+\frac{{b}^{2}}{4{a}^{2}}=\frac{{b}^{2}}{4{a}^{2}}-\frac{c}{a}[/latex]
- Next, write the left side as a perfect square. Find the common denominator of the right side and write it as a single fraction:
[latex]{\left(x+\frac{b}{2a}\right)}^{2}=\frac{{b}^{2}-4ac}{4{a}^{2}}[/latex]
- Now, use the square root property, which gives
[latex]\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}[/latex]
- Finally, add [latex]-\frac{b}{2a}[/latex] to both sides of the equation and combine the terms on the right side. Thus,
[latex]x=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}[/latex]

### A General Note: The Quadratic Formula

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

[latex]x=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}[/latex]

where *a*,

*b*, and

*c*are real numbers and [latex]a\ne 0[/latex].

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

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

### Example 9: Solve the Quadratic Equation Using the Quadratic Formula

Solve the quadratic equation: [latex]{x}^{2}+5x+1=0[/latex].### Solution

Identify the coefficients: [latex]a=1,b=5,c=1[/latex]. Then use the quadratic formula.[latex]\begin{array}{l}x\hfill&=\frac{-\left(5\right)\pm \sqrt{{\left(5\right)}^{2}-4\left(1\right)\left(1\right)}}{2\left(1\right)}\hfill \\ \hfill&=\frac{-5\pm \sqrt{25 - 4}}{2}\hfill \\ \hfill&=\frac{-5\pm \sqrt{21}}{2}\hfill \end{array}[/latex]

### Example 10: Solving a Quadratic Equation with the Quadratic Formula

Use the quadratic formula to solve [latex]{x}^{2}+x+2=0[/latex].### Solution

First, we identify the coefficients: [latex]a=1,b=1[/latex], and [latex]c=2[/latex]. Substitute these values into the quadratic formula.[latex]\begin{array}{l}x\hfill&=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}\hfill \\\hfill&=\frac{-\left(1\right)\pm \sqrt{{\left(1\right)}^{2}-\left(4\right)\cdot \left(1\right)\cdot \left(2\right)}}{2\cdot 1}\hfill \\\hfill&=\frac{-1\pm \sqrt{1 - 8}}{2}\hfill \\ \hfill&=\frac{-1\pm \sqrt{-7}}{2}\hfill \\\hfill&=\frac{-1\pm i\sqrt{7}}{2}\hfill \end{array}[/latex]

The solutions to the equation are [latex]x=\frac{-1+i\sqrt{7}}{2}[/latex] and [latex]x=\frac{-1-i\sqrt{7}}{2}[/latex] or [latex]x=\frac{-1}{2}+\frac{i\sqrt{7}}{2}[/latex] and [latex]x=\frac{-1}{2}-\frac{i\sqrt{7}}{2}[/latex].
### Try It 8

Solve the quadratic equation using the quadratic formula: [latex]9{x}^{2}+3x - 2=0[/latex]. Solution## 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, [latex]{b}^{2}-4ac[/latex]. The discriminant tells us whether the solutions are real numbers or complex numbers, and 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 |
---|---|

[latex]{b}^{2}-4ac=0[/latex] | One rational solution (double solution) |

[latex]{b}^{2}-4ac>0[/latex], perfect square | Two rational solutions |

[latex]{b}^{2}-4ac>0[/latex], not a perfect square | Two irrational solutions |

[latex]{b}^{2}-4ac<0[/latex] | Two complex solutions |

### A General Note: The Discriminant

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

### Example 11: 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:- [latex]{x}^{2}+4x+4=0[/latex]
- [latex]8{x}^{2}+14x+3=0[/latex]
- [latex]3{x}^{2}-5x - 2=0[/latex]
- [latex]3{x}^{2}-10x+15=0[/latex]

### Solution

Calculate the discriminant [latex]{b}^{2}-4ac[/latex] for each equation and state the expected type of solutions.- [latex]{x}^{2}+4x+4=0[/latex][latex]{b}^{2}-4ac={\left(4\right)}^{2}-4\left(1\right)\left(4\right)=0[/latex]. There will be one rational double solution.
- [latex]8{x}^{2}+14x+3=0[/latex][latex]{b}^{2}-4ac={\left(14\right)}^{2}-4\left(8\right)\left(3\right)=100[/latex]. As [latex]100[/latex] is a perfect square, there will be two rational solutions.
- [latex]3{x}^{2}-5x - 2=0[/latex][latex]{b}^{2}-4ac={\left(-5\right)}^{2}-4\left(3\right)\left(-2\right)=49[/latex]. As [latex]49[/latex] is a perfect square, there will be two rational solutions.
- [latex]3{x}^{2}-10x+15=0[/latex][latex]{b}^{2}-4ac={\left(-10\right)}^{2}-4\left(3\right)\left(15\right)=-80[/latex]. There will be two complex solutions.

## Using the Pythagorean Theorem

One of the most famous formulas in mathematics is the**Pythagorean Theorem**. It is based on a right triangle, and states the relationship among the lengths of the sides as [latex]{a}^{2}+{b}^{2}={c}^{2}[/latex], where [latex]a[/latex] and [latex]b[/latex] refer to the legs of a right triangle adjacent to the [latex]90^\circ [/latex] angle, and [latex]c[/latex] refers to the hypotenuse. It has immeasurable uses in architecture, engineering, the sciences, geometry, trigonometry, and algebra, and in everyday applications. We use the Pythagorean Theorem to solve for the length of one side of a triangle when we have the lengths of the other two. Because each of the terms is squared in the theorem, when we are solving for a side of a triangle, we have a quadratic equation. We can use the methods for solving quadratic equations that we learned in this section to solve for the missing side. The Pythagorean Theorem is given as

[latex]{a}^{2}+{b}^{2}={c}^{2}[/latex]

where [latex]a[/latex] and [latex]b[/latex] refer to the legs of a right triangle adjacent to the [latex]{90}^{\\circ }[/latex] angle, and [latex]c[/latex] refers to the hypotenuse, as shown in Figure 4.
**Figure 4**

### Example 12: Finding the Length of the Missing Side of a Right Triangle

Find the length of the missing side of the right triangle in Figure 5.**Figure 5**

*b*and the hypotenuse, the missing side is

*a.*

[latex]\begin{array}{l}{a}^{2}+{b}^{2}\hfill&={c}^{2}\hfill \\ {a}^{2}+{\left(4\right)}^{2}\hfill&={\left(12\right)}^{2}\hfill \\ {a}^{2}+16\hfill&=144\hfill \\ {a}^{2}\hfill&=128\hfill \\ a\hfill&=\sqrt{128}\hfill \\ \hfill&=8\sqrt{2}\hfill \end{array}[/latex]

### Try It 9

Use the Pythagorean Theorem to solve the right triangle problem: Leg*a*measures 4 units, leg

*b*measures 3 units. Find the length of the hypotenuse. Solution

## Licenses & Attributions

### CC licensed content, Specific attribution

- College Algebra.
**Provided by:**OpenStax**Authored by:**OpenStax College Algebra.**Located at:**https://cnx.org/contents/[email protected]:1/Preface.**License:**CC BY: Attribution.