# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/quadratic-function/quadratic-equation-perfect-square
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/quadratic-function/quadratic-equation-perfect-square/en.mdx

Learn completing the square method to solve quadratic equations by transforming them into perfect square trinomials with clear steps.

---

## What is Completing the Square?

Completing the square is a method for solving quadratic equations by converting the equation from the form $$ax^2 + bx + c = 0$$ to the form $$(x + p)^2 = q$$. This method is particularly useful for quadratic equations that are difficult to factor using regular factorization.

Visible text: Completing the square is a method for solving quadratic equations by converting the equation from the form to the form . This method is particularly useful for quadratic equations that are difficult to factor using regular factorization.

Remember that a perfect square trinomial follows the pattern $$x^2 + 2px + p^2 = (x + p)^2$$. We use this pattern to transform quadratic equations into a more solvable form.

Visible text: Remember that a perfect square trinomial follows the pattern . We use this pattern to transform quadratic equations into a more solvable form.

## Why Use This Method?

Not all quadratic equations are easily factored. For example, the equation $$x^2 + 4x + 2 = 0$$ cannot be easily factored using rational numbers because there are no two numbers that multiply to give $$2$$ and add up to $$4$$.

Visible text: Not all quadratic equations are easily factored. For example, the equation cannot be easily factored using rational numbers because there are no two numbers that multiply to give and add up to .

In such cases, the completing the square method becomes an effective choice for finding the roots of the equation.

## Steps for Completing the Square

Here are the steps to solve a quadratic equation $$ax^2 + bx + c = 0$$ using the completing the square method:

Visible text: Here are the steps to solve a quadratic equation using the completing the square method:

1. Ensure the coefficient of $$x^2$$ is $$1$$

   If the coefficient $$a$$ of $$x^2$$ is not $$1$$, divide the entire equation by the value of $$a$$.

   **Example:** For the equation $$2x^2 + 6x + 3 = 0$$

   <MathContainer>
     
   
   ```math
   2x^2 + 6x + 3 = 0 \div 2
   ```

     
   
   ```math
   x^2 + 3x + \frac{3}{2} = 0
   ```

   </MathContainer>

2. **Move the Constant Term to the Right Side**

   Move the constant term to the right side of the equation.

   **Example:** From the equation $$x^2 + 3x + \frac{3}{2} = 0$$

   
   
   ```math
   x^2 + 3x = -\frac{3}{2}
   ```

3. **Add the Square of Half the Coefficient of x to Both Sides**

   Add $$\left(\frac{b}{2}\right)^2$$ to both sides of the equation. This value is the square of half the coefficient of $$x$$.

   **Example:** For the equation $$x^2 + 3x = -\frac{3}{2}$$

   Half of the coefficient of $$x$$ is $$\frac{3}{2}$$

   The square of this value: $$\left(\frac{3}{2}\right)^2 = \frac{9}{4}$$

   Add to both sides:

   
   
   ```math
   x^2 + 3x + \frac{9}{4} = -\frac{3}{2} + \frac{9}{4}
   ```

4. **Factor the Left Side into a Perfect Square**

   The left side now has the form $$x^2 + bx + \left(\frac{b}{2}\right)^2$$, which can be factored as $$\left(x + \frac{b}{2}\right)^2$$.

   **Example:** From the equation $$x^2 + 3x + \frac{9}{4} = -\frac{3}{2} + \frac{9}{4}$$

   
   
   ```math
   \left(x + \frac{3}{2}\right)^2 = -\frac{3}{2} + \frac{9}{4}
   ```

5. **Simplify the Right Side**

   Perform calculations on the right side to get a simpler form.

   **Example:** For $$\left(x + \frac{3}{2}\right)^2 = -\frac{3}{2} + \frac{9}{4}$$

   
   
   ```math
   -\frac{3}{2} + \frac{9}{4} = \frac{-6 + 9}{4} = \frac{3}{4}
   ```

   So the equation becomes:

   
   
   ```math
   \left(x + \frac{3}{2}\right)^2 = \frac{3}{4}
   ```

