How do you solve a quadratic equation by completing the square

Calculator Use

This calculator is a quadratic equation solver that will solve a second-order polynomial equation in the form ax2 + bx + c = 0 for x, where a ≠ 0, using the completing the square method.

The calculator solution will show work to solve a quadratic equation by completing the square to solve the entered equation for real and complex roots.

Completing the square when a is not 1

To complete the square when a is greater than 1 or less than 1 but not equal to 0, factor out the value of a from all other terms.

For example, find the solution by completing the square for:

\( 2x^2 - 12x + 7 = 0 \)

\( a \ne 1, a = 2 \) so divide through by 2

\( \dfrac{2}{2}x^2 - \dfrac{12}{2}x + \dfrac{7}{2} = \dfrac{0}{2} \)

which gives us

\( x^2 - 6x + \dfrac{7}{2} = 0 \)

Now, continue to solve this quadratic equation by completing the square method.

Completing the square when b = 0

When you do not have an x term because b is 0, you will have a easier equation to solve and only need to solve for the squared term.

For example: Solution by completing the square for:

\( x^2 + 0x - 4 = 0 \)

Eliminate b term with 0 to get:

\( x^2 - 4 = 0 \)

Keep \( x \) terms on the left and move the constant to the right side by adding it on both sides

\( x^2 = 4\)

Take the square root of both sides

\( x = \pm \sqrt[]{4} \)

therefore

\( x = + 2 \)

\( x = - 2 \)

Stephen Sacchetti, Yuanxin (Amy) Yang Alcocer
  • Stephen Sacchetti

    Stephen graduated from Haverford College with a B.S. in Mathematics in 2011. For the past ten years, he has been teaching high school math and coaching teachers on best practices. In 2015, Stephen earned an M.S. Ed from the University of Pennsylvania where he currently works as an adjunct professor.

    View bio
  • Instructor Yuanxin (Amy) Yang Alcocer

    Amy has a master's degree in secondary education and has been teaching math for over 9 years. Amy has worked with students at all levels from those with special needs to those that are gifted.

    View bio

Understand how to solve quadratic equations by completing the square. Find completing the square steps to work with fraction coefficients. Updated: 10/04/2021

A quadratic equation is a polynomial equation where the highest exponent on any variable is 2, for instance {eq}5x^2 + 7x - 3 = 12x + 1 {/eq} is a quadratic equation. Up until this point, solving simple quadratic equations has been a matter of taking a square root. For instance, to solve the equation {eq}x^2 = 16 {/eq}, take the square root of both sides and find {eq}x = \pm 4 {/eq}.

This same technique can be applied for slightly more complicated problems, such as {eq}(x - 3)^2 = 4 {/eq}. In this case, taking the square root of both sides leaves {eq}x - 3 = \pm 2 {/eq}, so {eq}x = 5, 1 {/eq}.

In this lesson, the goal will be to turn any quadratic equation into the form {eq}(x - a)^2 = b {/eq} so that the square root can be taken to solve for x. A method of solving these equations is called completing the square because something will be added to both sides of the original equation so that the left-hand side becomes a perfect square and can be factored into the form shown above.

The Steps

Say you are trying to find the solutions to this problem:

How do you solve a quadratic equation by completing the square

Set y equal to 0 and then proceed to find the solutions. If you aren't able to easily factor this quadratic equation, then you can use the method called completing the square. In this method, you manipulate your equation so you end up with one squared part that equals a number. This way, you can easily find your two solutions.

Let's look at the steps to solve a quadratic by completing the square.

Step 1: Set your equation to 0.

Whenever a problem asks you to find the solutions or x-intercepts, it means that you need to set your equation equal to 0 (i.e. set y = 0).

How do you solve a quadratic equation by completing the square

Step 2: Move your single constant to the other side.

You want just your variables on the left and your numbers on the right. In our example, this means we move the 8 over to the other side. We can do so by adding it to both sides since it's being subtracted. Remember, when moving terms from one side to the other, you always perform the opposite or inverse operation.

How do you solve a quadratic equation by completing the square

Step 3: Divide by the coefficient of the squared term if there is one.

You want your squared term to be just that: your variable squared, with no other constants multiplying with it. In our example, our squared term is being multiplied by a 3, so we need to divide both sides by 3.

How do you solve a quadratic equation by completing the square

Step 4: Take the coefficient of your single x term, half it including its sign, and then add the square of this number to both sides.

This step is a little bit tricky. You're going to take the coefficient of the x term, then you're going to divide it by 2. Then you're going to square this number and add it to both sides. So, for our example, the x term's coefficient is 4/3. Dividing it by 2, we get 4/6 or 2/3. Then we'll square the 2/3 and add that to both sides. This is what we get:

