Quiz 2

Quadratic Equations and Discriminant

2398 words
12 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Quadratic Equations and Discriminant ## 🎯 Learning Objectives By the end of this topic, you will be able to: 1. **Solve** quadratic equations by factoring, completing the square, and the quadratic formula 2.

Quadratic Equations and Discriminant

🎯 Learning Objectives

By the end of this topic, you will be able to:
  1. Solve quadratic equations by factoring, completing the square, and the quadratic formula
  2. Compute the discriminant and determine the nature of roots
  3. Classify roots as real and distinct, real and equal, or complex
  4. Find the sum and product of roots without solving the equation
  5. Form a quadratic equation given its roots

📋 Prerequisites

  • Quadratic Functions — standard form, vertex, parabola
  • Algebra — factoring, square roots, rationalizing denominators
  • Number systems — real vs. complex numbers

📖 Core Content

4.1 Intuition: Finding the Zeros

A quadratic equation is the equation ax2+bx+c=0ax^2 + bx + c = 0. Its solutions (roots) are the xx-coordinates where the parabola y=ax2+bx+cy = ax^2 + bx + c crosses the xx-axis. These are called the zeros of the quadratic function. Imagine a ball thrown in the air: h(t)=5t2+20t+2h(t) = -5t^2 + 20t + 2. Solving h(t)=0h(t) = 0 tells us when the ball hits the ground. Solving quadratic equations answers "when does something become zero?"
💡 Why this matters: Quadratic equations appear everywhere in science, engineering, and finance: projectile motion, optimization, break-even analysis, compound interest problems, and eigenvalues of 2×22\times 2 matrices.

4.2 Methods of Solving

4.2.1 Method 1: Factoring (When Applicable)

Recipe:
  1. Write in standard form: ax2+bx+c=0ax^2 + bx + c = 0
  2. Factor the left side
  3. Set each factor to zero
  4. Solve for xx Example 1.1 (Easy): Solve x25x+6=0x^2 - 5x + 6 = 0. Step 1: Factor: (x2)(x3)=0(x - 2)(x - 3) = 0 Step 2: x2=0x - 2 = 0 or x3=0x - 3 = 0 Step 3: x=2x = 2 or x=3x = 3
x=2, 3\boxed{x = 2,\ 3}
Example 1.2: Solve 2x2+7x+3=02x^2 + 7x + 3 = 0. Step 1: Factor by grouping: 2x2+7x+3=2x2+6x+x+32x^2 + 7x + 3 = 2x^2 + 6x + x + 3 =2x(x+3)+1(x+3)=(2x+1)(x+3)= 2x(x + 3) + 1(x + 3) = (2x + 1)(x + 3) Step 2: 2x+1=02x + 1 = 0 or x+3=0    x=1/2x + 3 = 0 \implies x = -1/2 or x=3x = -3
x=12, 3\boxed{x = -\frac{1}{2},\ -3}

4.2.2 Method 2: Completing the Square

Recipe:
  1. Move cc to RHS: ax2+bx=cax^2 + bx = -c
  2. Divide by aa: x2+bax=cax^2 + \frac{b}{a}x = -\frac{c}{a}
  3. Add (b2a)2\left(\frac{b}{2a}\right)^2 to both sides
  4. Factor LHS as perfect square
  5. Take square root and solve Example 2.1: Solve x2+6x+2=0x^2 + 6x + 2 = 0 by completing the square. Step 1: x2+6x=2x^2 + 6x = -2 Step 2: Add (6/2)2=9(6/2)^2 = 9: x2+6x+9=2+9x^2 + 6x + 9 = -2 + 9 Step 3: (x+3)2=7(x + 3)^2 = 7 Step 4: x+3=±7    x=3±7x + 3 = \pm\sqrt{7} \implies x = -3 \pm \sqrt{7}
x=3±7\boxed{x = -3 \pm \sqrt{7}}

4.2.3 Method 3: The Quadratic Formula (Universal)

For ax2+bx+c=0ax^2 + bx + c = 0, the quadratic formula:
x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
This formula works for all quadratic equations — real or complex roots. Example 3.1: Solve 2x23x5=02x^2 - 3x - 5 = 0. Step 1: a=2a = 2, b=3b = -3, c=5c = -5 Step 2: x=3±(3)24(2)(5)2(2)=3±9+404=3±494x = \frac{3 \pm \sqrt{(-3)^2 - 4(2)(-5)}}{2(2)} = \frac{3 \pm \sqrt{9 + 40}}{4} = \frac{3 \pm \sqrt{49}}{4} Step 3: x=3+74=104=52x = \frac{3 + 7}{4} = \frac{10}{4} = \frac{5}{2} or x=374=44=1x = \frac{3 - 7}{4} = \frac{-4}{4} = -1
x=52, 1\boxed{x = \frac{5}{2},\ -1}