6. **Take the Square Root of Both Sides**

   To eliminate the square, take the square root of both sides.

   **Example:** From the equation $$\left(x + \frac{3}{2}\right)^2 = \frac{3}{4}$$

   
   
   ```math
   x + \frac{3}{2} = \pm\sqrt{\frac{3}{4}} = \pm\frac{\sqrt{3}}{2}
   ```

7. **Solve for the Unknown Value**

   Isolate the variable $$x$$ to find the roots of the equation.

   **Example:** From $$x + \frac{3}{2} = \pm\frac{\sqrt{3}}{2}$$

   For the positive sign:

   
   
   ```math
   x = \frac{\sqrt{3}}{2} - \frac{3}{2} = -\frac{3}{2} + \frac{\sqrt{3}}{2}
   ```

   For the negative sign:

   
   
   ```math
   x = -\frac{\sqrt{3}}{2} - \frac{3}{2} = -\frac{3}{2} - \frac{\sqrt{3}}{2}
   ```

   Therefore, the roots of the equation are $$x = -\frac{3}{2} + \frac{\sqrt{3}}{2}$$ and $$x = -\frac{3}{2} - \frac{\sqrt{3}}{2}$$.

Visible text: 1. Ensure the coefficient of is 

 If the coefficient of is not , divide the entire equation by the value of .

 **Example:** For the equation 

 <MathContainer>
 
 

 
 

 </MathContainer>

2. **Move the Constant Term to the Right Side**

 Move the constant term to the right side of the equation.

 **Example:** From the equation 

 
 

3. **Add the Square of Half the Coefficient of x to Both Sides**

 Add to both sides of the equation. This value is the square of half the coefficient of .

 **Example:** For the equation 

 Half of the coefficient of is 

 The square of this value: 

 Add to both sides:

 
 

4. **Factor the Left Side into a Perfect Square**

 The left side now has the form , which can be factored as .

 **Example:** From the equation 

 
 

5. **Simplify the Right Side**

 Perform calculations on the right side to get a simpler form.

 **Example:** For 

 
 

 So the equation becomes:

 
 

6. **Take the Square Root of Both Sides**

 To eliminate the square, take the square root of both sides.

 **Example:** From the equation 

 
 

7. **Solve for the Unknown Value**

 Isolate the variable to find the roots of the equation.

 **Example:** From 

 For the positive sign:

 
 

 For the negative sign:

 
 

 Therefore, the roots of the equation are and .

## Complete Solution Examples

### Equation with Leading Coefficient One

Let's solve the equation: $$x^2 + 5x + 6 = 0$$

Visible text: Let's solve the equation:

**Step** $$1$$: The coefficient $$a = 1$$, so we proceed to the next step.

Visible text: **Step** : The coefficient , so we proceed to the next step.

**Step** $$2$$: Move the constant to the right side.

Visible text: **Step** : Move the constant to the right side.

```math
x^2 + 5x = -6
```

**Step** $$3$$: Add the square of half the coefficient of $$x$$ to both sides.

Visible text: **Step** : Add the square of half the coefficient of to both sides.

Component: MathContainer
Children:

```math
\text{Half the coefficient of } x = \frac{5}{2}
```

```math
\text{The square of this value} = \left(\frac{5}{2}\right)^2 = \frac{25}{4}
```

```math
x^2 + 5x + \frac{25}{4} = -6 + \frac{25}{4}
```

**Step** $$4$$: Factor the left side into a perfect square.

Visible text: **Step** : Factor the left side into a perfect square.

```math
\left(x + \frac{5}{2}\right)^2 = -6 + \frac{25}{4}
```

**Step** $$5$$: Simplify the right side.

Visible text: **Step** : Simplify the right side.

Component: MathContainer
Children:

```math
-6 + \frac{25}{4} = \frac{-24 + 25}{4} = \frac{1}{4}
```

```math
\left(x + \frac{5}{2}\right)^2 = \frac{1}{4}
```

**Step** $$6$$: Take the square root of both sides.

Visible text: **Step** : Take the square root of both sides.

```math
x + \frac{5}{2} = \pm\frac{1}{2}
```

