Using the quadratic formula

Solving equations
Algebra
Author

Tom Coleman

Summary
Solving quadratic equations of the form \(ax^2 + bx + c\) is a core skill in mathematics. A guaranteed method to solve these is use of the quadratic formula. This guide explains the terminology and usage of the quadratic formula, as well as an explanation of why the quadratic formula works.

Before reading this guide, it is highly recommended that you read Guide: Introduction to quadratic equations.

What is the quadratic formula?

One of the most important types of an equation are quadratic equations; very generally speaking, these are equations that contain a squared term. These appear almost everywhere in mathematics, from modelling projectile motion in mechanics to describing circles, ellipses, parabolas and hyperbolas in 2D space. It is therefore crucial to be able to identify and solve quadratic equations.

This guide will focus on solving quadratic equations in one variable by use of the quadratic formula. The quadratic formula is an all-purpose way of finding solutions to any quadratic equation (unlike factorisation) and generally quicker than completing the square. Many examples are included in the guide, as well as a proof that the quadratic formula works for any quadratic equation \(ax^2 + bx + c = 0\).

The quadratic formula

Let \(ax^2 + bx + c = 0\) be a quadratic equation (where \(a\neq 0\)). Then the roots to this quadratic equation are given by \[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\] where one of the roots is given by the term \((-b+\sqrt{b^2 - 4ac})/2a\) and the other given by the term \((-b-\sqrt{b^2 - 4ac})/2a\).

If you have read Guide: Introduction to quadratic equations, you can recognize the discriminant \(D = b^2 - 4ac\) in the square root. As you know from there, the discriminant tells you how many potential real solutions the quadratic has; the reason for this is the square root in the quadratic formula.

The proof of the quadratic formula is given in Proof: The quadratic formula.

Why use the quadratic formula?

Here are two quadratic equations: \[(1)\;\; x^2 + 8x + 7 = 0 \qquad (2)\;\; x^2 + 8x + 8 = 0.\] They differ by \(1\) in the constant term; \(c = 7\) in \((1)\), and \(c = 8\) in \((2)\). The solutions to \((1)\) are \(x = -1\) and \(x = -7\); the solutions to \((2)\) are \[x = -4 + \sqrt{8} \quad\textsf{ and }\quad x = -4 - \sqrt{8}\] Notice how different the solutions are with such a slight change in the equation!

Therefore, it is not always clear exactly when quadratic equations have nice solutions that could be obtained by factorization, or solutions that require the use of square roots or complex numbers. This is particularly true when \(a\) is not equal to \(1\).

The advantage of the quadratic formula is that solutions to quadratic equations are always obtainable using this method. So if you are unsure how to solve a quadratic equation, then you should always use the quadratic formula as it always works.

Using the quadratic formula

Here are some examples of quadratic equations which are solved using the quadratic formula. To do this, you need to be able to identify the variable and the coefficients \(a,b,c\); something that was covered in Guide: Introduction to quadratic equations.

The first of these examples illustrates the importance of making sure the correct signs are inputted into the quadratic formula.

Example 1

What are the roots of the quadratic equation \(x^2 - 5x + 6 = 0\)?

Here, you could factorise the quadratic equation \(x^2 - 5x + 6 = 0\) to get \((x-2)(x-3) = 0\). This is zero precisely when \(x - 2 = 0\) or \(x - 3 = 0\); so the roots are \(x = 2\) and \(x = 3\).

You can also work this out using the quadratic formula. In this case, you’ll need to identify the values of \(a,b,c\) in the equation \(x^2 - 5x + 6 = 0\); here, \(a = 1\), \(b = -5\) and \(c = 6\). Taking care of the signs, you can put these into the quadratic formula and simplify to get \[ x = \frac{-(-5) \pm \sqrt{(-5)^2 - 4(1)(6)}}{2(1)} = \frac{5 \pm \sqrt{25 - 24}}{2} = \frac{5 \pm \sqrt{1}}{2} = \frac{5\pm 1}{2}\] Therefore, the roots are \(x = 4/2 = 2\) and \(x = 6/2 = 3\), as was found above.

