# 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-formula
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/quadratic-function/quadratic-equation-formula/en.mdx

Learn the quadratic formula to solve any ax²+bx+c=0 equation. Learn formula derivation, understand the discriminant, and apply to real-world problems.

---

## What is the Quadratic Formula?

A quadratic equation is an equation in the form $$ax^2 + bx + c = 0$$ where $$a \neq 0$$, where:

Visible text: A quadratic equation is an equation in the form where , where:

- $$a$$ is the coefficient of $$x^2$$
- $$b$$ is the coefficient of $$x$$
- $$c$$ is the constant term

Visible text: - is the coefficient of 
- is the coefficient of 
- is the constant term

To solve a quadratic equation $$ax^2 + bx + c = 0$$, we can use the formula:

Visible text: To solve a quadratic equation , we can use the formula:

```math
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
```

This formula will give us two values of $$x$$ which are the roots of the quadratic equation:

Visible text: This formula will give us two values of which are the roots of the quadratic equation:

- $$x_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a}$$ (using the plus sign)
- $$x_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a}$$ (using the minus sign)

Visible text: - (using the plus sign)
- (using the minus sign)

The part $$b^2 - 4ac$$ is called the discriminant and determines the nature of the roots:

Visible text: The part is called the discriminant and determines the nature of the roots:

- If $$b^2 - 4ac > 0$$: Two distinct real roots
- If $$b^2 - 4ac = 0$$: One real root (a repeated root)
- If $$b^2 - 4ac < 0$$: No real roots

Visible text: - If : Two distinct real roots
- If : One real root (a repeated root)
- If : No real roots

## Deriving the Quadratic Formula

The quadratic formula can be derived from the method of completing the square. Let's see how:

Starting with the standard form of a quadratic equation:

```math
ax^2 + bx + c = 0
```

**Step** $$1$$: Divide all terms by $$a$$ (the coefficient of $$x^2$$):

Visible text: **Step** : Divide all terms by (the coefficient of ):

```math
x^2 + \frac{b}{a}x + \frac{c}{a} = 0
```

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

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

```math
x^2 + \frac{b}{a}x = -\frac{c}{a}
```

**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:

```math
x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} = -\frac{c}{a} + \frac{b^2}{4a^2}
```

**Step** $$4$$: The left side now forms a perfect square:

Visible text: **Step** : The left side now forms a perfect square:

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

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

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

```math
\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}
```

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

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

```math
x + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}
```

**Step** $$7$$: Solve for $$x$$:

Visible text: **Step** : Solve for :

```math
x = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
```

Thus, we obtain the quadratic formula:

```math
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
```

### Using the Quadratic Formula

To solve a quadratic equation using the formula, follow these steps:

1. Make sure the quadratic equation is in standard form $$ax^2 + bx + c = 0$$
2. Identify the values of $$a$$, $$b$$, and $$c$$
3. Substitute these values into the formula $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
4. Calculate the values of $$x$$ to find the roots of the equation

Visible text: 1. Make sure the quadratic equation is in standard form 
2. Identify the values of , , and 
3. Substitute these values into the formula 
4. Calculate the values of to find the roots of the equation

### Examples

**Example** $$1$$: Solve the equation $$x^2 + 5x + 6 = 0$$

Visible text: **Example** : Solve the equation

Identify the values: $$a = 1$$, $$b = 5$$, and $$c = 6$$

Visible text: Identify the values: , , and

Substitute into the formula:

```math
x = \frac{-5 \pm \sqrt{5^2 - 4 \cdot 1 \cdot 6}}{2 \cdot 1} = \frac{-5 \pm \sqrt{25 - 24}}{2} = \frac{-5 \pm \sqrt{1}}{2} = \frac{-5 \pm 1}{2}
```

For $$x_1$$, take the positive sign:

Visible text: For , take the positive sign:

```math
x_1 = \frac{-5 + 1}{2} = \frac{-4}{2} = -2
```

For $$x_2$$, take the negative sign:

Visible text: For , take the negative sign:

```math
x_2 = \frac{-5 - 1}{2} = \frac{-6}{2} = -3
```

Therefore, the roots of the equation are $$x_1 = -2$$ and $$x_2 = -3$$

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