**Step** $$7$$: Solve for the value of $$x$$.

Visible text: **Step** : Solve for the value of .

Component: MathContainer
Children:

```math
x + \frac{5}{2} = \frac{1}{2} \quad \text{or} \quad x + \frac{5}{2} = -\frac{1}{2}
```

```math
x = \frac{1}{2} - \frac{5}{2} = -2 \quad \text{or} \quad x = -\frac{1}{2} - \frac{5}{2} = -3
```

Therefore, the roots of the equation are $$x = -2$$ and $$x = -3$$.

Visible text: Therefore, the roots of the equation are and .

### Equation with Leading Coefficient Not One

Let's solve the equation: $$2x^2 + 6x + 3 = 0$$

Visible text: Let's solve the equation:

**Step** $$1$$: Divide all terms by the coefficient $$a = 2$$

Visible text: **Step** : Divide all terms by the coefficient

```math
x^2 + 3x + \frac{3}{2} = 0
```

**Step** $$2$$: Move the constant to the right side

Visible text: **Step** : Move the constant to the right side

```math
x^2 + 3x = -\frac{3}{2}
```

**Step** $$3$$: Add the square of half the coefficient of $$x$$ to both sides

Visible text: **Step** : Add the square of half the coefficient of to both sides

Component: MathContainer
Children:

```math
\text{Half the coefficient of } x = \frac{3}{2}
```

```math
\text{The square of this value} = \left(\frac{3}{2}\right)^2 = \frac{9}{4}
```

```math
x^2 + 3x + \frac{9}{4} = -\frac{3}{2} + \frac{9}{4}
```

**Step** $$4$$: Factor the left side into a perfect square

Visible text: **Step** : Factor the left side into a perfect square

```math
\left(x + \frac{3}{2}\right)^2 = -\frac{3}{2} + \frac{9}{4}
```

**Step** $$5$$: Simplify the right side

Visible text: **Step** : Simplify the right side

Component: MathContainer
Children:

```math
-\frac{3}{2} + \frac{9}{4} = \frac{-6 + 9}{4} = \frac{3}{4}
```

```math
\left(x + \frac{3}{2}\right)^2 = \frac{3}{4}
```

**Step** $$6$$: Take the square root of both sides

Visible text: **Step** : Take the square root of both sides

```math
x + \frac{3}{2} = \pm\frac{\sqrt{3}}{2}
```

**Step** $$7$$: Solve for the value of $$x$$

Visible text: **Step** : Solve for the value of

Component: MathContainer
Children:

```math
x + \frac{3}{2} = \frac{\sqrt{3}}{2} \quad \text{or} \quad x + \frac{3}{2} = -\frac{\sqrt{3}}{2}
```

```math
x = \frac{\sqrt{3}}{2} - \frac{3}{2} = -\frac{3}{2} + \frac{\sqrt{3}}{2} \quad \text{or} \quad x = -\frac{\sqrt{3}}{2} - \frac{3}{2} = -\frac{3}{2} - \frac{\sqrt{3}}{2}
```

Therefore, the roots of the equation are $$x = -\frac{3}{2} + \frac{\sqrt{3}}{2}$$ and $$x = -\frac{3}{2} - \frac{\sqrt{3}}{2}$$.

Visible text: Therefore, the roots of the equation are and .

## Important Points in Completing the Square

1. **For equations with coefficient of $$x^2$$ not equal to $$1$$**: Always divide the entire equation by the coefficient $$a$$ first. Example: $$3x^2 + 6x + 2 = 0$$ becomes $$x^2 + 2x + \frac{2}{3} = 0$$

2. **Constant to be added**: Always add the square of half the coefficient of $$x$$ to both sides. Example: For $$x^2 + 8x = 5$$, add $$\left(\frac{8}{2}\right)^2 = 16$$ to both sides.

3. **Final form**: The equation will transform into the form $$\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}$$. Example: $$x^2 + 6x + 8 = 0$$ becomes $$\left(x + 3\right)^2 = 1$$

Visible text: 1. **For equations with coefficient of not equal to **: Always divide the entire equation by the coefficient first. Example: becomes 

