Completing the square is an algebraic method that consists of converting a quadratic expression from the form a*x*^{2}+b*x*+c to the form a(*x*–*h*)^{2}+*k*. The technique of completing the square can be very useful for solving quadratic equations.

In this article, we will learn about the formula and the methods that we can use to complete the square of a quadratic equation. In addition, we will solve some practice problems.

## Formula to complete the square

The process of completing the square is used to express a quadratic expression given as $latex ax^2+bx+c$ in the following form:

$latex a(x+p)^2+q$

where *p* and *q* are constants.

The simplest case of completing the square happens when we have *a*=1, that is, the quadratic term has a coefficient equal to 1. In these cases, we have:

$$x^2+bx+c=\left(x+\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2+c$$

$$=\left(x+\frac{b}{2}\right)^2-\left(\frac{b^2}{4}\right)+c$$

## Completing the square – Step by step method

We can follow the steps below to complete the square of a quadratic expression. This method applies even when the coefficient *a* is different from 1.

**Step 1:** If the coefficient *a* is different from 1, we divide the entire quadratic expression by *a* to obtain an expression where the quadratic term has a coefficient equal to 1:

$latex x^2+bx+c$

**Step 2:** We divide the coefficient of *x* (the coefficient *b*) by 2:

$$\left(\frac{b}{2}\right)$$

**Step 3:** We square the expression obtained in step 2:

$$\left(\frac{b}{2}\right)^2$$

**Step 4:** We add and subtract the expression obtained in step 3 to the expression obtained in step 1:

$$x^2+bx+\left(\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2+c$$

**Step 5:** We factor the quadratic expression by applying the algebraic identity $latex x^2+2xy+y^2=(x+y)^2$:

$$\left(x+\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2+c$$

**Step 6:** We multiply the expression resulting from step 5 by the number by which we divided in step 1.

### Solve quadratic equations by completing the square

The method of completing the square allows us to solve quadratic equations easily. When we have a quadratic expression in the form $latex (x-h)^2+k$, we can write it as follows:

$latex (x-h)^2=-k$

Here, we can take the square root of both sides and easily solve for *x*.

If you want to learn more about solving quadratic equations using the method of completing the square, **you can visit our article.**

## Completing the square – Examples with answers

The following examples are solved using what has been learned about the technique of completing the square. Try to solve the examples yourself before looking at the answer.

### EXAMPLE 1

Complete the square of the expression $latex x^2+2x+2$.

##### Solution

In this example, the coefficient of the quadratic term is equal to 1. Therefore, we don’t have to divide the expression by any number.

The coefficient *b* is equal to 2. Thus, we have:

$$\left(\frac{b}{2}\right)^2=\left(\frac{2}{2}\right)^2=1$$

Then, we add and subtract that value:

$$x^2+2x+2=x^2+2x+1-1+2$$

Completing the square and simplifying, we have:

$latex = (x+1)^2-1+2$

$latex = (x+1)^2+1$

### EXAMPLE 2

Complete the square of the expression $latex x^2+4x+6$.

##### Solution

The coefficient of the quadratic term is equal to 1, so we do not have to apply the first step.

Here, the coefficient *b* is equal to 4. Therefore, we have:

$$\left(\frac{b}{2}\right)^2=\left(\frac{4}{2}\right)^2$$

$$=2^2$$

Now, we add and subtract that value to the quadratic expression:

$$x^2+4x+6=x^2+4x+2^2-2^2+6$$

Completing the square and simplifying, we have:

$latex = (x+2)^2-4+6$

$latex = (x+2)^2+2$

### EXAMPLE 3

Complete the square of the expression $latex 2x^2+6x+4$.

##### Solution

In this example, the coefficient of the quadratic term is different from 1. Therefore, we have to start by dividing the entire expression by 2 to make it equal to 1:

⇒ $latex x^2+3x+2$.

Now, we have a coefficient *b* equal to 3, then:

$$\left(\frac{b}{2}\right)^2=\left(\frac{3}{2}\right)^2$$

Adding and subtracting that value to the quadratic expression, we have:

$$x^2+3x+2=x^2+3x+\left(\frac{3}{2}\right)^2-\left(\frac{3}{2}\right)^2+2$$

Completing the square and simplifying, we have:

$latex = (x+\frac{3}{2})^2-\frac{9}{4}+2$

$latex = (x+\frac{3}{2})^2-\frac{1}{4}$

Since we divided the expression by 2 initially, we multiply the result by 2:

⇒ $latex 2(x+\frac{3}{2})^2-\frac{1}{2}$

### EXAMPLE 4

Complete the square of the expression $latex 2x^2+8x+10$.

##### Solution

We are going to divide the expression by 2 so that the coefficient *a* is equal to 1. Therefore, we have:

⇒ $latex x^2+4x+5$

We see that the coefficient *b* is equal to 4. Thus, we have:

$$\left(\frac{b}{2}\right)^2=\left(\frac{4}{2}\right)^2$$

$$=2^2$$

Adding and subtracting this value to the quadratic expression, we have:

$$x^2+4x+5=x^2+4x+2^2-2^2+5$$

Completing the square and simplifying, we have:

$latex = (x+2)^2-4+5$

$latex = (x+2)^2+1$

Since we divided the expression by 2 initially, we multiply the result by 2:

⇒ $latex = 2(x+2)^2+2$

### EXAMPLE 5

Complete the square of the expression $latex 4x^2-8x+4$.

##### Solution

We start by dividing the expression by 4 to make the coefficient *a* equal to 1:

$latex x^2-2x+1$

Here, the coefficient *b* is equal to -2. Therefore, we have:

$$\left(\frac{b}{2}\right)^2=\left(\frac{-2}{2}\right)^2$$

$$=(-1)^2$$

Now, we add and subtract that value to the quadratic expression:

$$x^2-2x+1=x^2-2x+(-1)^2-(-1)^2+1$$

Completing the square and simplifying, we have:

$latex = (x-1)^2-1+1$

$latex = (x-1)^2$

Since we divided the expression by 4 initially, we multiply the result by 4:

⇒ $latex = 4(x-1)^2$

### EXAMPLE 6

What are the solutions to the equation $latex x^2+6x-7=0$?

##### Solution

We can solve this equation by using the method of completing the square. We see that the coefficient *b* is equal to 6. Therefore, we have:

$$\left(\frac{b}{2}\right)^2=\left(\frac{6}{2}\right)^2$$

$$=3^2$$

Now, we add and subtract that value to the quadratic expression:

$$x^2+6x-7=x^2+6x+3^2-3^2-7$$

Completing the square and simplifying, we have:

$latex = (x+3)^2-9-7$

$latex = (x+3)^2-16$

Now, we write the equation as follows:

$latex (x+3)^2=16$

Taking the square root of both sides, we have:

$latex x+3=4$

⇒ $latex x=1$

### EXAMPLE 7

Solve the quadratic equation $latex x^2-4x-1=0$ using the method of completing the square.

##### Solution

Here, the coefficient *b* is equal to -4. Therefore, we have:

$$\left(\frac{b}{2}\right)^2=\left(\frac{-4}{2}\right)^2$$

$$=(-2)^2$$

Adding and subtracting this value to the quadratic expression, we have:

$$x^2-4x-1=x^2-4x+(-2)^2-(-2)^2-1$$

Completing the square and simplifying, we have:

$latex = (x-2)^2-4-1$

$latex = (x-2)^2-5$

Now, we write as follows:

$latex (x-2)^2=5$

Taking the square root of both sides, we have:

$latex (x-2)=\sqrt{5}$

$latex x=2\pm \sqrt{5}$

## Completing the square – Practice problems

Apply the method of completing the square to solve the following problems. If you have trouble with these problems, you can look at the worked examples above for guidance.

## See also

Interested in learning more about completing the square? Take a look at these pages:

### Learn mathematics with our additional resources in different topics

**LEARN MORE**