4.3 The Discriminant

4.3.1 Intuition

The discriminant D=b24acD = b^2 - 4ac tells us what kind of roots the equation has — without actually solving it. It's like a medical test that tells you the nature of the disease before treatment.

4.3.2 Definition and Classification

D=b24acD = b^2 - 4ac
DiscriminantNature of RootsGraph
D>0D > 0Two distinct real rootsParabola crosses x-axis at two points
D=0D = 0One real root (double/repeated)Parabola touches x-axis at one point
D<0D < 0Two complex conjugate rootsParabola does NOT cross x-axis
(Diagram)

4.3.3 Worked Examples

Example 4.1 (Easy): Determine the nature of roots of x25x+6=0x^2 - 5x + 6 = 0. Step 1: a=1a = 1, b=5b = -5, c=6c = 6 Step 2: D=2524=1>0D = 25 - 24 = 1 > 0 Conclusion: Two distinct real roots.
D=1>0Two real roots\boxed{D = 1 > 0 \rightarrow \text{Two real roots}}
Example 4.2 (Medium): For what kk does x2+kx+9=0x^2 + kx + 9 = 0 have a double root? Step 1: a=1a = 1, b=kb = k, c=9c = 9 Step 2: D=k236D = k^2 - 36 Step 3: For double root, D=0    k2=36    k=±6D = 0 \implies k^2 = 36 \implies k = \pm 6
k=6 or k=6\boxed{k = 6 \text{ or } k = -6}
Example 4.3 (Hard): Show that f(x)=x2+x+1f(x) = x^2 + x + 1 has no real zeros. Step 1: a=1a = 1, b=1b = 1, c=1c = 1 Step 2: D=14=3<0D = 1 - 4 = -3 < 0 Conclusion: No real zeros (complex roots). The parabola lies entirely above the x-axis.
D=3<0No real roots\boxed{D = -3 < 0 \rightarrow \text{No real roots}}

4.4 Sum and Product of Roots

4.4.1 Vieta's Formulas

For ax2+bx+c=0ax^2 + bx + c = 0 with roots α\alpha and β\beta:
α+β=ba\alpha + \beta = -\frac{b}{a} αβ=ca\alpha\beta = \frac{c}{a}
Derivation: If α\alpha and β\beta are roots, then ax2+bx+c=a(xα)(xβ)ax^2 + bx + c = a(x - \alpha)(x - \beta) Expanding: a(x2(α+β)x+αβ)=ax2a(α+β)x+aαβa(x^2 - (\alpha + \beta)x + \alpha\beta) = ax^2 - a(\alpha + \beta)x + a\alpha\beta Comparing: a(α+β)=b    α+β=b/a-a(\alpha + \beta) = b \implies \alpha + \beta = -b/a And: aαβ=c    αβ=c/aa\alpha\beta = c \implies \alpha\beta = c/a

4.4.2 Worked Examples

Example 5.1 (Easy): Find the sum and product of roots of x27x+12=0x^2 - 7x + 12 = 0. Step 1: a=1a = 1, b=7b = -7, c=12c = 12 Step 2: Sum =(7)/1=7= -(-7)/1 = 7 Step 3: Product =12/1=12= 12/1 = 12
Sum=7, Product=12\boxed{\text{Sum} = 7,\ \text{Product} = 12}
Example 5.2 (Medium): If α\alpha and β\beta are roots of 2x25x+1=02x^2 - 5x + 1 = 0, find 1α+1β\frac{1}{\alpha} + \frac{1}{\beta}. Step 1: α+β=52\alpha + \beta = \frac{5}{2}, αβ=12\alpha\beta = \frac{1}{2} Step 2: 1α+1β=α+βαβ=5/21/2=5\frac{1}{\alpha} + \frac{1}{\beta} = \frac{\alpha + \beta}{\alpha\beta} = \frac{5/2}{1/2} = 5
5\boxed{5}
Example 5.3 (Hard): Form a quadratic equation whose roots are 2+32 + \sqrt{3} and 232 - \sqrt{3}. Step 1: Sum =(2+3)+(23)=4= (2 + \sqrt{3}) + (2 - \sqrt{3}) = 4 Step 2: Product =(2+3)(23)=43=1= (2 + \sqrt{3})(2 - \sqrt{3}) = 4 - 3 = 1 Step 3: Equation: x2(sum)x+(product)=0x^2 - (\text{sum})x + (\text{product}) = 0 x24x+1=0x^2 - 4x + 1 = 0
x24x+1=0\boxed{x^2 - 4x + 1 = 0}