2. **Constant to be added**: Always add the square of half the coefficient of to both sides. Example: For , add to both sides.

3. **Final form**: The equation will transform into the form . Example: becomes

## Special Cases and Variations

### When the Discriminant is Negative

If $$b^2 - 4ac < 0$$, then the equation has no real roots.

Visible text: If , then the equation has no real roots.

**Concrete example:** $$x^2 + 2x + 2 = 0$$

Visible text: **Concrete example:**

Completing the square:

Component: MathContainer
Children:

```math
x^2 + 2x + 1 = -2 + 1 \quad \text{(adding 1 to both sides)}
```

```math
(x + 1)^2 = -1
```

Since no real number has a square of $$-1$$, this equation has no real roots.

Visible text: Since no real number has a square of , this equation has no real roots.

### For Incomplete Quadratic Equations

For equations of the form $$ax^2 + c = 0$$, we don't need to complete the square.

Visible text: For equations of the form , we don't need to complete the square.

**Concrete example:** $$3x^2 - 12 = 0$$

Visible text: **Concrete example:**

Component: MathContainer
Children:

```math
3x^2 = 12
```

```math
x^2 = 4
```

```math
x = \pm 2
```

Therefore, the roots of the equation are $$x = 2$$ and $$x = -2$$.

Visible text: Therefore, the roots of the equation are and .

## Practice Problems

Solve the following quadratic equations using the completing the square method:

1. $$x^2 + 5x + 6 = 0$$
2. $$2x^2 + 6x + 3 = 0$$
3. $$6x^2 + 2x + \frac{1}{6} = 0$$
4. $$x^2 - 12x - 15 = 0$$
5. $$\frac{3}{2}x^2 - 8x - 6 = 0$$

Visible text: 1. 
2. 
3. 
4. 
5.

### Answer Key

1. $$x^2 + 5x + 6 = 0$$

   1. Move the constant to the right side:

      
      
      ```math
      x^2 + 5x = -6
      ```

   2. Add the square of half the coefficient of $$x$$ to both sides:

      <MathContainer>
        
      
      ```math
      \text{Half the coefficient of } x = \frac{5}{2}
      ```

        
      
      ```math
      \text{The square of this value} = \left(\frac{5}{2}\right)^2 = \frac{25}{4}
      ```

        
      
      ```math
      x^2 + 5x + \frac{25}{4} = -6 + \frac{25}{4}
      ```

      </MathContainer>

   3. Factor the left side into a perfect square:

      
      
      ```math
      \left(x + \frac{5}{2}\right)^2 = -6 + \frac{25}{4}
      ```

   4. Simplify the right side:

      <MathContainer>
        
      
      ```math
      -6 + \frac{25}{4} = \frac{-24 + 25}{4} = \frac{1}{4}
      ```

        
      
      ```math
      \left(x + \frac{5}{2}\right)^2 = \frac{1}{4}
      ```

      </MathContainer>

   5. Take the square root of both sides:

      
      
      ```math
      x + \frac{5}{2} = \pm\frac{1}{2}
      ```

   6. Solve for the value of $$x$$:

      <MathContainer>
        
      
      ```math
      x + \frac{5}{2} = \frac{1}{2} \quad \text{or} \quad x + \frac{5}{2} = -\frac{1}{2}
      ```

        
      
      ```math
      x = \frac{1}{2} - \frac{5}{2} = -2 \quad \text{or} \quad x = -\frac{1}{2} - \frac{5}{2} = -3
      ```

      </MathContainer>

   Therefore, the roots of the equation are $$x = -2$$ and $$x = -3$$.

