# Nakafa Framework: LLM

URL: /en/subject/high-school/10/mathematics/quadratic-function/quadratic-equation-formula
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/10/mathematics/quadratic-function/quadratic-equation-formula/en.mdx

Output docs content for large language models.

---

export const metadata = {
  title: "Quadratic Formula",
  description: "Master the quadratic formula to solve any ax²+bx+c=0 equation. Learn step-by-step derivation, understand the discriminant, and apply to real-world problems.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "04/19/2025",
  subject: "Quadratic Functions",
};

## What is the Quadratic Formula?

A quadratic equation is an equation in the form <InlineMath math="ax^2 + bx + c = 0" /> where <InlineMath math="a \neq 0" />, where:

- <InlineMath math="a" /> is the coefficient of <InlineMath math="x^2" />
- <InlineMath math="b" /> is the coefficient of <InlineMath math="x" />
- <InlineMath math="c" /> is the constant term

To solve a quadratic equation <InlineMath math="ax^2 + bx + c = 0" />, we can use the formula:

<BlockMath math="x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}" />

This formula will give us two values of <InlineMath math="x" /> which are the roots of the quadratic equation:

- <InlineMath math="x_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a}" /> (using the plus sign)
- <InlineMath math="x_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a}" /> (using the minus sign)

The part <InlineMath math="b^2 - 4ac" /> is called the discriminant and determines the nature of the roots:

- If <InlineMath math="b^2 - 4ac > 0" />: Two distinct real roots
- If <InlineMath math="b^2 - 4ac = 0" />: One real root (a repeated root)
- If <InlineMath math="b^2 - 4ac < 0" />: 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:

<BlockMath math="ax^2 + bx + c = 0" />

**Step 1**: Divide all terms by <InlineMath math="a" /> (the coefficient of <InlineMath math="x^2" />):

<BlockMath math="x^2 + \frac{b}{a}x + \frac{c}{a} = 0" />

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

<BlockMath math="x^2 + \frac{b}{a}x = -\frac{c}{a}" />

**Step 3**: Add the square of half the coefficient of <InlineMath math="x" /> to both sides:

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

<BlockMath math="\left(x + \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{c}{a}" />

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

<BlockMath math="\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}" />

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

<BlockMath math="x + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}" />

**Step 7**: Solve for <InlineMath math="x" />:

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

<BlockMath 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 <InlineMath math="ax^2 + bx + c = 0" />
2. Identify the values of <InlineMath math="a" />, <InlineMath math="b" />, and <InlineMath math="c" />
3. Substitute these values into the formula <InlineMath math="x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}" />
4. Calculate the values of <InlineMath math="x" /> to find the roots of the equation

### Examples

**Example 1:** Solve the equation <InlineMath math="x^2 + 5x + 6 = 0" />

Identify the values: <InlineMath math="a = 1" />, <InlineMath math="b = 5" />, and <InlineMath math="c = 6" />

Substitute into the formula:

<BlockMath 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 <InlineMath math="x_1" />, take the positive sign:

<BlockMath math="x_1 = \frac{-5 + 1}{2} = \frac{-4}{2} = -2" />

For <InlineMath math="x_2" />, take the negative sign:

<BlockMath math="x_2 = \frac{-5 - 1}{2} = \frac{-6}{2} = -3" />

Therefore, the roots of the equation are <InlineMath math="x_1 = -2" /> and <InlineMath math="x_2 = -3" />

**Example 2:** Solve the equation <InlineMath math="2x^2 - 7x + 3 = 0" />

Identify the values: <InlineMath math="a = 2" />, <InlineMath math="b = -7" />, and <InlineMath math="c = 3" />

Substitute into the formula:

<BlockMath 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 <InlineMath math="x_1" />, take the positive sign:

<BlockMath math="x_1 = \frac{7 + 5}{4} = \frac{12}{4} = 3" />

For <InlineMath math="x_2" />, take the negative sign:

<BlockMath math="x_2 = \frac{7 - 5}{4} = \frac{2}{4} = \frac{1}{2}" />

Therefore, the roots of the equation are <InlineMath math="x_1 = 3" /> and <InlineMath math="x_2 = \frac{1}{2}" />

## The Discriminant of a Quadratic Equation

The expression <InlineMath math="b^2 - 4ac" /> in the quadratic formula is called the discriminant, often denoted by <InlineMath math="D" /> or <InlineMath math="\Delta" />.

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

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

## Relationship Between Roots and Coefficients

If <InlineMath math="x_1" /> and <InlineMath math="x_2" /> are the roots of the quadratic equation <InlineMath math="ax^2 + bx + c = 0" />, then:

