2.7: The Quadratic Formula

MTH 95: Algebra 3 · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    2.7: The Quadratic Formula
    Learning Objectives
    • Explain how you can solve a quadratic equation in vertex form without having to factor
    • Use the quadratic formula to find the zeros of a quadratic function
    • Use the quadratic formula to find the solutions to a quadratic equation

    Consider the general quadratic function \(f(x)=a x^{2}+b x+c\). In the previous section, we learned that we can find the zeros of this function by solving the equation \(f(x)=0 \). If we substitute \(f(x) = ax^2 + bx + c\), then the resulting equation \[a x^{2}+b x+c=0 \nonumber \]

    is called a quadratic equation. In the previous section, we solved equations of this type by factoring and using the zero product property. However, it is not always possible to factor the trinomial on the left-hand side of the quadratic equation as a product of factors with integer coefficients. For example, consider the quadratic equation \[2 x^{2}+7 x-3=0 \nonumber \]

    Comparing \(2x^2 + 7x − 3\) with \(ax^2 + bx + c\), let’s list all integer pairs whose product is \(a\cdot c = (2)(−3) = −6\).

    WeChat9f60afea3a2f022ee7a1c2cd236424f5.png

    Not a single one of these integer pairs adds to b = 7. Therefore, the quadratic trinomial \(2x^2 + 7x − 3\) does not factor over the integers. Consequently, we’ll need another method to solve this quadratic equation.

    The purpose of this section is to develop a formula that will consistently provide solutions to the general quadratic equation. However, before we can develop the “Quadratic Formula,” we need to lay some groundwork involving the square roots of numbers.

    Square Roots

    We begin our discussion of square roots by investigating the solutions of the equation \(x^2 = a\). Consider the rather simple equation

    \[x^{2}=25 \nonumber \]

    Because \((−5)^2 = 25\) and \((5)^2 = 25\), \(x^{2}=25\) has two solutions, \(x = −5\) or \(x = 5\). We usually denote these solutions simultaneously, using a “plus or minus” sign:

    \[x=\pm 5 \nonumber \]

    These solutions are called the square roots of 25. Since there are two solutions, we require distinct notation for each. We will denote the positive square root of 25 with the notation \(\sqrt{25}\) and the negative square root of 25 with the notation \(-\sqrt{25}\). Thus,

    \[\sqrt{25}=5 \qquad \text { and } \qquad-\sqrt{25}=-5 \nonumber \]

    In a similar vein, the equation \(x^{2}=36\) has two solutions, \(x=\pm \sqrt{36}\), or alternatively, \(x=\pm 6\). The notation \(\sqrt{36}\) calls for the positive square root, while the notation \(-\sqrt{36}\) calls for the negative square root. That is, \[\sqrt{36}=6 \qquad \text { and } \qquad-\sqrt{36}=-6 \nonumber \]

    It is not necessary that the right-hand side of the equation \(x^2 = a\) be a “perfect square.” For example, the equation

    \[x^{2}=7 \quad \text { has solutions } \quad x=\pm \sqrt{7} \nonumber \]

    There is no rational square root of 7. That is, there is no way to express the square root of 7 in the form p/q, where p and q are integers. Therefore, \(\sqrt{7}\) is an example of an irrational number. However, \(\sqrt{7}\) is a perfectly valid real number, and we’re perfectly comfortable leaving our answer in the form shown in equation (4).

    However, if an approximation is needed for the square root of 7, we can reason that because 7 lies between 4 and 9, the square root of 7 will lie between 2 and 3. Because 7 is closer to 9 than 4, a reasonable approximation might be

    \[\sqrt{7} \approx 2.6 \nonumber \]

    A calculator can provide a more accurate approximation.

    \[\sqrt{7} \approx 2.645751311 \nonumber \]

    There are two degenerate cases involving the equation \(x^2 = a\) that demand our attention.

    1. The equation \(x^{2}=0\) has only one solution, namely \(x = 0\). Thus, \(\sqrt{0} = 0\).
    2. The equation\(x^{2}=-4\) has no real solutions. It is not possible to square a real number and get −4. In this situation, we will simply state that “the equation \(x^{2}=-4\) has no real solutions (no solutions that are real numbers).”
    Example 1

    Find all real solutions of the equations \(x^2 = 30\), \(x^2 = 0\), and \(x^2 = −14\).

    Solution

    The solutions follow.

    • The equation \(x^2 = 30\) has two real solutions, namely \(x=\pm \sqrt{30}\).
    • The equation \(x^2 = 0\) has one real solution, namely \(x = 0\).
    • The equation \(x^2 = -14\) has no real solutions.

    Development of the Quadratic Formula

    We now have all the groundwork in place to pursue a solution to the general quadratic equation

    \[a x^{2}+b x+c=0 \nonumber \]

    We’re going to use a form of “completing the square” to solve this equation for \(x\). Let’s begin by subtracting \(c\) from both sides of the equation.

    \[a x^{2}+b x=-c \nonumber \]

    Next, divide both sides of the equation by \(a\). \[x^{2}+\frac{b}{a} x=-\frac{c}{a} \nonumber \]

    Take half of the coefficient of \(x\), as in \(\dfrac{1}{2}\cdot\dfrac{b}{a}=\dfrac{b}{2a}\). Square this result to get \(\dfrac{b^{2}}{4 a^{2}}\). Add this amount to both sides of the equation.

    \[x^{2}+\frac{b}{a} x+\frac{b^{2}}{4 a^{2}}=-\frac{c}{a}+\frac{b^{2}}{4 a^{2}} \nonumber \]

    On the left, we factor the perfect square trinomial. On the right, we get a common denominator and add the resulting equivalent fractions.

    \[\begin{array}{l}{\left(x+\frac{b}{2 a}\right)^{2}=-\frac{4 a c}{4 a^{2}}+\frac{b^{2}}{4 a^{2}}} \\ \\{\left(x+\frac{b}{2 a}\right)^{2}=\frac{b^{2}-4 a c}{4 a^{2}}}\end{array} \nonumber \]

    Provided the right-hand side of this last equation is positive, we have two real solutions.

    \[x+\frac{b}{2 a}=\pm \sqrt{\frac{b^{2}-4 a c}{4 a^{2}}} \nonumber \]

    On the right, we take the square root of the top and the bottom of the fraction.

    \[x+\frac{b}{2 a}=\pm \frac{\sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    To complete the solution, we need only subtract \(\dfrac{b}{2a}\) from both sides of the equation.

    \[x=-\frac{b}{2 a} \pm \frac{\sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    Although this last answer is a perfectly good solution, we customarily rewrite the solution with a single common denominator.

    \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    This last result gives the solution to the general quadratic equation.

    The Quadratic Formula

    The solutions to the quadratic equation \(a x^{2}+b x+c=0\) are given by the quadratic formula \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    Although the development of the quadratic formula can be intimidating, in practice, its application is quite simple. Let’s look at some examples.

    Example 2

    Use the quadratic formula to solve the equation \[x^{2}=27-6 x \nonumber \]

    Solution

    The first step is to place the equation in the form \(ax^2 + bx + c = 0\) by moving every term to one side of the equation, arranging the terms in descending powers of \(x\).

    \[x^{2}+6 x-27=0 \nonumber \]

    Next, compare \(x^2 + 6x − 27 = 0\) with the general form of the quadratic equation \(ax^2 + bx + c = 0\) and note that \(a = 1\), \(b = 6\), and \(c = −27\). Copy down the quadratic formula.

    \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    Substitute \(a = 1\), \(b = 6\), and \(c = −27\) and simplify.

    \[\begin{aligned} x &=\frac{-(6) \pm \sqrt{(6)^{2}-4(1)(-27)}}{2(1)} \\ x &=\frac{-6 \pm \sqrt{36+108}}{2} \\ x &=\frac{-6 \pm \sqrt{144}}{2} \end{aligned} \nonumber \]

    In this case, 144 is a perfect square. That is, \(\sqrt{144} = 12\), so we can continue to simplify \[x=\frac{-6 \pm 12}{2} \nonumber \]

    It’s important to note that there are two real answers, namely

    \[x=\frac{-6-12}{2} \quad \text { or } \qquad x=\frac{-6+12}{2} \nonumber \]

    Simplifying, \[x=-9 \qquad \text { or } \qquad x=3 \nonumber \]

    It’s interesting to note that this problem could have been solved by factoring. Indeed,

    \[\begin{aligned} x^{2}+6 x-27 &=0 \\(x-3)(x+9) &=0 \end{aligned} \nonumber \]

    So the zero product property requires that either \(x-3 = 0\) or \(x + 9 = 0\), which leads to \(x = 3\) or \(x = −9\), answers identical to those found by the quadratic formula.

    We’ll have more to say about the “discriminant” soon, but it’s no coincidence that the quadratic \(x^2 + 6x − 27\) factored. Here is the relevant fact.

    When the Discriminant is a Perfect Square

    In the quadratic formula, \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \] the number under the radical, \(b^2 − 4ac\), is called the discriminant. When the discriminant is a perfect square, the quadratic function will always factor.

    However, it is not always the case that we can factor the given quadratic. Let’s look at another example.

    Example 3

    Given the quadratic function \(f(x) = x^2 − 2x\), find all real solutions of \(f(x) = 2\).

    Solution

    Because \(f(x) = x^2 − 2x\), the equation f(x) = 2 becomes

    \[x^{2}-2 x=2 \nonumber \]

    Set one side of the equation equal to zero by subtracting 2 from both sides of the equation.

    \[x^{2}-2 x-2=0 \nonumber \]

    Compare \(x^2 − 2x − 2 = 0\) with the general quadratic equation \(ax^2 + bx + c = 0\).

    \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    Next, substitute \(a = 1\), \(b = −2\), and \(c = −2\). Note the careful use of parentheses.

    \[x=\frac{-(-2) \pm \sqrt{(-2)^{2}-4(1)(-2)}}{2(1)} \nonumber \]

    Simplify. \[\begin{array}{l}{x=\frac{2 \pm \sqrt{4+8}}{2}} \\ \\{x=\frac{2 \pm \sqrt{12}}{2}}\end{array} \nonumber \]

    We can approximate these solutions with the aid of a calculator.

    \[x\approx-0.7320508076 \qquad x\approx 2.732050808 \nonumber \]

    We will find these approximations useful in what follows.

    These examples represent a fundamental shift in our traditional approach to solving equations. In the past, we’ve tried to “isolate” the terms containing \(x\) (or whatever unknown we are solving for) on one side of the equation, and all other terms on the other side of the equation. Now, we find ourselves moving everything to one side of the equation, making one side equal to zero. This bears some explanation.

    Linear or Nonlinear

    Let’s assume that the unknown we are solving for is \(x\).

    • If the highest power of \(x\) present in the equation is \(x\) to the first power, then the equation is linear. Thus, for example, each of the equations \[2 x+3=7, \quad 3-4 x=5 x+9, \quad \text { and } \qquad a x+b=c x+d \nonumber \] is linear.
    • If there are powers of \(x\) higher than \(x\) to the first power in the equation, then the equation is nonlinear. Thus, for example, each of the equations \[x^{2}-4 x=9, \qquad x^{3}=2 x+3, \quad \text { and } \quad a x^{2}+b x=c x+d \nonumber \]is nonlinear.

    The strategy for solving an equation will shift, depending on whether the equation is linear or nonlinear.

    Solution Strategy—Linear Versus Nonlinear

    When solving equations, you must first ask if the equation is linear or nonlinear. Again, let’s assume the unknown we wish to solve for is \(x\).

    • If the equation is linear, move all terms containing \(x\) to one side of the equation, and all the remaining terms to the other side of the equation.
    • If the equation is nonlinear, move all terms to one side of the equation, making the other side of the equation zero.

    Intercepts

    In a previous example, we used the quadratic formula to find the solutions of \(x^2 − 2x − 2 = 0\). These solutions, along with their approximations, were presented as the final step. It is important to make the connection that the solutions are the zeros of the quadratic function \(g(x) = x^2 − 2x − 2\). The zeros also provide the \(x\)-coordinates of the \(x\)-intercepts of the graph of g (a parabola). To emphasize this point, let’s draw the graph of the parabola having the equation \(g(x) = x^2 − 2x − 2\).

    First, complete the square to place the quadratic function in vertex form. Take half the middle coefficient and square it, as in \(\left[\dfrac{1}{2}\cdot (−2)\right]^2 = 1\); then add and subtract this term so that the equation remains balanced.

    \[\begin{array}{l}{g(x)=x^{2}-2 x-2} \\ {g(x)=x^{2}-2 x+1-1-2}\end{array} \nonumber \]

    Factor the perfect square trinomial, then combine the constants at the end. \[g(x)=(x-1)^{2}-3 \nonumber \]

    This is a parabola that opens upward. It is shifted to the right 1 unit and down 3 units. This makes it easy to identify the vertex and draw the axis of symmetry.

    It will now be apparent why we used our calculator to approximate the solutions. These are the \(x\)-coordinates of the \(x\)-intercepts. One \(x\)-intercept is located at approximately (−0.73, 0), the other at approximately (2.73, 0). These approximations are used to plot the location of the intercepts. However, the actual values of the intercepts are \(((2-\sqrt{12}) / 2,0)\) and \(((2+\sqrt{12}) / 2,0)\), and these exact values should be used to annotate the intercepts.

    Finally, to find the \(y\)-intercept, let \(x = 0\) in \(g(x) = x^2 − 2x − 2\). Thus, g(0) = −2 and the \(y\)-intercept is (0, −2). The \(y\)-intercept and its mirror image across the axis of symmetry are both plotted, where the final graph of the parabola is also shown.

    WeChatb8ecebd407916ed6a2f297a059e62a46.png

    We’ve made an important point, and we pause to provide emphasis.

    Zeros and Intercepts

    Whenever you use the quadratic formula to solve the quadratic equation \[a x^{2}+b x+c=0 \nonumber \]

    the solutions \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    are the zeros of the quadratic function \[f(x)=a x^{2}+b x+c \nonumber \]

    The solutions also provide the \(x\)-coordinates of the \(x\)-intercepts of the graph of \(f\).

    We need to discuss one final concept.

    The Discriminant

    Consider again the quadratic equation \(ax^2 + bx + c = 0\) and the solutions (zeros) provided by the quadratic formula

    \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \]

    The expression under the radical, \(b^2 − 4ac\), is called the discriminant, which we denote by the letter D. That is, the formula for the discriminant is given by

    \[D=b^{2}-4 a c \nonumber \]

    The discriminant is used to determine the nature and number of solutions to the quadratic equation \(ax^2+bx+c = 0\). This is done without actually calculating the solutions.

    Let’s look at three key examples.

    Example 4

    Consider the quadratic equation \(x^{2}-4 x-4=0\). Calculate the discriminant and use it to determine the nature and number of the solutions.

    Solution

    Compare \(x^2 − 4x − 4 = 0\) with \(ax^2 + bx + c = 0\) and note that a = 1, b = −4, and c = −4. The discriminant is given by the calculation

    \[D=b^{2}-4 a c=(-4)^{2}-4(1)(-4)=32 \nonumber \]

    Note that the discriminant \(D\) is positive; i.e., \(D > 0\).

    Consider the quadratic function \(f(x) = x^2 − 4x − 4\), which can be written in vertex form

    \[f(x)=(x-2)^{2}-8 \nonumber \]

    This is a parabola that opens upward. It is shifted to the right 2 units, then downward 8 units. Therefore, it will intersect the \(x\)-axis at two points. Hence, one would expect that the quadratic formula would provide two real solutions (\(x\)-intercepts). Indeed,

    \[x=\frac{-(-4) \pm \sqrt{(-4)^{2}-4(1)(-4)}}{2(1)}=\frac{4 \pm \sqrt{32}}{2} \nonumber \]

    Note that the discriminant, \(D = 32\) as calculated above, is the number under the square root. These solutions have approximations

    \[x=\frac{4-\sqrt{32}}{2} \approx-0.8284271247 \qquad \text { and } \qquad x=\frac{4+\sqrt{32}}{2} \approx 4.828427125 \nonumber \]

    which aid in plotting an accurate graph of \(f(x) = (x − 2)^2 − 8\).

    WeChat902bd072c782cd44304a27a5b370189c.png

    Thus, if the discriminant is positive, the parabola will have two real \(x\)-intercepts.

    Next, let’s look at an example where the discriminant equals zero.

    Example 5

    Consider again the quadratic equation \(ax^2 + bx + c = 0\) and the solutions (zeros) provided by the quadratic formula

    \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} \nonumber \] The expression under the radical, \(b^2 − 4ac\), is called the discriminant, which we denote by the letter D. That is, the formula for the discriminant is given by \[D=b^{2}-4 a c \nonumber \]

    The discriminant is used to determine the nature and number of solutions to the quadratic equation \(ax^2+bx+c = 0\). This is done without actually calculating the solutions. Consider the quadratic equation \[x^{2}-4 x+4=0 \nonumber \]

    Calculate the discriminant and use it to determine the nature and number of the solutions.

    Solution

    Compare \(x^2 − 4x + 4 = 0\) with \(ax^2 + bx + c = 0\) and note that \(a = 1\), \(b = −4\), and \(c = 4\). The discriminant is given by the calculation

    \[D=b^{2}-4 a c=(-4)^{2}-4(1)(4)=0 \nonumber \]

    Note that the discriminant equals zero.

    Consider the quadratic function \(f(x) = x^2 − 4x + 4\), which can be written in vertex form

    \[f(x)=(x-2)^{2} \nonumber \]

    This is a parabola that opens upward and is shifted 2 units to the right. Note that there is no vertical shift, so the vertex of the parabola will rest on the \(x\)-axis, as shown in the figure. In this case, we found it necessary to plot two points to the right of the axis of symmetry and then mirror them across the axis of symmetry to obtain an accurate plot of the parabola.

    WeChat8f37e4a33360390e4261971959942683.png

    If we set \(f(x) = 0\) in this equation, then we get \(0 = (x − 2)^2\). This could be written \(0 = (x − 2)(x − 2)\) and we could say that the solutions are 2 and 2 again. However, mathematicians prefer to say that “2 is a solution of multiplicity 2” or “2 is a double solution.” Note how the parabola is tangent to the \(x\)-axis at the location of the “double solution.” That is, the parabola comes down from positive infinity, touches (but does not cross) the \(x\)-axis at \(x = 2\), then rises again to positive infinity. Of course, the situation would be reversed in the parabola opened downward, as in \(g(x) = −(x − 2)^2\), but the graph would still “kiss” the \(x\)-axis at the location of the “double solution.”

    Still, the key point to note here is that the discriminant \(D = 0\), and the parabola has only one \(x\)-intercept. That is, the equation \(x^2 − 4x + 4 = 0\) has a single real solution.

    Next, let’s look at what happens when the discriminant is negative.

    Example 6

    Consider the quadratic equation \[x^{2}-4 x+8=0 \nonumber \]

    Calculate the discriminant and use it to determine the nature and number of the solutions.

    Solution

    Compare \(x^2 − 4x + 8 = 0\) with \(ax^2 + bx + c = 0\) and note that \(a = 1\), \(b = −4\), and \(c = 8\). The discriminant is given by the calculation

    \[D=b^{2}-4 a c=(-4)^{2}-4(1)(8)=-16 \nonumber \]

    Note that the discriminant is negative.

    Consider the quadratic function \(f(x) = x^2 − 4x + 8\), which can be written in vertex form

    \[f(x)=(x-2)^{2}+4 \nonumber \]

    This is a parabola that opens upward. Moreover, it has to be shifted 2 units to the right and 4 units upward, so there can be no \(x\)-intercepts. Again, we found it necessary in this example to plot two points to the right of the axis of symmetry, then mirror them, in order to get an accurate plot of the parabola.

    WeChataf942b95dfcafb7adaabd8377a5ad93b.png

    Once again, the key point in this example is the fact that the discriminant is negative and there are no real solutions of the quadratic equation (equivalently, there are no \(x\)-intercepts). Let’s see what happens if we actually try to find the solutions of \(x^2 − 4x + 8 = 0\) using the quadratic formula. Again, \(a = 1\), \(b = −4\), and \(c = 8\), so \[x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a}=\frac{-(-4) \pm \sqrt{(-4)^{2}-4(1)(8)}}{2(1)} \nonumber \] Simplifying, \[x=\frac{4 \pm \sqrt{-16}}{2} \nonumber \]

    Again, remember that the number under the square root is the discriminant. In this case, the discriminant is −16. It is not possible to square a real number and get −16. Thus, the quadratic equation \(x^2 − 4x + 8 = 0\) has no real solutions, as predicted.

    Let’s summarize the findings in our last three examples.

    Summary

    Consider the quadratic equation \(a x^{2}+b x+c=0\). The discriminant is defined as \(D=b^{2}-4 a c\). There are three possibilities:

    1. If D > 0, then the quadratic equation has two real solutions.
    2. If D = 0, then the quadratic equation has one real solution.
    3. If D < 0, then the quadratic equation has no real solutions.

    This page titled 2.7: The Quadratic Formula was last modified on Fri, 29 Aug 2025 03:30:36 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Math Department via source content that was edited to the style and standards of the LibreTexts platform.