How do you solve a quadratic equation by completing the square

Step 5: Convert to squared form and combine like terms.

Now that you've figured out the square of the coefficient of the x term, you can now convert your equation into squared form. You'll use what you found to be half of the x term's coefficient. You'll also add your like terms together on the right side of the equation. For our problem, we get:

How do you solve a quadratic equation by completing the square

Step 6: Take the square root of both sides.

The next step in solving your equation is to take the square root of both sides. Doing this will cancel out your square. This is what we get for our problem:

How do you solve a quadratic equation by completing the square

Remember that when you take the square root of a number, you'll have both a positive and a negative component.

Step 7: Solve for the variable.

Since you have a positive and a negative part, you'll have two equations to solve for. For our problem, you have these two equations you need to solve, one for the positive part and one for the negative part:

How do you solve a quadratic equation by completing the square

To find your solutions, solve for your variable by isolating it. For our problem, we'll need to subtract 2/3 from both sides to find our solutions.

  • Video
  • Quiz
  • Course

Completing the Square Steps

Before completing the square, it will be important to notice a pattern moving back and forth from factored form and expanded form. Consider the pattern shown below:

{eq}(x + 1)^2 = x^2 + 2x + 1 \\ (x + 2)^2 = x^2 + 4x + 4 \\ (x + 3)^2 = x^2 + 6x + 9 \\ (x + 4)^2 = x^2 + 8x + 16 \\ (x + 5)^2 = x^2 + 10x + 25 {/eq}

Notice that in each case, the final term of the trinomial is half of the second coefficient squared. In the following examples, the goal will be to turn a trinomial into a perfect square and then factor that trinomial to solve. In particular, the hope will be to make the leading coefficient 1 and the constant term equal to half of the middle coefficient squared. For instance, consider the equation:

{eq}x^2 + 6x + 7 = 0 {/eq}

Notice that to make this trinomial a perfect square trinomial, the final term would have to be half of the middle term squared. Thus, take 6 and cut it in half, which gives us 3, and square it to get 9. Since the final term is currently 7 and needs to be 9, 2 must be added to both sides of the equation. Doing so yields {eq}x^2 + 6x + 9 = 2 {/eq}, which can now be factored into {eq}(x + 3)^2 = 2 {/eq} and solved by taking the square root of both sides:

{eq}x + 3 = \pm \sqrt{2} \\ x = -3 \pm \sqrt{2} {/eq}

This can be seen visually as well. Consider the expression {eq}x^2 + px {/eq} Drawing this out using areas can lead to the following image where it can be seen that the necessary piece to complete the square is {eq}(\frac{p}{2})^2 {/eq}

How do you solve a quadratic equation by completing the square

To generalize, the process of completing the square follows each of the steps below:

1. Set one side of the equation equal to zero

2. Make the leading coefficient equal to one by division if necessary

3. Find the value of half of the second coefficient and then square that value

4. Make the final term equal to the value found in step 3 by adding or subtracting from both sides

5. Factor the perfect square trinomial

6. Take the square root of both sides of the equation

7. Move over any constant terms to solve for x

Follow along with the example below which numbers each step. Solve the equation: {eq}2x^2 - 4x + 6 = 8 {/eq}

{eq}1. \ \ 2x^2 - 4x - 2 = 0 \\ 2. \ \ x^2 - 2x - 1 = 0 \\ 3. \ \ -2 \div 2 = -1, (-1)^2 = 1 \\ 4. \ \ x^2 - 2x + 1 = 2 \\ 5. \ \ (x - 1)^2 = 2 \\ 6. \ \ x - 1 = \pm \sqrt{2} \\ 7. \ \ x = 1 \pm \sqrt{2} {/eq}

Quadratic Equations: Solve by Completing the Square

1. Solve the equation {eq}x^2 - 10x + 3 = 0 {/eq} by completing the square.

First, notice that the equation is set to zero and that the leading coefficient is 1. From there, find half of the middle term squared (which is 25) and then make the constant term equal to 25. Again, this can be seen visually as well through the image:

How do you solve a quadratic equation by completing the square

So back to the equation, we need to add 22 to both sides so that the constant term equals 25. This results in:

{eq}x^2 - 10x + 25 = 22 \\ (x - 5)^2 = 22 \\ x - 5 = \pm \sqrt{22} \\ x = 5 \pm \sqrt{22} {/eq}

2. Solve the equation {eq}x^2 + 5x + 1 = 0 {/eq} by completing the square.