1. Sum of the roots: <InlineMath math="x_1 + x_2 = -\frac{b}{a}" />
2. Product of the roots: <InlineMath math="x_1 \cdot x_2 = \frac{c}{a}" />

### Proving the Relationships

From the quadratic formula, we know that:

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

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

<BlockMath 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 <InlineMath math="p" /> and <InlineMath math="q" /> are the roots of a quadratic equation, then the equation is:

<BlockMath math="(x - p)(x - q) = 0" />

Or in standard form:

<BlockMath math="x^2 - (p+q)x + pq = 0" />

### Application Examples

1. The quadratic equation <InlineMath math="x^2 + 4x + 3 = 0" /> has roots <InlineMath math="p" /> and <InlineMath math="q" />.

   Find the quadratic equation with roots <InlineMath math="2p" /> and <InlineMath math="2q" />.

   **Step 1**: Find the values of <InlineMath math="p + q" /> and <InlineMath math="p \cdot q" />

   <div className="flex flex-col gap-4">
     <BlockMath math="p + q = -\frac{b}{a} = -\frac{4}{1} = -4" />
     <BlockMath math="p \cdot q = \frac{c}{a} = \frac{3}{1} = 3" />
   </div>

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

   <div className="flex flex-col gap-4">
     <BlockMath math="2p + 2q = 2(p + q) = 2(-4) = -8" />
     <BlockMath math="2p \cdot 2q = 4(p \cdot q) = 4 \cdot 3 = 12" />
   </div>

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

   <div className="flex flex-col gap-4">
     <BlockMath math="x^2 - (-8)x + 12 = 0" />
     <BlockMath math="x^2 + 8x + 12 = 0" />
   </div>

2. The quadratic equation <InlineMath math="x^2 + 4x - 21 = 0" /> has roots <InlineMath math="p" /> and <InlineMath math="q" />.

   Find the quadratic equation with roots <InlineMath math="\frac{1}{2p}" /> and <InlineMath math="\frac{1}{2q}" />.

   **Step 1**: Find the values of <InlineMath math="p + q" /> and <InlineMath math="p \cdot q" />

   <div className="flex flex-col gap-4">
     <BlockMath math="p + q = -\frac{b}{a} = -\frac{4}{1} = -4" />
     <BlockMath math="p \cdot q = \frac{c}{a} = \frac{-21}{1} = -21" />
   </div>

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

   <div className="flex flex-col gap-4">
     <BlockMath 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}" />
     <BlockMath math="\frac{1}{2p} \cdot \frac{1}{2q} = \frac{1}{4pq} = \frac{1}{4 \cdot (-21)} = \frac{1}{-84} = -\frac{1}{84}" />
   </div>

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

   <BlockMath math="x^2 - \frac{4}{21}x - \frac{1}{84} = 0" />

## Practice Problems

Solve the following quadratic equations using the quadratic formula:

1. <InlineMath math="x^2 + 5x + 6 = 0" />
2. <InlineMath math="2x^2 + 6x + 3 = 0" />
3. <InlineMath math="6x^2 + 2x + \frac{1}{6} = 0" />
4. <InlineMath math="\frac{1}{2}x^2 + 4x + 6 = 0" />
5. <InlineMath math="\frac{2}{3}x^2 + 2x - 12 = 0" />

### Answer Key

1. Solution to the quadratic equation <InlineMath math="x^2 + 5x + 6 = 0" />

   Identify: <InlineMath math="a = 1" />, <InlineMath math="b = 5" />, <InlineMath math="c = 6" />

   <div className="flex flex-col gap-4">
     <BlockMath math="x_{1,2} = \frac{-5 \pm \sqrt{5^2 - 4 \cdot 1 \cdot 6}}{2 \cdot 1}" />
     <BlockMath math="= \frac{-5 \pm \sqrt{25 - 24}}{2}" />
     <BlockMath math="= \frac{-5 \pm \sqrt{1}}{2}" />
     <BlockMath math="= \frac{-5 \pm 1}{2}" />
   </div>

   For <InlineMath math="x_1" />:

   <BlockMath math="x_1 = \frac{-5 + 1}{2} = \frac{-4}{2} = -2" />

   For <InlineMath math="x_2" />:

   <BlockMath math="x_2 = \frac{-5 - 1}{2} = \frac{-6}{2} = -3" />

   Therefore, the roots of the equation are <InlineMath math="x_1 = -2" /> and <InlineMath math="x_2 = -3" />.