2. $$2x^2 + 6x + 3 = 0$$

   1. Divide all terms by the coefficient $$a = 2$$:

      
      
      ```math
      x^2 + 3x + \frac{3}{2} = 0
      ```

   2. Move the constant to the right side:

      
      
      ```math
      x^2 + 3x = -\frac{3}{2}
      ```

   3. Add the square of half the coefficient of $$x$$ to both sides:

      <MathContainer>
        
      
      ```math
      \text{Half the coefficient of } x = \frac{3}{2}
      ```

        
      
      ```math
      \text{The square of this value} = \left(\frac{3}{2}\right)^2 = \frac{9}{4}
      ```

        
      
      ```math
      x^2 + 3x + \frac{9}{4} = -\frac{3}{2} + \frac{9}{4}
      ```

      </MathContainer>

   4. Factor the left side into a perfect square:

      
      
      ```math
      \left(x + \frac{3}{2}\right)^2 = -\frac{3}{2} + \frac{9}{4}
      ```

   5. Simplify the right side:

      <MathContainer>
        
      
      ```math
      -\frac{3}{2} + \frac{9}{4} = \frac{-6 + 9}{4} = \frac{3}{4}
      ```

        
      
      ```math
      \left(x + \frac{3}{2}\right)^2 = \frac{3}{4}
      ```

      </MathContainer>

   6. Take the square root of both sides:

      
      
      ```math
      x + \frac{3}{2} = \pm\frac{\sqrt{3}}{2}
      ```

   7. Solve for the value of $$x$$:

      <MathContainer>
        
      
      ```math
      x = -\frac{3}{2} + \frac{\sqrt{3}}{2} \quad \text{or} \quad x = -\frac{3}{2} - \frac{\sqrt{3}}{2}
      ```

      </MathContainer>

   Therefore, the roots of the equation are $$x = -\frac{3}{2} + \frac{\sqrt{3}}{2}$$ and $$x = -\frac{3}{2} - \frac{\sqrt{3}}{2}$$.

3. $$6x^2 + 2x + \frac{1}{6} = 0$$

   1. Divide all terms by the coefficient $$a = 6$$:

      
      
      ```math
      x^2 + \frac{1}{3}x + \frac{1}{36} = 0
      ```

   2. Move the constant to the right side:

      
      
      ```math
      x^2 + \frac{1}{3}x = -\frac{1}{36}
      ```

   3. Add the square of half the coefficient of $$x$$ to both sides:

      <MathContainer>
        
      
      ```math
      \text{Half the coefficient of } x = \frac{1}{6}
      ```

        
      
      ```math
      \text{The square of this value} = \left(\frac{1}{6}\right)^2 = \frac{1}{36}
      ```

        
      
      ```math
      x^2 + \frac{1}{3}x + \frac{1}{36} = -\frac{1}{36} + \frac{1}{36}
      ```

      </MathContainer>

   4. Factor the left side into a perfect square:

      
      
      ```math
      \left(x + \frac{1}{6}\right)^2 = -\frac{1}{36} + \frac{1}{36}
      ```

   5. Simplify the right side:

      
      
      ```math
      \left(x + \frac{1}{6}\right)^2 = 0
      ```

   6. Take the square root of both sides:

      
      
      ```math
      x + \frac{1}{6} = 0
      ```

   7. Solve for the value of $$x$$:

      
      
      ```math
      x = -\frac{1}{6}
      ```

   Therefore, this equation has one (double) root, which is $$x = -\frac{1}{6}$$.

4. $$x^2 - 12x - 15 = 0$$

   1. Move the constant to the right side:

      
      
      ```math
      x^2 - 12x = 15
      ```

   2. Add the square of half the coefficient of $$x$$ to both sides:

      <MathContainer>
        
      
      ```math
      \text{Half the coefficient of } x = -6
      ```

        
      
      ```math
      \text{The square of this value} = (-6)^2 = 36
      ```

        
      
      ```math
      x^2 - 12x + 36 = 15 + 36
      ```

      </MathContainer>

   3. Factor the left side into a perfect square:

      
      
      ```math
      (x - 6)^2 = 51
      ```

   4. Take the square root of both sides:

      
      
      ```math
      x - 6 = \pm\sqrt{51}
      ```

   5. Solve for the value of $$x$$:

      
      
      ```math
      x = 6 \pm \sqrt{51}
      ```

   Therefore, the roots of the equation are $$x = 6 + \sqrt{51}$$ and $$x = 6 - \sqrt{51}$$.