4.5 Complex Roots

When D<0D < 0, the roots are complex conjugates: α=p+qi\alpha = p + qi, β=pqi\beta = p - qi, where i=1i = \sqrt{-1}. Example 6.1: Solve x2+4x+5=0x^2 + 4x + 5 = 0. Step 1: a=1a = 1, b=4b = 4, c=5c = 5 Step 2: D=1620=4<0D = 16 - 20 = -4 < 0 Step 3: x=4±42=4±2i2=2±ix = \frac{-4 \pm \sqrt{-4}}{2} = \frac{-4 \pm 2i}{2} = -2 \pm i
x=2+i, 2i\boxed{x = -2 + i,\ -2 - i}

4.6 Why This Matters

The discriminant tells you everything about the behavior of a quadratic without solving it. In optimization:
  • D>0D > 0: Two break-even points
  • D=0D = 0: Exactly one break-even (touching)
  • D<0D < 0: No real break-even (always profitable or never) In machine learning, many loss functions are quadratic (or approximated as quadratic near the minimum). The convexity (a>0a > 0) guarantees a unique minimum.

📐 Key Formulas — Summary Table

ConceptFormulaWhen to Use
Quadratic formulax=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}Solving ANY quadratic
DiscriminantD=b24acD = b^2 - 4acNature of roots
D>0D > 0Two distinct real rootsParabola crosses x-axis twice
D=0D = 0One double real rootParabola touches x-axis
D<0D < 0Two complex conjugate rootsParabola doesn't cross x-axis
Sum of rootsα+β=b/a\alpha + \beta = -b/aVieta's formula
Product of rootsαβ=c/a\alpha\beta = c/aVieta's formula
Forming equationx2(sum)x+(product)=0x^2 - (\text{sum})x + (\text{product}) = 0Given roots
Completing squarea(x+b2a)2+4acb24aa\left(x + \frac{b}{2a}\right)^2 + \frac{4ac - b^2}{4a}Vertex form

⚠️ Common Pitfalls

Pitfall 1: Sign Error in the Quadratic Formula

Mistake: Writing x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} correctly but evaluating b-b as negative even when bb is already negative. Example: For x25x+6=0x^2 - 5x + 6 = 0, b=5b = -5, so b=5-b = 5, not 5-5. x=5±25242=5±12=3,2x = \frac{5 \pm \sqrt{25 - 24}}{2} = \frac{5 \pm 1}{2} = 3, 2. ✓

Pitfall 2: Forgetting the ±\pm Sign

Mistake: Writing x=b+D2ax = \frac{-b + \sqrt{D}}{2a} and forgetting ±\pm, thus finding only one root. Correct: The ±\pm gives both roots. Every quadratic (in the complex plane) has exactly two roots.

Pitfall 3: Discriminant Confusion

Mistake: Thinking D>0D > 0 means "one real root" or D=0D = 0 means "no real root." Correct: D>0D > 0 → TWO real roots; D=0D = 0 → ONE (double) real root; D<0D < 0 → NO real roots (complex).

Pitfall 4: Forgetting to Write in Standard Form First

Mistake: Trying to apply the quadratic formula to 3x2+5=7x3x^2 + 5 = 7x without rearranging. Correct: First write 3x27x+5=03x^2 - 7x + 5 = 0, then identify a=3a = 3, b=7b = -7, c=5c = 5.

📝 Practice Questions