Again, apply the same procedure to complete the square. First, notice that the equation is set to zero and the leading coefficient is 1. Next, find half of the middle coefficient and square it. An important note is to leave the value as a fraction rather than a decimal, as fractions are easier to work with. For instance, half of 5 is {eq}\frac{5}{2} {/eq} and {eq}(\frac{5}{2})^2 = \frac{25}{4} {/eq}. On the other hand, calculating {eq}2.5^2 {/eq} might be a little trickier.

Regardless, it is now known that the goal is to get the final term equal to {eq}\frac{25}{4} {/eq} and to do so, add {eq}\frac{21}{4} {/eq} to both sides of the equation. This gives:

{eq}x^2 + 5x + \frac{25}{4} = \frac{21}{4} \\ (x + \frac{5}{2})^2 = \frac{21}{4} \\ x + \frac{5}{2} = \pm \frac{\sqrt{21}}{2} \\ x = -\frac{5}{2} \pm \frac{\sqrt{21}}{2} {/eq}

Completing the Square with Two Variables

At times, there may be a quadratic function rather than a quadratic equation, which means that two variables are present. For instance, {eq}y = x^2 + 6x + 3 {/eq} is a quadratic function. When completing the square for this function, a similar process is used, except instead of one side having a value of zero, it should have a y term isolated as above.

The Solution

After isolating our variable, we get the following answers:

How do you solve a quadratic equation by completing the square

The Steps

Say you are trying to find the solutions to this problem:

How do you solve a quadratic equation by completing the square

Set y equal to 0 and then proceed to find the solutions. If you aren't able to easily factor this quadratic equation, then you can use the method called completing the square. In this method, you manipulate your equation so you end up with one squared part that equals a number. This way, you can easily find your two solutions.

Let's look at the steps to solve a quadratic by completing the square.

Step 1: Set your equation to 0.

Whenever a problem asks you to find the solutions or x-intercepts, it means that you need to set your equation equal to 0 (i.e. set y = 0).

How do you solve a quadratic equation by completing the square

Step 2: Move your single constant to the other side.

You want just your variables on the left and your numbers on the right. In our example, this means we move the 8 over to the other side. We can do so by adding it to both sides since it's being subtracted. Remember, when moving terms from one side to the other, you always perform the opposite or inverse operation.

How do you solve a quadratic equation by completing the square

Step 3: Divide by the coefficient of the squared term if there is one.

You want your squared term to be just that: your variable squared, with no other constants multiplying with it. In our example, our squared term is being multiplied by a 3, so we need to divide both sides by 3.

How do you solve a quadratic equation by completing the square

Step 4: Take the coefficient of your single x term, half it including its sign, and then add the square of this number to both sides.

This step is a little bit tricky. You're going to take the coefficient of the x term, then you're going to divide it by 2. Then you're going to square this number and add it to both sides. So, for our example, the x term's coefficient is 4/3. Dividing it by 2, we get 4/6 or 2/3. Then we'll square the 2/3 and add that to both sides. This is what we get:

How do you solve a quadratic equation by completing the square

Step 5: Convert to squared form and combine like terms.

Now that you've figured out the square of the coefficient of the x term, you can now convert your equation into squared form. You'll use what you found to be half of the x term's coefficient. You'll also add your like terms together on the right side of the equation. For our problem, we get:

How do you solve a quadratic equation by completing the square

Step 6: Take the square root of both sides.

The next step in solving your equation is to take the square root of both sides. Doing this will cancel out your square. This is what we get for our problem:

How do you solve a quadratic equation by completing the square

Remember that when you take the square root of a number, you'll have both a positive and a negative component.

Step 7: Solve for the variable.

Since you have a positive and a negative part, you'll have two equations to solve for. For our problem, you have these two equations you need to solve, one for the positive part and one for the negative part:

How do you solve a quadratic equation by completing the square

To find your solutions, solve for your variable by isolating it. For our problem, we'll need to subtract 2/3 from both sides to find our solutions.

The Solution

After isolating our variable, we get the following answers:

How do you solve a quadratic equation by completing the square

How do you solve a quadratic equation by completing the square?

The procedure for solving a quadratic equation by completing the square is:

1. Set one side of the equation equal to zero

2. Make the leading coefficient equal to one by division if necessary

3. Find the value of half of the second coefficient and then square that value

4. Make the final term equal to the value found in step 3 by adding or subtracting from both sides

5. Factor the perfect square trinomial

6. Take the square root of both sides of the equation

7. Move over any constant terms to solve for x

How do you solve by completing the square?

Completing the square is the name of the method used to turn any quadratic equation into the form (x - a)^2 = b. This allows quadratic equations to be solved by taking the square root of both sides.

Create an account to start this course today

Used by over 30 million students worldwide

Create an account