5. $$\frac{3}{2}x^2 - 8x - 6 = 0$$

   1. Divide all terms by the coefficient $$a = \frac{3}{2}$$:

      <MathContainer>
        
      
      ```math
      x^2 - \frac{16}{3}x - 4 = 0
      ```

      </MathContainer>

   2. Move the constant to the right side:

      
      
      ```math
      x^2 - \frac{16}{3}x = 4
      ```

   3. Add the square of half the coefficient of $$x$$ to both sides:

      <MathContainer>
        
      
      ```math
      \text{Half the coefficient of } x = -\frac{8}{3}
      ```

        
      
      ```math
      \text{The square of this value} = \left(-\frac{8}{3}\right)^2 = \frac{64}{9}
      ```

        
      
      ```math
      x^2 - \frac{16}{3}x + \frac{64}{9} = 4 + \frac{64}{9}
      ```

      </MathContainer>

   4. Factor the left side into a perfect square:

      
      
      ```math
      \left(x - \frac{8}{3}\right)^2 = 4 + \frac{64}{9}
      ```

   5. Simplify the right side:

      <MathContainer>
        
      
      ```math
      4 + \frac{64}{9} = \frac{36 + 64}{9} = \frac{100}{9}
      ```

        
      
      ```math
      \left(x - \frac{8}{3}\right)^2 = \frac{100}{9}
      ```

      </MathContainer>

   6. Take the square root of both sides:

      
      
      ```math
      x - \frac{8}{3} = \pm\frac{10}{3}
      ```

   7. Solve for the value of $$x$$:

      <MathContainer>
        
      
      ```math
      x = \frac{8}{3} + \frac{10}{3} = \frac{18}{3} = 6 \quad \text{or} \quad x = \frac{8}{3} - \frac{10}{3} = -\frac{2}{3}
      ```

      </MathContainer>

   Therefore, the roots of the equation are $$x = 6$$ and $$x = -\frac{2}{3}$$.

Visible text: 1. 

 1. Move the constant to the right side:

 
 

 2. Add the square of half the coefficient of to both sides:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 3. Factor the left side into a perfect square:

 
 

 4. Simplify the right side:

 <MathContainer>
 
 

 
 

 </MathContainer>

 5. Take the square root of both sides:

 
 

 6. Solve for the value of :

 <MathContainer>
 
 

 
 

 </MathContainer>

 Therefore, the roots of the equation are and .

2. 

 1. Divide all terms by the coefficient :

 
 

 2. Move the constant to the right side:

 
 

 3. Add the square of half the coefficient of to both sides:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 4. Factor the left side into a perfect square:

 
 

 5. Simplify the right side:

 <MathContainer>
 
 

 
 

 </MathContainer>

 6. Take the square root of both sides:

 
 

 7. Solve for the value of :

 <MathContainer>
 
 

 </MathContainer>

 Therefore, the roots of the equation are and .

3. 

 1. Divide all terms by the coefficient :

 
 

 2. Move the constant to the right side:

 
 

 3. Add the square of half the coefficient of to both sides:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 4. Factor the left side into a perfect square:

 
 

 5. Simplify the right side:

 
 

 6. Take the square root of both sides:

 
 

 7. Solve for the value of :

 
 

 Therefore, this equation has one (double) root, which is .

4. 

 1. Move the constant to the right side:

 
 

 2. Add the square of half the coefficient of to both sides:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 3. Factor the left side into a perfect square:

 
 

 4. Take the square root of both sides:

 
 

 5. Solve for the value of :

 
 

 Therefore, the roots of the equation are and .

5. 

 1. Divide all terms by the coefficient :

 <MathContainer>
 
 

 </MathContainer>

 2. Move the constant to the right side:

 
 

 3. Add the square of half the coefficient of to both sides:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 4. Factor the left side into a perfect square:

 
 

 5. Simplify the right side:

 <MathContainer>
 
 

 
 

 </MathContainer>

 6. Take the square root of both sides:

 
 

 7. Solve for the value of :

 <MathContainer>
 
 

 </MathContainer>

 Therefore, the roots of the equation are and .