Unit 1 Lesson 1

Solving quadratic equations: the discriminant

Solving \(ax^2 + bx + c = 0\): the incomplete cases first, then completing the square, the discriminant \(\Delta = b^2 - 4ac\), and the quadratic formula.

Learning Objectives

  • Recognize a quadratic equation and read off its coefficients \(a, b, c\).
  • Solve incomplete quadratic equations (\(b = 0\) or \(c = 0\)) by factoring or square roots.
  • Solve any quadratic equation by completing the square.
  • Compute the discriminant and predict the number of real solutions from its sign.
  • Apply the quadratic formula fluently, including recognizing double roots.

From first degree to second

In the previous course we learned to solve every first-degree equation: \(ax + b = 0\) with \(a \neq 0\) has exactly one solution, \(x = -\tfrac{b}{a}\). One equation, one answer, every time.

Raise the degree by one and the picture becomes richer. Here is a concrete problem. A rectangular garden has perimeter \(20\) m and area \(21\) m². If one side has length \(x\), the other has length \(10 - x\), and the area condition reads \(x(10 - x) = 21\), that is,

\[x^2 - 10x + 21 = 0.\]

The unknown now appears squared. Equations of this kind can have two solutions, one, or none at all — and by the end of this lesson a single number, computed from the coefficients, will tell us in advance which of the three cases we are in.

Quadratic equation

A quadratic equation (or second-degree equation) in the unknown \(x\) is an equation of the form

\[ax^2 + bx + c = 0,\]

where \(a, b, c \in \mathbb{R}\) are given numbers, called the coefficients, and \(a \neq 0\).

A real number \(x_0\) is a solution (or root) of the equation if substituting it for \(x\) makes the equality true: \(ax_0^2 + bx_0 + c = 0\). To solve the equation means to find all its solutions.

The condition \(a \neq 0\) is essential: if \(a = 0\) the term \(x^2\) disappears and we are back to a first-degree equation, which we already know how to solve.

What our old tools can already do

Before building new machinery, let us see how far the tools we already have will carry us. Two incomplete forms of the equation give in at once.

No constant term (\(c = 0\)). The equation \(ax^2 + bx = 0\) factors as \(x(ax + b) = 0\). A product of real numbers is zero exactly when at least one factor is zero, so \(x = 0\) or \(ax + b = 0\), giving the two solutions \(x_1 = 0\) and \(x_2 = -\tfrac{b}{a}\). For instance, \(x^2 - 3x = 0\) becomes \(x(x - 3) = 0\), with solutions \(0\) and \(3\).

No linear term (\(b = 0\)). The equation \(ax^2 + c = 0\) rearranges to \(x^2 = -\tfrac{c}{a}\). Recall from earlier schooling that for \(k > 0\) the equation \(x^2 = k\) has exactly two solutions, \(x = \sqrt{k}\) and \(x = -\sqrt{k}\), where \(\sqrt{k}\) denotes the unique nonnegative number whose square is \(k\). (Radicals receive a full treatment in a later course; here we only need square roots of nonnegative numbers.) If \(-\tfrac{c}{a} = 0\) the only solution is \(0\); if \(-\tfrac{c}{a} < 0\) there is no real solution, because no real square is negative. For instance, \(2x^2 - 8 = 0\) gives \(x^2 = 4\), with solutions \(2\) and \(-2\).

But our garden equation \(x^2 - 10x + 21 = 0\) has all three terms. It does not factor at sight, and it is not of the form \(x^2 = k\). We need one genuinely new idea.

The new idea: completing the square

Solve \(x^2 + 8x - 9 = 0\).

The trick is to view \(x^2 + 8x\) as the beginning of a perfect square. Since \((x + 4)^2 = x^2 + 8x + 16\), the expression \(x^2 + 8x\) is exactly \((x+4)^2\) with \(16\) missing. The picture below shows why this is called completing the square: a square of side \(x\), plus two \(4 \times x\) rectangles, is an incomplete square of side \(x + 4\) — only the \(4 \times 4\) corner is absent.

4x 4x 16 x 4 4 x
\(x^2 + 8x\) fills an incomplete square; the dashed \(4 \times 4\) corner completes it to \((x+4)^2\).

So we add \(16\) to both sides of \(x^2 + 8x = 9\):