This next example illustrates the importance of the quadratic equation having \(0\) on one side in order to find the roots.

Example 2

What are the roots of the quadratic equation \(-8x - 8 = x^2 + 8\)?

In order to use the quadratic formula, you need to first put the equation into the form \(ax^2 + bx + c = 0\). So rearranging \(-8x - 8 = x^2 + 8\) to get zero on the left hand side gives \[0 = x^2 + 8x + 16\] So in this case, you can take \(a = 1\), \(b = 8\) and \(c = 16\) and put these in the quadratic formula to get \[ x = \frac{-(8) \pm \sqrt{(8)^2 - 4(1)(16)}}{2(1)} = \frac{-8 \pm \sqrt{64 - 64}}{2} = \frac{-8 \pm \sqrt{0}}{2} = \frac{-8}{2}\] In this case, the discriminant \(D = 0\) and so there is one distinct root that must be counted twice. Therefore, the roots are \(x = -8/2 = -4\) twice.

This next example is the first where \(a \neq 1\); you should be prepared to solve any quadratic equation in the form \(ax^2 + bx + c = 0\).

Example 3

What are the roots of the quadratic equation \(4x^2 + 4x + 5 = 0\)?

This equation is already in the form \(ax^2 + bx + c = 0\), with \(a = 4\), \(b = 4\) and \(c = 5\). Putting these into the quadratic formula gives \[ x = \frac{-(4) \pm \sqrt{(4)^2 - 4(4)(5)}}{2(4)} = \frac{-4 \pm \sqrt{16 - 80}}{8} = \frac{-4 \pm \sqrt{-64}}{8}\] In this case, the discriminant \(D < 0\). You can say that \(\sqrt{-64} = 8i\), as \(8\) is the square root of \(64\) and \(i\) is the square root of \(-1\). This means that \[x = \frac{-4 \pm \sqrt{-64}}{8} = \frac{-4 \pm 8i}{8} = \frac{1}{2}\pm i\] and these are the two roots of this quadratic equation.

The next example changes the name of the variable used. You should be able to recognise a quadratic equation in the wild, regardless of what symbol is used as the variable.

Example 4

What are the roots of the quadratic equation \(m^2 - m - 1 = 0\)?

Here, the quadratic equation is of the required form \(am^2 + bm + c = 0\) with \(a = 1, b = -1\) and \(c = -1\). Putting these into the quadratic formula gives: \[ m = \frac{-(-1) \pm \sqrt{(-1)^2 - 4(1)(-1)}}{2(1)} = \frac{1 \pm \sqrt{1 - (-4)}}{2} = \frac{1 \pm \sqrt{5}}{2}\] Therefore, the two roots of the quadratic equation are \(m = (1 -\sqrt{5})/2\) and \(m = (1 + \sqrt{5})/2\). (The second of these is a well-known mathematical constant known as the golden ratio)

The final two examples deal with changes of variable and also a change in the typical structure of a quadratic equation.

Example 5

What are the roots of the equation \(y^4 - 3y^2 + 2 =0\)?

You can notice here that the equation given is not strictly a quadratic equation, as it is not of the form given in the definition above. However, by taking \(y^2\) as the variable instead of \(y\), you can rewrite this equation as \[y^4 - 3y^2 + 2 = (y^2)^2 - 3y^2 + 2 = 0\] and so this is a quadratic equation, with \(y^2\) as the variable. You can then use the quadratic formula with \(y^2\) as the variable, \(a = 1\), \(b = -3\) and \(c = 2\) to get \[ y^2 = \frac{-(-3) \pm \sqrt{(-3)^2 - 4(1)(2)}}{2(1)} = \frac{3 \pm \sqrt{9 - 8}}{2} = \frac{3 \pm 1}{2}\] Therefore, the two solutions for \(y^2\) are \(y^2 = 2/2 = 1\) and \(y^2 = 4/2 = 2\). This gives four solutions for \(y\), which are \(y = 1, -1, \sqrt{2}, -\sqrt{2}\).