Q1: Solve x29=0x^2 - 9 = 0.
Strategy Hint: Difference of squares.
(x3)(x+3)=0    x=3 or x=3(x-3)(x+3) = 0 \implies x = 3 \text{ or } x = -3
x=±3\boxed{x = \pm 3} Q2: Solve 2x25x3=02x^2 - 5x - 3 = 0 using the quadratic formula.
Strategy Hint: a=2a=2, b=5b=-5, c=3c=-3.
x=5±25+244=5±494=5±74x = \frac{5 \pm \sqrt{25 + 24}}{4} = \frac{5 \pm \sqrt{49}}{4} = \frac{5 \pm 7}{4} x=3 or x=12x = 3 \text{ or } x = -\frac{1}{2}
x=3, 12\boxed{x = 3,\ -\frac{1}{2}} Q3: Find the discriminant and nature of roots of x26x+9=0x^2 - 6x + 9 = 0.
Strategy Hint: Compute D=b24acD = b^2 - 4ac.
D=3636=0D = 36 - 36 = 0 → one double real root.
D=0, double root x=3\boxed{D = 0,\ \text{double root } x = 3} Q4: For what kk does x24x+k=0x^2 - 4x + k = 0 have real and distinct roots?
Strategy Hint: Need D>0D > 0.
D=164k>0    k<4D = 16 - 4k > 0 \implies k < 4
k<4\boxed{k < 4} Q5: Find the sum and product of roots of 3x2+7x2=03x^2 + 7x - 2 = 0.
Strategy Hint: Sum =b/a= -b/a, Product =c/a= c/a.
Sum =73= -\frac{7}{3}, Product =23= -\frac{2}{3}
Sum=73, Product=23\boxed{\text{Sum} = -\frac{7}{3},\ \text{Product} = -\frac{2}{3}} Q6: Form a quadratic equation with roots 33 and 4-4.
Strategy Hint: x2(sum)x+product=0x^2 - (\text{sum})x + \text{product} = 0.
Sum =3+(4)=1= 3 + (-4) = -1, Product =3(4)=12= 3(-4) = -12 x2(1)x+(12)=0    x2+x12=0x^2 - (-1)x + (-12) = 0 \implies x^2 + x - 12 = 0
x2+x12=0\boxed{x^2 + x - 12 = 0} Q7: Solve x24x+13=0x^2 - 4x + 13 = 0 (complex roots).
Strategy Hint: D<0D < 0, use i=1i = \sqrt{-1}.
x=4±16522=4±362=4±6i2=2±3ix = \frac{4 \pm \sqrt{16 - 52}}{2} = \frac{4 \pm \sqrt{-36}}{2} = \frac{4 \pm 6i}{2} = 2 \pm 3i
x=2+3i, 23i\boxed{x = 2 + 3i,\ 2 - 3i} Q8: If α,β\alpha, \beta are roots of x25x+3=0x^2 - 5x + 3 = 0, find α2+β2\alpha^2 + \beta^2.
Strategy Hint: α2+β2=(α+β)22αβ\alpha^2 + \beta^2 = (\alpha+\beta)^2 - 2\alpha\beta.
α+β=5\alpha + \beta = 5, αβ=3\alpha\beta = 3 α2+β2=256=19\alpha^2 + \beta^2 = 25 - 6 = 19
19\boxed{19} Q9: Solve 2x2+3x2=02x^2 + 3x - 2 = 0 by completing the square.
Strategy Hint: Divide by 2 first, then complete.
x2+32x=1x^2 + \frac{3}{2}x = 1 x2+32x+916=1+916=2516x^2 + \frac{3}{2}x + \frac{9}{16} = 1 + \frac{9}{16} = \frac{25}{16} (x+34)2=2516(x + \frac{3}{4})^2 = \frac{25}{16} x+34=±54x + \frac{3}{4} = \pm \frac{5}{4} x=3±54    x=12 or x=2x = \frac{-3 \pm 5}{4} \implies x = \frac{1}{2} \text{ or } x = -2
x=12, 2\boxed{x = \frac{1}{2},\ -2} Q10: A rectangular garden has area 96 m². The length is 4 m more than the width. Find dimensions.
Strategy Hint: l=w+4l = w + 4, A=w(w+4)=96A = w(w+4) = 96.
w2+4w96=0w^2 + 4w - 96 = 0 D=16+384=400D = 16 + 384 = 400 w=4±202=8 or 12w = \frac{-4 \pm 20}{2} = 8 \text{ or } -12 (discard negative) w=8w = 8, l=12l = 12
8m×12m\boxed{8\text{m} \times 12\text{m}} Q11: If one root of x27x+k=0x^2 - 7x + k = 0 is 22, find kk and the other root.
Strategy Hint: If 22 is a root, f(2)=0f(2) = 0.
414+k=0    k=104 - 14 + k = 0 \implies k = 10 Other root: product =k=10= k = 10, so other root =10/2=5= 10/2 = 5 Check: 2+5=7=b/a2 + 5 = 7 = -b/a
k=10, other root=5\boxed{k = 10,\ \text{other root} = 5} Q12: Prove that x2+px+p2=0x^2 + px + p^2 = 0 has no real roots for any non-zero real pp.
Strategy Hint: Show D<0D < 0 for p0p \neq 0.
D=p24p2=3p2D = p^2 - 4p^2 = -3p^2 For p0p \neq 0, 3p2<0-3p^2 < 0 → no real roots.
D=3p2<0 for p0\boxed{D = -3p^2 < 0 \text{ for } p \neq 0}

🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.