**Example** $$2$$: Solve the equation $$2x^2 - 7x + 3 = 0$$

Visible text: **Example** : Solve the equation

Identify the values: $$a = 2$$, $$b = -7$$, and $$c = 3$$

Visible text: Identify the values: , , and

Substitute into the formula:

```math
x = \frac{-(-7) \pm \sqrt{(-7)^2 - 4 \cdot 2 \cdot 3}}{2 \cdot 2} = \frac{7 \pm \sqrt{49 - 24}}{4} = \frac{7 \pm \sqrt{25}}{4} = \frac{7 \pm 5}{4}
```

For $$x_1$$, take the positive sign:

Visible text: For , take the positive sign:

```math
x_1 = \frac{7 + 5}{4} = \frac{12}{4} = 3
```

For $$x_2$$, take the negative sign:

Visible text: For , take the negative sign:

```math
x_2 = \frac{7 - 5}{4} = \frac{2}{4} = \frac{1}{2}
```

Therefore, the roots of the equation are $$x_1 = 3$$ and $$x_2 = \frac{1}{2}$$

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

## The Discriminant of a Quadratic Equation

The expression $$b^2 - 4ac$$ in the quadratic formula is called the discriminant, often denoted by $$D$$ or $$\Delta$$.

Visible text: The expression in the quadratic formula is called the discriminant, often denoted by or .

The discriminant provides information about the nature of the roots of a quadratic equation:

- If $$D > 0$$: The equation has two distinct real roots
- If $$D = 0$$: The equation has one real root (a repeated root)
- If $$D < 0$$: The equation has no real roots (the roots are complex numbers)

Visible text: - If : The equation has two distinct real roots
- If : The equation has one real root (a repeated root)
- If : The equation has no real roots (the roots are complex numbers)

## Relationship Between Roots and Coefficients

If $$x_1$$ and $$x_2$$ are the roots of the quadratic equation $$ax^2 + bx + c = 0$$, then:

Visible text: If and are the roots of the quadratic equation , then:

1. Sum of the roots: $$x_1 + x_2 = -\frac{b}{a}$$
2. Product of the roots: $$x_1 \cdot x_2 = \frac{c}{a}$$

Visible text: 1. Sum of the roots: 
2. Product of the roots:

### Proving the Relationships

From the quadratic formula, we know that:

```math
x_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a} \quad \text{and} \quad x_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a}
```

Adding the roots:

```math
x_1 + x_2 = \frac{-b + \sqrt{b^2 - 4ac}}{2a} + \frac{-b - \sqrt{b^2 - 4ac}}{2a} = \frac{-2b}{2a} = -\frac{b}{a}
```

Multiplying the roots:

```math
x_1 \cdot x_2 = \frac{-b + \sqrt{b^2 - 4ac}}{2a} \cdot \frac{-b - \sqrt{b^2 - 4ac}}{2a} = \frac{b^2 - (\sqrt{b^2 - 4ac})^2}{4a^2} = \frac{b^2 - (b^2 - 4ac)}{4a^2} = \frac{4ac}{4a^2} = \frac{c}{a}
```

## Creating New Quadratic Equations from Known Roots

If we know the roots of a quadratic equation, we can create a new quadratic equation. Suppose $$p$$ and $$q$$ are the roots of a quadratic equation, then the equation is:

Visible text: If we know the roots of a quadratic equation, we can create a new quadratic equation. Suppose and are the roots of a quadratic equation, then the equation is:

```math
(x - p)(x - q) = 0
```

Or in standard form:

```math
x^2 - (p+q)x + pq = 0
```

### Application Examples

1. The quadratic equation $$x^2 + 4x + 3 = 0$$ has roots $$p$$ and $$q$$.

   Find the quadratic equation with roots $$2p$$ and $$2q$$.

   **Step** $$1$$: Find the values of $$p + q$$ and $$p \cdot q$$

   <MathContainer>
     
   
   ```math
   p + q = -\frac{b}{a} = -\frac{4}{1} = -4
   ```

     
   
   ```math
   p \cdot q = \frac{c}{a} = \frac{3}{1} = 3
   ```

   </MathContainer>

   **Step** $$2$$: Calculate the sum and product of the new roots

   <MathContainer>
     
   
   ```math
   2p + 2q = 2(p + q) = 2(-4) = -8
   ```

     
   
   ```math
   2p \cdot 2q = 4(p \cdot q) = 4 \cdot 3 = 12
   ```

   </MathContainer>

   **Step** $$3$$: Create the new quadratic equation

   <MathContainer>
     
   
   ```math
   x^2 - (-8)x + 12 = 0
   ```

     
   
   ```math
   x^2 + 8x + 12 = 0
   ```

   </MathContainer>