\[x^2 + 8x + 16 = 9 + 16, \qquad\text{that is,}\qquad (x+4)^2 = 25.\]

A square equals \(25\) exactly when the quantity being squared is \(5\) or \(-5\):

\[x + 4 = 5 \;\Rightarrow\; x = 1, \qquad x + 4 = -5 \;\Rightarrow\; x = -9.\]

Check: \(1 + 8 - 9 = 0\) and \(81 - 72 - 9 = 0\). The solutions are \(x_1 = 1\) and \(x_2 = -9\).

The complete equation has been reduced to the incomplete form \(t^2 = k\) that we already know how to solve. This one idea, carried out with letters instead of numbers, solves every quadratic equation — as we now prove.

The discriminant

For a quadratic equation \(ax^2 + bx + c = 0\) (\(a \neq 0\)), the number

\[\Delta = b^2 - 4ac\]

is called the discriminant of the equation.

The name comes from the Latin discriminare, "to distinguish": as the next theorem shows, the sign of \(\Delta\) distinguishes between the three possible solution counts — two, one, or none.

The quadratic formula

Let \(ax^2 + bx + c = 0\) with \(a, b, c \in \mathbb{R}\), \(a \neq 0\), and let \(\Delta = b^2 - 4ac\).

  • If \(\Delta > 0\), the equation has exactly two distinct real solutions, \[x_{1,2} = \frac{-b \pm \sqrt{\Delta}}{2a}.\]

  • If \(\Delta = 0\), the equation has exactly one real solution, \(x = -\dfrac{b}{2a}\), called a double root (the reason for the word double will become clear in the next lesson).

  • If \(\Delta < 0\), the equation has no real solutions.

Since \(a \neq 0\), the number \(4a\) is nonzero, and multiplying both sides of an equation by a nonzero number does not change its solution set. Multiplying \(ax^2 + bx + c = 0\) by \(4a\) gives the equivalent equation

\[4a^2x^2 + 4abx + 4ac = 0.\]

Now complete the square. The first two terms are the beginning of the square of \(2ax + b\): indeed \(4a^2x^2 = (2ax)^2\) and \(4abx = 2 \cdot (2ax) \cdot b\). Move \(4ac\) to the right-hand side and add \(b^2\) to both sides:

\[(2ax)^2 + 2(2ax)b + b^2 = b^2 - 4ac,\]

that is,

\[(2ax + b)^2 = \Delta.\]

Every step is reversible, so the original equation is equivalent to this one, and we compare the two sides.

If \(\Delta < 0\): the left side is a square of a real number, hence \(\geq 0\), while the right side is negative. No real \(x\) can make them equal — there are no real solutions.

If \(\Delta \geq 0\): a real number \(t\) satisfies \(t^2 = \Delta\) exactly when \(t = \sqrt{\Delta}\) or \(t = -\sqrt{\Delta}\). With \(t = 2ax + b\) this reads

\[2ax + b = \pm\sqrt{\Delta} \quad\Longleftrightarrow\quad x = \frac{-b \pm \sqrt{\Delta}}{2a}.\]

If \(\Delta > 0\) these are two distinct values: their difference is \(\dfrac{2\sqrt{\Delta}}{2a} = \dfrac{\sqrt{\Delta}}{a} \neq 0\). If \(\Delta = 0\), both signs give the same value \(x = -\dfrac{b}{2a}\), and it is the only solution.

The three cases in action

Case \(\Delta > 0\): the garden. For \(x^2 - 10x + 21 = 0\) we have \(a = 1\), \(b = -10\), \(c = 21\), so

\[\Delta = (-10)^2 - 4 \cdot 1 \cdot 21 = 100 - 84 = 16 > 0, \qquad x_{1,2} = \frac{10 \pm 4}{2},\]

giving \(x_1 = 7\) and \(x_2 = 3\). Both are meaningful: if one side of the garden measures \(3\) m, the other measures \(7\) m — the two roots describe the same rectangle, seen from its two sides.

Case \(\Delta = 0\). For \(4x^2 - 4x + 1 = 0\),

\[\Delta = 16 - 16 = 0, \qquad x = \frac{4}{8} = \frac{1}{2}.\]

Indeed the left side is exactly \((2x - 1)^2\), a perfect square that vanishes only at \(x = \tfrac{1}{2}\).