Example 6

What are the solutions to the equation \(4q - 13 = -3/q\)?

You can notice here that this equation does not look like a quadratic equation at all; so some rearranging needs to be done. First of all, you can multiply both sides by \(q\) to get \[4q^2 - 13q = -3\] and so \[4q^2 - 13q + 3 = 0\] So this really was a quadratic equation, with \(a = 4\), \(b = -13\) and \(c = 3\). Putting this into the quadratic formula gives \[\begin{align*} q &= \frac{-(-13) \pm \sqrt{(-13)^2 - 4(4)(3)}}{2(4)} = \frac{13 \pm \sqrt{169 - 48}}{8}\\[1em] &= \frac{13 \pm \sqrt{121}}{8} = \frac{13 \pm 11}{8} \end{align*}\] Therefore, the two solutions to the equation are \(q = 2/8 = 1/4\) and \(q = 24/8 = 3\).

The next two examples mirror Examples 5 and 6 in Guide: Introduction to quadratic equations, using the fact that you have already worked out the discriminant in these cases.

Example 7

In Example 5 of Guide: Introduction to quadratic equations, you worked out the value of the discriminant \(D\) of the equation \(2x^2 + 4x - 8 = 0\) as \[D = (4)^2 - 4(2)(-8) = 16 + 64 = 80.\] You can now work out what the two distinct real roots \(r_1\) and \(r_2\) are by using the quadratic formula (with \(a = 2\) and \(b = 4\)): \[x = \frac{-4 \pm\sqrt{80}}{2(2)} = \frac{-4 \pm 4\sqrt{5}}{4} = -1 \pm\sqrt{5}\] so \(r_1 = -1+\sqrt{5}\) and \(r_2 = -1-\sqrt{5}\) are the two distinct real roots as promised.

Example 8

In Example 6 of Guide: Introduction to quadratic equations, you worked out the value of the discriminant \(D\) of the equation \(y^4 - 10y^2 + 25 = 0\) to be \[D = (-10)^2 - 4(1)(25) = 100 - 100 = 0.\] Since \(D = 0\), you can say that this quadratic equation has at most one real root \(r\) in terms of \(y^2\). You can use the quadratic formula to work out how many real roots this quadratic equation has: \[y^2 = \frac{-(-10) \pm\sqrt{0}}{2} = \frac{10}{2} = 5.\] Since \(y^2 = 5\), this equation has two real roots \(y = \sqrt{5}\) and \(y = \sqrt{-5}\).

Why does the quadratic formula work?

It’s important to note that the quadratic formula does not come out of thin air. In order to be able to use a result like this, you will have to prove that the formula gives the roots for the quadratic equation \(ax^2 + bx + c\). To see how this is done, go to Proof: The quadratic formula for more.

Quick check problems

Find the roots of each of the quadratic equations below. If a root is repeated, write it twice. Complex numbers should be written as \(a+bi\) without spaces, and where \(a\), \(b\) are real numbers. Rational numbers should be written as fractions in their simplest forms. If the roots are real, write them in ascending order; if the roots are complex, write the negative \(i\) term first.

  1. The roots of \(x^2 + 2x - 48 = 0\) are \(x=\) and \(x=\) .

  2. The roots of \(x^2 - 2x + 5 = 0\) are \(x=\) and \(x=\) .

  3. The roots of \(6x^2 + 5x - 6 = 0\) are \(x=\) and \(x=\) .

  4. The roots of \(16x^2 + 24x + 9 = 0\) are \(x=\) and \(x=\) .

Further reading

For more questions on the subject, please go to Questions: Using the quadratic formula.

For more on the proof of the quadratic formula, please go to Proof: The quadratic formula.

Version history and licensing

v1.0: initial version created 06/23 by tdhc.

  • v1.1: edited 04/24 by tdhc.

This work is licensed under CC BY-NC-SA 4.0.

Feedback

Your feedback is appreciated and useful. Feel free to leave a comment here.