2. The quadratic equation $$x^2 + 4x - 21 = 0$$ has roots $$p$$ and $$q$$.

   Find the quadratic equation with roots $$\frac{1}{2p}$$ and $$\frac{1}{2q}$$.

   **Step** $$1$$: Find the values of $$p + q$$ and $$p \cdot q$$

   <MathContainer>
     
   
   ```math
   p + q = -\frac{b}{a} = -\frac{4}{1} = -4
   ```

     
   
   ```math
   p \cdot q = \frac{c}{a} = \frac{-21}{1} = -21
   ```

   </MathContainer>

   **Step** $$2$$: Calculate the sum and product of the new roots

   <MathContainer>
     
   
   ```math
   \frac{1}{2p} + \frac{1}{2q} = \frac{1}{2} \left(\frac{q + p}{pq}\right) = \frac{1}{2} \cdot \frac{-4}{-21} = \frac{1}{2} \cdot \frac{4}{21} = \frac{4}{42} = \frac{2}{21}
   ```

     
   
   ```math
   \frac{1}{2p} \cdot \frac{1}{2q} = \frac{1}{4pq} = \frac{1}{4 \cdot (-21)} = \frac{1}{-84} = -\frac{1}{84}
   ```

   </MathContainer>

   **Step** $$3$$: Create the new quadratic equation

   
   
   ```math
   x^2 - \frac{4}{21}x - \frac{1}{84} = 0
   ```

Visible text: 1. The quadratic equation has roots and .

 Find the quadratic equation with roots and .

 **Step** : Find the values of and 

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Calculate the sum and product of the new roots

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Create the new quadratic equation

 <MathContainer>
 
 

 
 

 </MathContainer>

2. The quadratic equation has roots and .

 Find the quadratic equation with roots and .

 **Step** : Find the values of and 

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Calculate the sum and product of the new roots

 <MathContainer>
 
 

 
 

 </MathContainer>

 **Step** : Create the new quadratic equation

## Practice Problems

Solve the following quadratic equations using the quadratic formula:

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

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

### Answer Key

1. Solution to the quadratic equation $$x^2 + 5x + 6 = 0$$

   Identify: $$a = 1$$, $$b = 5$$, $$c = 6$$

   <MathContainer>
     
   
   ```math
   x_{1,2} = \frac{-5 \pm \sqrt{5^2 - 4 \cdot 1 \cdot 6}}{2 \cdot 1}
   ```

     
   
   ```math
   = \frac{-5 \pm \sqrt{25 - 24}}{2}
   ```

     
   
   ```math
   = \frac{-5 \pm \sqrt{1}}{2}
   ```

     
   
   ```math
   = \frac{-5 \pm 1}{2}
   ```

   </MathContainer>

   For $$x_1$$:

   
   
   ```math
   x_1 = \frac{-5 + 1}{2} = \frac{-4}{2} = -2
   ```

   For $$x_2$$:

   
   
   ```math
   x_2 = \frac{-5 - 1}{2} = \frac{-6}{2} = -3
   ```

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

2. Solution to the quadratic equation $$2x^2 + 6x + 3 = 0$$

   Identify: $$a = 2$$, $$b = 6$$, $$c = 3$$

   <MathContainer>
     
   
   ```math
   x_{1,2} = \frac{-6 \pm \sqrt{6^2 - 4 \cdot 2 \cdot 3}}{2 \cdot 2}
   ```

     
   
   ```math
   = \frac{-6 \pm \sqrt{36 - 24}}{4}
   ```

     
   
   ```math
   = \frac{-6 \pm \sqrt{12}}{4}
   ```

     
   
   ```math
   = \frac{-6 \pm 2\sqrt{3}}{4}
   ```

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

   </MathContainer>

   For $$x_1$$:

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

   For $$x_2$$:

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

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