2. Solution to the quadratic equation <InlineMath math="2x^2 + 6x + 3 = 0" />

   Identify: <InlineMath math="a = 2" />, <InlineMath math="b = 6" />, <InlineMath math="c = 3" />

   <div className="flex flex-col gap-4">
     <BlockMath math="x_{1,2} = \frac{-6 \pm \sqrt{6^2 - 4 \cdot 2 \cdot 3}}{2 \cdot 2}" />
     <BlockMath math="= \frac{-6 \pm \sqrt{36 - 24}}{4}" />
     <BlockMath math="= \frac{-6 \pm \sqrt{12}}{4}" />
     <BlockMath math="= \frac{-6 \pm 2\sqrt{3}}{4}" />
     <BlockMath math="= \frac{-3 \pm \sqrt{3}}{2}" />
   </div>

   For <InlineMath math="x_1" />:

   <BlockMath math="x_1 = \frac{-3 + \sqrt{3}}{2}" />

   For <InlineMath math="x_2" />:

   <BlockMath math="x_2 = \frac{-3 - \sqrt{3}}{2}" />

   Therefore, the roots of the equation are <InlineMath math="x_1 = \frac{-3 + \sqrt{3}}{2}" /> and <InlineMath math="x_2 = \frac{-3 - \sqrt{3}}{2}" />.

3. Solution to the quadratic equation <InlineMath math="6x^2 + 2x + \frac{1}{6} = 0" />

   Identify: <InlineMath math="a = 6" />, <InlineMath math="b = 2" />, <InlineMath math="c = \frac{1}{6}" />

   <div className="flex flex-col gap-4">
     <BlockMath math="x_{1,2} = \frac{-2 \pm \sqrt{2^2 - 4 \cdot 6 \cdot \frac{1}{6}}}{2 \cdot 6}" />
     <BlockMath math="= \frac{-2 \pm \sqrt{4 - 4}}{12}" />
     <BlockMath math="= \frac{-2 \pm 0}{12}" />
     <BlockMath math="= \frac{-2}{12} = -\frac{1}{6}" />
   </div>

   Since the discriminant <InlineMath math="b^2 - 4ac = 0" />, the equation has one root (a repeated root).

   Therefore, the root of the equation is <InlineMath math="x_1 = x_2 = -\frac{1}{6}" />.

4. Solution to the quadratic equation <InlineMath math="\frac{1}{2}x^2 + 4x + 6 = 0" />

   Identify: <InlineMath math="a = \frac{1}{2}" />, <InlineMath math="b = 4" />, <InlineMath math="c = 6" />

   <div className="flex flex-col gap-4">
     <BlockMath math="x_{1,2} = \frac{-4 \pm \sqrt{4^2 - 4 \cdot \frac{1}{2} \cdot 6}}{2 \cdot \frac{1}{2}}" />
     <BlockMath math="= \frac{-4 \pm \sqrt{16 - 12}}{1}" />
     <BlockMath math="= \frac{-4 \pm \sqrt{4}}{1}" />
     <BlockMath math="= -4 \pm 2" />
   </div>

   For <InlineMath math="x_1" />:

   <BlockMath math="x_1 = -4 + 2 = -2" />

   For <InlineMath math="x_2" />:

   <BlockMath math="x_2 = -4 - 2 = -6" />

   Therefore, the roots of the equation are <InlineMath math="x_1 = -2" /> and <InlineMath math="x_2 = -6" />.

5. Solution to the quadratic equation <InlineMath math="\frac{2}{3}x^2 + 2x - 12 = 0" />

   Identify: <InlineMath math="a = \frac{2}{3}" />, <InlineMath math="b = 2" />, <InlineMath math="c = -12" />

   <div className="flex flex-col gap-4">
     <BlockMath math="x_{1,2} = \frac{-2 \pm \sqrt{2^2 - 4 \cdot \frac{2}{3} \cdot (-12)}}{2 \cdot \frac{2}{3}}" />
     <BlockMath math="= \frac{-2 \pm \sqrt{4 + 32}}{4/3}" />
     <BlockMath math="= \frac{-2 \pm \sqrt{36}}{4/3}" />
     <BlockMath math="= \frac{-2 \pm 6}{4/3}" />
     <BlockMath math="= \frac{3(-2 \pm 6)}{4}" />
   </div>

   For <InlineMath math="x_1" />:

   <BlockMath math="x_1 = \frac{3(-2 + 6)}{4} = \frac{3 \cdot 4}{4} = 3" />

   For <InlineMath math="x_2" />:

   <BlockMath math="x_2 = \frac{3(-2 - 6)}{4} = \frac{3 \cdot (-8)}{4} = -6" />

   Therefore, the roots of the equation are <InlineMath math="x_1 = 3" /> and <InlineMath math="x_2 = -6" />.