Case \(\Delta < 0\). For \(x^2 + x + 1 = 0\),

\[\Delta = 1 - 4 = -3 < 0:\]

no real solutions. We can see this directly by completing the square: \(x^2 + x + 1 = \left(x + \tfrac{1}{2}\right)^2 + \tfrac{3}{4} \geq \tfrac{3}{4}\) for every real \(x\), so the left side is never zero.

Connection to Computer Science

When a video game or an animated film draws a scene, the computer asks, millions of times per image: does this ray of light hit that sphere? Written out in coordinates, that question becomes a quadratic equation, and the discriminant answers it before any root is computed: \(\Delta < 0\) — the ray misses; \(\Delta = 0\) — it just grazes the surface; \(\Delta > 0\) — it strikes, and the two roots say exactly where the ray enters and where it leaves.

"No real solutions" — the end of the story?

When \(\Delta < 0\) we declared the equation to have no solutions. But be precise: no solutions where?

Mathematics has met this situation before. In the natural numbers, the equation \(x + 7 = 2\) has no solution — until the integers are introduced, and \(x = -5\) appears. In the integers, \(3x = 2\) has no solution — until the rationals provide \(x = \tfrac{2}{3}\). In the rationals, \(x^2 = 2\) has no solution — the reals supply \(\sqrt{2}\). Each time, "no solution" secretly meant "no solution in the numbers we currently allow", and enlarging the number system dissolved the obstacle.

Our verdict for \(\Delta < 0\) is a true and final statement about real numbers: the square of a real number is never negative, so \(x^2 + 1 = 0\), for example, has no real solution — full stop. Yet the historical pattern continued: mathematicians constructed a still larger number system (the complex numbers, studied in a later grade) in which even these equations have solutions.

The lasting lesson is a habit of rigor: a solution count is always relative to a number system. Our theorem counts real solutions, and every claim in this course should be read that way.

Exercises

Exercise 1

For each equation, compute \(\Delta = b^2 - 4ac\) and give the number of real solutions.

a)

\(x^2 - 4x + 1 = 0\)

b)

\(3x^2 + 2x + 5 = 0\)

c)

\(x^2 + 10x + 25 = 0\)

Exercise 2

For each equation, choose its solution set.

a)

\(2x^2 + x - 1 = 0\)

The solution set is:

b)

\(x^2 - 2x + 3 = 0\)

The solution set is:

Exercise 3

Decide whether each statement about quadratic equations is true or false.

a)

A quadratic equation can have three distinct real solutions.

b)

If \(\Delta = 0\), the equation has no real solutions.

c)

If \(c = 0\), then \(x = 0\) is a solution.

d)

If \(a\) and \(c\) have opposite signs, the equation has two distinct real solutions.

e)

The equation \(x^2 + 1 = 0\) has a real solution.

Exercise 4

Consider the equation \(x^2 - 4x - 5 = 0\). Completing the square turns it into \((x - 2)^2 = k\) for some number \(k\).

a)

b)

c)

Exercise 5

Using the sign of the discriminant, classify each equation.

a)

\(x^2 - 2x + 3 = 0\)

b)

\(4x^2 - 4x + 1 = 0\)

c)

\(x^2 - x - 1 = 0\)

d)

\(2x^2 + 3x + 2 = 0\)

e)

\(x^2 - 9 = 0\)

Summary

  • A quadratic equation is \(ax^2 + bx + c = 0\) with \(a \neq 0\); solving it means finding all real numbers that satisfy it.

  • The incomplete forms yield to old tools: \(c = 0\) factors as \(x(ax + b) = 0\), and \(b = 0\) reduces to \(x^2 = k\).

  • Completing the square handles every case: multiplying by \(4a\) turns the equation into \((2ax + b)^2 = \Delta\), where \(\Delta = b^2 - 4ac\) is the discriminant.

  • The sign of \(\Delta\) counts the real solutions: \(\Delta > 0\) gives two, via \(x_{1,2} = \dfrac{-b \pm \sqrt{\Delta}}{2a}\); \(\Delta = 0\) gives the single double root \(x = -\dfrac{b}{2a}\); \(\Delta < 0\) gives none.

  • A solution count is always relative to a number system — our theorem counts real solutions.