3. Solution to the quadratic equation $$6x^2 + 2x + \frac{1}{6} = 0$$

   Identify: $$a = 6$$, $$b = 2$$, $$c = \frac{1}{6}$$

   <MathContainer>
     
   
   ```math
   x_{1,2} = \frac{-2 \pm \sqrt{2^2 - 4 \cdot 6 \cdot \frac{1}{6}}}{2 \cdot 6}
   ```

     
   
   ```math
   = \frac{-2 \pm \sqrt{4 - 4}}{12}
   ```

     
   
   ```math
   = \frac{-2 \pm 0}{12}
   ```

     
   
   ```math
   = \frac{-2}{12} = -\frac{1}{6}
   ```

   </MathContainer>

   Since the discriminant $$b^2 - 4ac = 0$$, the equation has one root (a repeated root).

   Therefore, the root of the equation is $$x_1 = x_2 = -\frac{1}{6}$$.

4. Solution to the quadratic equation $$\frac{1}{2}x^2 + 4x + 6 = 0$$

   Identify: $$a = \frac{1}{2}$$, $$b = 4$$, $$c = 6$$

   <MathContainer>
     
   
   ```math
   x_{1,2} = \frac{-4 \pm \sqrt{4^2 - 4 \cdot \frac{1}{2} \cdot 6}}{2 \cdot \frac{1}{2}}
   ```

     
   
   ```math
   = \frac{-4 \pm \sqrt{16 - 12}}{1}
   ```

     
   
   ```math
   = \frac{-4 \pm \sqrt{4}}{1}
   ```

     
   
   ```math
   = -4 \pm 2
   ```

   </MathContainer>

   For $$x_1$$:

   
   
   ```math
   x_1 = -4 + 2 = -2
   ```

   For $$x_2$$:

   
   
   ```math
   x_2 = -4 - 2 = -6
   ```

   Therefore, the roots of the equation are $$x_1 = -2$$ and $$x_2 = -6$$.

5. Solution to the quadratic equation $$\frac{2}{3}x^2 + 2x - 12 = 0$$

   Identify: $$a = \frac{2}{3}$$, $$b = 2$$, $$c = -12$$

   <MathContainer>
     
   
   ```math
   x_{1,2} = \frac{-2 \pm \sqrt{2^2 - 4 \cdot \frac{2}{3} \cdot (-12)}}{2 \cdot \frac{2}{3}}
   ```

     
   
   ```math
   = \frac{-2 \pm \sqrt{4 + 32}}{4/3}
   ```

     
   
   ```math
   = \frac{-2 \pm \sqrt{36}}{4/3}
   ```

     
   
   ```math
   = \frac{-2 \pm 6}{4/3}
   ```

     
   
   ```math
   = \frac{3(-2 \pm 6)}{4}
   ```

   </MathContainer>

   For $$x_1$$:

   
   
   ```math
   x_1 = \frac{3(-2 + 6)}{4} = \frac{3 \cdot 4}{4} = 3
   ```

   For $$x_2$$:

   
   
   ```math
   x_2 = \frac{3(-2 - 6)}{4} = \frac{3 \cdot (-8)}{4} = -6
   ```

   Therefore, the roots of the equation are $$x_1 = 3$$ and $$x_2 = -6$$.

Visible text: 1. Solution to the quadratic equation 

 Identify: , , 

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 For :

 
 

 For :

 
 

 Therefore, the roots of the equation are and .

2. Solution to the quadratic equation 

 Identify: , , 

 <MathContainer>
 
 

 
 

 
 

 
 

 
 

 </MathContainer>

 For :

 
 

 For :

 
 

 Therefore, the roots of the equation are and .

3. Solution to the quadratic equation 

 Identify: , , 

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 Since the discriminant , the equation has one root (a repeated root).

 Therefore, the root of the equation is .

4. Solution to the quadratic equation 

 Identify: , , 

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 For :

 
 

 For :

 
 

 Therefore, the roots of the equation are and .

5. Solution to the quadratic equation 

 Identify: , , 

 <MathContainer>
 
 

 
 

 
 

 
 

 
 

 </MathContainer>

 For :

 
 

 For :

 
 

 Therefore, the roots of the equation are and .