Skip to main content
Mathematics LibreTexts

10.2: Solve Quadratic Equations by Completing the Square

  • Page ID
    15193
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives

    By the end of this section, you will be able to:

    • Complete the square of a binomial expression
    • Solve quadratic equations of the form \(x^2+bx+c=0\) by completing the square
    • Solve quadratic equations of the form \(ax^2+bx+c=0\) by completing the square
    Note

    Before you get started, take this readiness quiz. If you miss a problem, go back to the section listed and review the material.

    1. Simplify \((x+12)^2\).
      If you missed this problem, review Example 6.4.1.
    2. Factor \(y^2−18y+81\).
      If you missed this problem, review Exercise 7.4.1.
    3. Factor \(5n^2+40n+80\).
      If you missed this problem, review Exercise 7.4.13.

    So far, we have solved quadratic equations by factoring and using the Square Root Property. In this section, we will solve quadratic equations by a process called ‘completing the square.’

    Complete The Square of a Binomial Expression

    In the last section, we were able to use the Square Root Property to solve the equation \((y−7)^2=12\) because the left side was a perfect square.

    \[\begin{array}{l} {(y−7)^2=12}\\ {y−7=\pm\sqrt{12}}\\ {y−7=\pm2\sqrt{3}}\\ {y=7\pm2\sqrt{3}}\\ \nonumber \end{array}\]

    We also solved an equation in which the left side was a perfect square trinomial, but we had to rewrite it the form \((x−k)^2\) in order to use the square root property.

    \[\begin{array}{l} {x^2−10x+25=18}\\ {(x−5)^2=18}\\ \nonumber \end{array}\]

    What happens if the variable is not part of a perfect square? Can we use algebra to make a perfect square?

    Let’s study the binomial square pattern we have used many times. We will look at two examples.

    \[\begin{array}{ll} {(x+9)^2}&{(y−7)^2}\\ {(x+9)(x+9)}&{(y−7)(y−7)}\\ {x^2+9x+9x+81}&{y^2−7y−7y+49}\\ {x^2+18x+81}&{y^2−14y+49}\\ \nonumber \end{array}\]

    Definition: BINOMIAL SQUARES PATTERN

    If a,b are real numbers,

    \((a+b)^2=a^2+2ab+b^2\)

    alt

    \((a−b)^2=a^2−2ab+b^2\)

    alt

    We can use this pattern to “make” a perfect square.

    We will start with the expression \(x^2+6x\). Since there is a plus sign between the two terms, we will use the \((a+b)^2\) pattern.

    \(a^2+2ab+b^2=(a+b)^2\)

    Notice that the first term of \(x^2+6x\) is a square, \(x^2\).

    We now know \(a=x\).

    What number can we add to \(x^2+6x\) to make a perfect square trinomial?

    The image shows the expression a squared plus two a b plus b squared. Below it is the expression x squared plus six x plus a blank space. The x squared is below the a squared, the six x is below two a b and the blank is below the b squared.

    The middle term of the Binomial Squares Pattern, 2ab, is twice the product of the two terms of the binomial. This means twice the product of x and some number is 6x. So, two times some number must be six. The number we need is \(\frac{1}{2}·6=3\). The second term in the binomial, b, must be 3.

    The image is similar to the image above. It shows the expression a squared plus two a b plus b squared. Below it is the expression x squared plus two times three times x plus a blank space. The x squared is below the a squared, the two times three times x is below two a b and the blank is below the b squared.

    We now know \(b=3\).

    Now, we just square the second term of the binomial to get the last term of the perfect square trinomial, so we square three to get the last term, nine.

    The image shows the expression a squared plus two a b plus b squared. Below it is the expression x squared plus six x plus nine.

    We can now factor to

    The image shows the expression quantity a plus b squared. Below it is the expression quantity x plus three squared.

    So, we found that adding nine to \(x^2+6x\) ‘completes the square,’ and we write it as \((x+3)^2\).

    Definition: COMPLETE A SQUARE

    To complete the square of \(x^2+bx\):

    1. Identify b, the coefficient of x.
    2. Find \((\frac{1}{2}b)^2\), the number to complete the square.
    3. Add the\( (\frac{1}{2}b)^2\) to \(x^2+bx\).
    Example \(\PageIndex{1}\)

    Complete the square to make a perfect square trinomial. Then, write the result as a binomial square.

    \(x^2+14x\)

    Answer
    The coefficient of x is 14. .

    Find \((\frac{1}{2}b)^2\).

    \((\frac{1}{2}⋅14)^2\)

    \((7)^2\)

    49

     
    Add 49 to the binomial to complete the square. \(x^2+14x+49\)
    Rewrite as a binomial square. \((x+7)^2\)
    Example \(\PageIndex{2}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(y^2+12y\)

    Answer

    \((y+6)^2\)

    Example \(\PageIndex{3}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(z^2+8z\)

    Answer

    \((z+4)^2\)

    Example \(\PageIndex{4}\)

    Complete the square to make a perfect square trinomial. Then, write the result as a binomial squared. \(m^2−26m\)

    Answer
      The image shows the expression m squared minus 26 m with x squared plus b x written above it. The coefficient of m is negative 26 so b is negative 26. Find half of b and square it. Half of negative 26 is negative 13 and negative 13 squared is 169. Add 169 to the binomial to complete the square and get the expression m squared minus 26 m plus 169 which is the quantity m minus 13 squared.

    Find \((\frac{1}{2}b)^2\).

    \((\frac{1}{2}⋅(−26))^2\)

    \((−13)^2\)

    169

     
    Add 169 to the binomial to complete the square. \(m^2−26m+169\)
    Rewrite as a binomial square. \((m−13)^2\)
    Example \(\PageIndex{5}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(a^2−20a\)

    Answer

    \((a−10)^2\)

    Example \(\PageIndex{6}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(b^2−4b\)

    Answer

    \((b−2)^2\)

    Example \(\PageIndex{7}\)

    Complete the square to make a perfect square trinomial. Then, write the result as a binomial squared.

    \(u^2−9u\)

    Answer
    The coefficient of u is −9. .

    Find \((\frac{1}{2}b)^2\).

    \((\frac{1}{2}⋅(−9))^2\)

    \((−\frac{9}{2})^2\)

    \(\frac{81}{4}\)

     
    Add \(\frac{81}{4}\) to the binomial to complete the square. \(u^2−9u+\frac{81}{4}\)
    Rewrite as a binomial square. \((u−\frac{9}{2})^2\)
    Example \(\PageIndex{8}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(m^2−5m\)

    Answer

    \((m−\frac{5}{2})^2\)

    Example \(\PageIndex{9}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(n^2+13n\)

    Answer

    \((n+\frac{13}{2})^2\)

    Example \(\PageIndex{10}\)

    Complete the square to make a perfect square trinomial. Then, write the result as a binomial squared.

    \(p^2+12p\)

    Answer
    The coefficient of p is \(\frac{1}{2}\) .

    Find \((\frac{1}{2}b)^2\).

    \((\frac{1}{2}⋅\frac{1}{2})^2\)

    \((\frac{1}{4})^2\)

    \(\frac{1}{16}\)

     
    Add \(\frac{1}{16}\) to the binomial to complete the square. \(p^2+\frac{1}{2}p+\frac{1}{16}\)
    Rewrite as a binomial square. \((p+\frac{1}{4})^2\)
    Example \(\PageIndex{11}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(p^2+\frac{1}{4}p\)

    Answer

    \((p+\frac{1}{8})^2\)

    Example \(\PageIndex{12}\)

    Complete the square to make a perfect square trinomial. Write the result as a binomial square.

    \(q^2−\frac{2}{3}q\)

    Answer

    \((q−\frac{1}{3})^2\)

    Solve Quadratic Equations of the Form \(x^2 + bx + c = 0\) by completing the square

    In solving equations, we must always do the same thing to both sides of the equation. This is true, of course, when we solve a quadratic equation by completing the square, too. When we add a term to one side of the equation to make a perfect square trinomial, we must also add the same term to the other side of the equation.

    For example, if we start with the equation \(x^2+6x=40\) and we want to complete the square on the left, we will add nine to both sides of the equation.

    The image shows the equation x squared plus six x equals 40. Below that the equation is rewritten as x squared plus six x plus blank space equals 40 plus blank space. Below that the equation is rewritten again as x squared plus six x plus nine equals 40 plus nine.

    Then, we factor on the left and simplify on the right.

    \((x+3)^2=49\)

    Now the equation is in the form to solve using the Square Root Property. Completing the square is a way to transform an equation into the form we need to be able to use the Square Root Property.

    How To Solve a Quadratic Equation of the Form \(x^2+bx+c=0\) by Completing the Square.

    Example \(\PageIndex{13}\)

    Solve \(x^2+8x=48\) by completing the square.

    Answer

    The image shows the steps to solve the equation x squared plus eight x equals 48. Step one is to isolate the variable terms on one side and the constant terms on the other. The equation already has all the variables on the left.Step two is to find the quantity half of b squared, the number to complete the square and add it to both sides of the equation. The coefficient of x is eight so b is eight. Take half of eight, which is four and square it to get 16. Add 16 to both sides of the equation to get x squared plus eight x plus 16 equals 48 plus 16.Step three is to factor the perfect square trinomial as a binomial square. The left side is the perfect square trinomial x squared plus eight x plus 16 which factors to the quantity x plus four squared. Adding on the right side 48 plus 16 is 64. The equation is now the quantity x plus four squared equals 64.Step four is to use the square root property to make the equation x plus four equals plus or minus the square root of 64.Step five is to simplify the radical and then solve the two resulting equations. The square root of 64 is eight. The equation can be written as two equations: x plus four equals eight and x plus four equals negative eight. Solving each equation gives x equals four or negative 12.Step six is to check the solutions. To check the solutions put each answer in the original equation. Substituting x equals four in the original equation to get four squared plus eight times four equals 48. The left side simplifies to 16 plus 32 which is 48. Substituting x equals negative 12 in the original equation to get negative 12 squared plus eight times negative 12 equals 48. The left side simplifies to 144 minus 96 which is 48.

    Example \(\PageIndex{14}\)

    Solve \(c^2+4c=5\) by completing the square.

    Answer

    \(c=−5\), \(c=1\)

    Example \(\PageIndex{15}\)

    Solve \(d^2+10d=−9\) by completing the square.

    Answer

    \(d=−9\), \(d=−1\)

    Definition: SOLVE A QUADRATIC EQUATION OF THE FORM \(x^2+bx+c=0\) BY COMPLETING THE SQUARE.
    1. Isolate the variable terms on one side and the constant terms on the other.
    2. Find \((\frac{1}{2}·b)^2\), the number to complete the square. Add it to both sides of the equation.
    3. Factor the perfect square trinomial as a binomial square.
    4. Use the Square Root Property.
    5. Simplify the radical and then solve the two resulting equations.
    6. Check the solutions.
    Example \(\PageIndex{16}\)

    Solve \(y^2−6y=16\) by completing the square.

    Answer
    The variable terms are on the left side. .

    Take half of −6 and square it. \((\frac{1}{2}(−6))^2=9\)
    .
    Add 9 to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    Simplify the radical. .
    Solve for y. .
    Rewrite to show two solutions. .
    Solve the equations. .

    Check.
    .
     
    Example \(\PageIndex{17}\)

    Solve \(r^2−4r=12\) by completing the square.

    Answer

    \(r=−2\), \(r=6\)

    Example \(\PageIndex{18}\)

    Solve \(t^2−10t=11\) by completing the square.

    Answer

    \(t=−1\), \(t=11\)

    Example \(\PageIndex{19}\)

    Solve \(x^2+4x=−21\) by completing the square.

    Answer
    The variable terms are on the left side. .

    Take half of 4 and square it. \((\frac{1}{2}(4))^2=4\)
    .
    Add 4 to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    We cannot take the square root of a negative number. There is no real solution.
    Example \(\PageIndex{20}\)

    Solve \(y^2−10y=−35\) by completing the square.

    Answer

    no real solution

    Example \(\PageIndex{21}\)

    Solve \(z^2+8z=−19\) by completing the square.

    Answer

    no real solution

    In the previous example, there was no real solution because \((x+k)^2\) was equal to a negative number.

    Example \(\PageIndex{22}\)

    Solve \(p^2−18p=−6\) by completing the square.

    Answer
    The variable terms are on the left side. .
    Take half of −18 and square it. \((\frac{1}{2}(−18))^2=81\) .
    Add 81 to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    Simplify the radical. .
    Solve for p. .
    Rewrite to show two solutions. .

    Check.
    .

     

    Another way to check this would be to use a calculator. Evaluate \(p^2−18p\) for both of the solutions. The answer should be −6.

    Example \(\PageIndex{23}\)

    Solve \(x^2−16x=−16\) by completing the square.

    Answer

    \(x=8\pm4\sqrt{3}\)

    Example \(\PageIndex{24}\)

    Solve \(y^2+8y=11\) by completing the square.

    Answer

    \(y=−4\pm3\sqrt{3}\)

    ​​​​​​We will start the next example by isolating the variable terms on the left side of the equation.

    Example \(\PageIndex{25}\)

    Solve \(x^2+10x+4=15\) by completing the square.

    Answer
    The variable terms are on the left side. .
    Subtract 4 to get the constant terms on the right side. .

    Take half of 10 and square it. \((\frac{1}{2}(10))^2=25\)
    .
    Add 25 to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    Simplify the radical. Example10.22.jpg
    Solve for x. .
    Rewrite to show two equations. .
    Solve the equations. .

    Check.
    .

     
    Example \(\PageIndex{26}\)

    Solve \(a^2+4a+9=30\) by completing the square.

    Answer

    \(a=−7\), \(a=3\)

    Example \(\PageIndex{27}\)

    Solve \(b^2+8b−4=16\) by completing the square.

    Answer

    \(b=−10\), \(b=2\)

    To solve the next equation, we must first collect all the variable terms to the left side of the equation. Then, we proceed as we did in the previous examples.

    Example \(\PageIndex{28}\)

    Solve \(n^2=3n+11\) by completing the square.

    Answer
      .
    Subtract 3n to get the variable terms on the left side. .
    Take half of −3 and square it. \((\frac{1}{2}(−3))^2= \frac{9}{4}\) .
    Add \(\frac{9}{4}\) to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Add the fractions on the right side. .
    Use the Square Root Property. .
    Simplify the radical. .
    Solve for n. Example10.23.jpg
    Rewrite to show two equations. .
    Check. We leave the check for you!  
    Example \(\PageIndex{29}\)

    Solve \(p^2=5p+9\) by completing the square.

    Answer

    \(p=\frac{5}{2}\pm\frac{\sqrt{61}}{2}\)

    Example \(\PageIndex{30}\)

    Solve \(q^2=7q−3\) by completing the square.

    Answer

    \(q=\frac{7}{2}\pm\frac{\sqrt{37}}{2}\)

    ​​​​​​Notice that the left side of the next equation is in factored form. But the right side is not zero, so we cannot use the Zero Product Property. Instead, we multiply the factors and then put the equation into the standard form to solve by completing the square.

    Example \(\PageIndex{31}\)

    Solve \((x−3)(x+5)=9\) by completing the square.

    Answer
      .
    We multiply binomials on the left. .
    Add 15 to get the variable terms on the left side. .

    Take half of 2 and square it. \((\frac{1}{2}(2))^2=1\)
    .
    Add 1 to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    Solve for x. .
    Rewrite to show two solutions. .
    Simplify. .
    Check. We leave the check for you!  
    Example \(\PageIndex{32}\)

    Solve \((c−2)(c+8)=7\) by completing the square.

    Answer

    \(c=−3\pm4\sqrt{2}\)

    Example \(\PageIndex{33}\)

    Solve \((d−7)(d+3)=56\) by completing the square.

    Answer

    \(d=−7\), \(d=11\)

    Solve Quadratic Equations of the form \( ax^2 + bx + c = 0\) by completing the square

    The process of completing the square works best when the leading coefficient is one, so the left side of the equation is of the form \(x^2+bx+c\). If the \(x^2\) term has a coefficient, we take some preliminary steps to make the coefficient equal to one.

    Sometimes the coefficient can be factored from all three terms of the trinomial. This will be our strategy in the next example.

    Example \(\PageIndex{34}\)

    Solve \(3x^2−12x−15=0\) by completing the square.

    Answer

    To complete the square, we need the coefficient of \(x^2\) to be one. If we factor out the coefficient of \(x^2\) as a common factor, we can continue with solving the equation by completing the square.

      .
    Factor out the greatest common factor. .
    Divide both sides by 3 to isolate the trinomial. .
    Simplify. .
    Subtract 5 to get the constant terms on the right. .

    Take half of 4 and square it. \((\frac{1}{2}(4))^2=4\)
    .
    Add 4 to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    Solve for x. .
    Rewrite to show 2 solutions. .
    Simplify. .

    Check.
    .

     
    Example \(\PageIndex{35}\)

    Solve \(2m^2+16m−8=0\) by completing the square.

    Answer

    \(m=−4\pm2\sqrt{5}\)​​​

    Example \(\PageIndex{36}\)

    Solve \(4n^2−24n−56=8\) by completing the square.

    Answer

    \(n=−2, 8\)

    To complete the square, the leading coefficient must be one. When the leading coefficient is not a factor of all the terms, we will divide both sides of the equation by the leading coefficient. This will give us a fraction for the second coefficient. We have already seen how to complete the square with fractions in this section.

    Example \(\PageIndex{37}\)

    Solve \(2x^2−3x=20\) by completing the square.

    Answer

    Again, our first step will be to make the coefficient of \(x^2\) be one. By dividing both sides of the equation by the coefficient of \(x^2\), we can then continue with solving the equation by completing the square.

      .
    Divide both sides by 2 to get the coefficient of \(x^2\) to be 1. .
    Simplify. .

    Take half of \(−\frac{3}{2}\) and square it. \((\frac{1}{2}(−\frac{3}{2}))^2=\frac{9}{16}\)
    .
    Add \(\frac{9}{16}\) to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Add the fractions on the right side. .
    Use the Square Root Property. .
    Simplify the radical. .
    Solve for x. .
    Rewrite to show 2 solutions. .
    Simplify. .
    Check. We leave the check for you.  
    Example \(\PageIndex{38}\)

    Solve \(3r^2−2r=21\) by completing the square.

    Answer

    \(r=−\frac{7}{3}\), \(r=3\)​​​​​

    Example \(\PageIndex{39}\)

    Solve \(4t^2+2t=20\) by completing the square.

    Answer

    \(t=−\frac{5}{2}\), \(t=2\)

    Example \(\PageIndex{40}\)

    Solve \(3x^2+2x=4\) by completing the square.

    Answer

    Again, our first step will be to make the coefficient of \(x^2\) be one. By dividing both sides of the equation by the coefficient of \(x^2\), we can then continue with solving the equation by completing the square.

      .
    Divide both sides by 3 to make the coefficient of \(x^2\) equal 1. .
    Simplify. .

    Take half of \(\frac{2}{3}\) and square it. \((\frac{1}{2}⋅\frac{2}{3})^2=\frac{1}{9}\)

    .
    Add \(\frac{1}{9}\) to both sides. .
    Factor the perfect square trinomial as a binomial square. .
    Use the Square Root Property. .
    Simplify the radical. .
    Solve for x. .
    Rewrite to show 2 solutions. .
    Check. We leave the check for you. ​​​​​​​
    Example \(\PageIndex{41}\)

    Solve \(4x^2+3x=12\) by completing the square.

    Answer

    \(x=−\frac{3}{8}\pm\frac{\sqrt{201}}{8}\)

    Example \(\PageIndex{42}\)

    Solve \(5y^2+3y=10\) by completing the square.

    Answer

    \(y=−\frac{3}{10}\pm\frac{\sqrt{209}}{10}\)

    Access these online resources for additional instruction and practice with solving quadratic equations by completing the square:

    Key Concepts

    • Binomial Squares Pattern If a,ba,b are real numbers,
      \((a+b)^2=a^2+2ab+b^2\)
      alt
      \((a−b)^2=a^2−2ab+b^2\)
      alt
    • Complete a Square
      To complete the square of \(x^2+bx\):
      1. Identify bb, the coefficient of x.
      2. Find \((\frac{1}{2}b)^2\), the number to complete the square.
      3. Add the \((\frac{1}{2}b)^2\) to \(x^2+bx\).

    Glossary

    completing the square
    Completing the square is a method used to solve quadratic equations.

    This page titled 10.2: Solve Quadratic Equations by Completing the Square is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.