Part I — Algebra · Chapter 4
Quadratic Equations
There is only one technique in this chapter — completing the square. The quadratic formula is what you get by doing it once, in general, and then never having to do it again.
A farmer has $40$ meters of fencing for a rectangular pen. Which shape encloses the most ground?
- Long and thin: $18 \times 2$
- In between: $12 \times 8$
- A square: $10 \times 10$
- They all enclose the same area
Work out the three areas if you like. The harder question is why — and how you could know without trying every shape.
You should be able to use the rules of signs (Chapter 1) and to work with square roots (Chapter 3). Completing the square leans on both, and the discriminant is a question about which numbers have real square roots.
Three quick ones from earlier chapters, to wake up what this chapter stands on. They are not scored. If one doesn't come to you, its solution says where to look.
Solve $x^2 = 49$. List every solution, separated by commas.
Answer: $7$ and $-7$
Both $7^2$ and $(-7)^2$ are $49$. Taking "the square root of both sides" finds only one of them — the Wrong turn at the end of Chapter 3. This whole chapter runs on remembering the second root.
Expand $(x + 3)^2$.
Answer: $x^2 + 6x + 9$
$(x+3)^2 = x^2 + 2\cdot 3 \cdot x + 3^2 = x^2 + 6x + 9$, by the key expansion of Chapter 1. Completing the square is this identity read from right to left.
Compute $(-3)^2 - 4(2)(-1)$.
Answer: $17$
$(-3)^2 = 9$, and $-4(2)(-1) = +8$, so the total is $17$. This is exactly the arithmetic of the discriminant, and its sign errors are the most common slips in the chapter — see §1.3.
4.1 Equations you can already solve
Two special shapes are easy, and the whole chapter consists of reducing the general case to the first of them.
- $x^2 = c$. If $c > 0$ there are two solutions, $x = \sqrt c$ and $x = -\sqrt c$ (written $x = \pm\sqrt c$). If $c = 0$ the only solution is $x = 0$. If $c < 0$ there is no real solution, since squares are never negative (Chapter 3).
- A product equal to zero. If $uv = 0$ then $u = 0$ or $v = 0$.
The second deserves a proof, because it is the reason factoring solves equations at all. Suppose $uv = 0$ and $u \neq 0$. Then $u^{-1}$ exists, and
So if the first factor is not zero, the second must be. Note where this came from: the existence of inverses, and $a \cdot 0 = 0$ from Chapter 1.
The zero-product property is special to zero. From $uv = 6$ you may not conclude that $u = 6$ or $v = 6$ — try $u = 2$, $v = 3$. So always move everything to one side and set it equal to $0$ before factoring.
Wrong turn. Using the zero-product rule away from zero
Solve $(x-1)(x-2) = 6$.
- The tempting move. The left side is already factored, so read off $x - 1 = 6$ or $x - 2 = 6$, giving $x = 7$ or $x = 8$.
- The check. Put $x = 7$ back: $(7-1)(7-2) = 6 \cdot 5 = 30$, not $6$. Put $x = 8$ back: $(8-1)(8-2) = 7 \cdot 6 = 42$, not $6$. Both candidates fail, so the method itself is broken — this was not a slip in the arithmetic.
- Why. Two numbers multiplying to $6$ can be any of endlessly many pairs: $6 \cdot 1$, $2 \cdot 3$, $12 \cdot \tfrac12$, $(-2)(-3)$. Only for the product $0$ is the list of possibilities short enough to be useful — one of the factors must be $0$, because no two nonzero numbers multiply to zero.
- The repair. Expand and move everything to one side: $x^2 - 3x + 2 = 6$, so $x^2 - 3x - 4 = 0$.
- Now factor, with zero on the right where the rule applies: $(x-4)(x+1) = 0$, so $x = 4$ or $x = -1$.
- Check again. $(4-1)(4-2) = 3 \cdot 2 = 6$ ✓, and $(-1-1)(-1-2) = (-2)(-3) = 6$ ✓. $\blacksquare$
Note that the wrong method did not merely lose a solution — it produced two numbers that solve nothing, and it missed both numbers that do. A factored left side is only an invitation to read off roots when the right side is $0$.
Factoring is expansion run backwards. By distributivity,
So the coefficient of $x$ is the sum of $p$ and $q$, and the constant term is their product. To factor $x^2 + sx + t$, hunt for two numbers with sum $s$ and product $t$ — and start from the pairs that multiply to $t$, because there are only a few of them.
Example 1. Solving by factoring
Solve $x^2 + 2x = 15$.
- Move everything to one side: $x^2 + 2x - 15 = 0$.
- Factor: look for two numbers with product $-15$ and sum $2$ — namely $5$ and $-3$. So $(x + 5)(x - 3) = 0$.
- By the zero-product property, $x + 5 = 0$ or $x - 3 = 0$.
- So $x = -5$ or $x = 3$. Check both in the original: $25 - 10 = 15$ ✓ and $9 + 6 = 15$ ✓. $\blacksquare$
Factoring is fast when it works. The next section is what to do when it does not — which is most of the time.
Solve $x^2 - 7x + 12 = 0$. Give both roots.
Answer: $x = 3$ and $x = 4$
The pairs multiplying to $12$ are $1 \cdot 12$, $2 \cdot 6$, $3 \cdot 4$ and their negatives; the pair with sum $-7$ is $-3$ and $-4$. So $x^2 - 7x + 12 = (x - 3)(x - 4)$, and the zero-product property gives $x = 3$ or $x = 4$. Check: $9 - 21 + 12 = 0$ ✓ and $16 - 28 + 12 = 0$ ✓.
4.2 Completing the square
The obstacle to solving $x^2 + bx + c = 0$ directly is the middle term: if it were absent we could take square roots at once. Completing the square removes it, by recognizing a perfect square hiding in the expression:
The left side has the same $x^2$ and $bx$ as our equation; only the constant differs. So subtract the surplus:
That identity is the entire chapter. It converts any quadratic into "a perfect square, plus a constant" — and perfect squares we can undo.
Example 2. Completing the square, step by step
Solve $x^2 - 6x + 2 = 0$.
- Half the coefficient of $x$ is $-3$, and $(x-3)^2 = x^2 - 6x + 9$. Always: halve the middle coefficient, then square it.
- So $x^2 - 6x = (x-3)^2 - 9$, and the equation becomes $(x - 3)^2 - 9 + 2 = 0$, i.e. $(x-3)^2 = 7$.
- Take square roots — both of them: $x - 3 = \pm\sqrt7$.
- So $x = 3 + \sqrt7$ or $x = 3 - \sqrt7$. Numerically, about $5.646$ and $0.354$.
- Check the sum and product against the equation: the two roots add to $6$ (matching $-b$) and multiply to $9 - 7 = 2$ (matching $c$) ✓. $\blacksquare$
Your turn, with help. Completing the square
Solve $x^2 + 4x - 1 = 0$. The first step is done; try each later one before opening it.
- Half the coefficient of $x$ is $2$, and $(x + 2)^2 = x^2 + 4x + 4$.
-
Rewrite the equation as a square equal to a number
$x^2 + 4x = (x+2)^2 - 4$, so the equation becomes $(x+2)^2 - 4 - 1 = 0$, that is $(x+2)^2 = 5$.
-
Take square roots — both of them
$x + 2 = \pm\sqrt5$.
-
Solve for $x$, and check
$x = -2 + \sqrt5 \approx 0.236$ or $x = -2 - \sqrt5 \approx -4.236$. Check with sum and product: the roots add to $-4$ (matching $-b$) and multiply to $4 - 5 = -1$ (matching $c$) ✓. $\blacksquare$
Complete the square: $x^2 + 10x + 7 = (x + 5)^2 + k$. What is $k$?
Answer: $k = -18$
$(x + 5)^2 = x^2 + 10x + 25$, which carries $25$ where we want $7$. So $x^2 + 10x + 7 = (x+5)^2 - 25 + 7 = (x + 5)^2 - 18$.
When the leading coefficient is not $1$, divide through by it first — legal, since $a \neq 0$ for a quadratic.
Leading coefficient not 1. Divide first, then complete the square
Solve $2x^2 - 12x + 10 = 0$.
- Divide both sides by $2$: $x^2 - 6x + 5 = 0$.
- Half of $-6$ is $-3$, and $(x-3)^2 = x^2 - 6x + 9$. So $x^2 - 6x = (x-3)^2 - 9$.
- The equation becomes $(x-3)^2 - 9 + 5 = 0$, that is $(x-3)^2 = 4$.
- Take both square roots: $x - 3 = \pm 2$, so $x = 5$ or $x = 1$.
- Check in the original: $2(25) - 60 + 10 = 0$ ✓ and $2(1) - 12 + 10 = 0$ ✓. $\blacksquare$
Dividing by $2$ changed the equation's appearance but not its solutions — Move 2 of Chapter 2. The check uses the equation as given, so it would catch a slip in the division as well.
Complete the square: $x^2 + 6x + 2 = (x + {}$ $)^2 - {}$ .
Answer: $(x + 3)^2 - 7$
$(x + 3)^2 = x^2 + 6x + 9$, which is $7$ too many compared with $x^2 + 6x + 2$. So subtract $7$.
4.3 The quadratic formula
Now do Example 2 once with letters instead of numbers, and you never have to complete the square again.
Example 3. Deriving the formula
Solve $ax^2 + bx + c = 0$, with $a \neq 0$.
- Divide by $a$: $\;x^2 + \dfrac{b}{a}x + \dfrac{c}{a} = 0$.
- Complete the square on the first two terms: $$x^{2} + \frac{b}{a}x = \left(x + \frac{b}{2a}\right)^{2} - \frac{b^{2}}{4a^{2}}.$$
- Substitute and move the constants to the right: $$\left(x + \frac{b}{2a}\right)^{2} = \frac{b^{2}}{4a^{2}} - \frac{c}{a} = \frac{b^{2} - 4ac}{4a^{2}}.$$
- Take square roots: $$x + \frac{b}{2a} = \pm\frac{\sqrt{b^{2} - 4ac}}{2a}.$$ Valid when $b^2 - 4ac \ge 0$; note $\sqrt{4a^2} = |2a|$, and the $\pm$ absorbs the sign.
- Subtract $\dfrac{b}{2a}$: $$\boxed{\;x = \frac{-b \pm \sqrt{b^{2} - 4ac}}{2a}\;}$$ $\blacksquare$
The formula says the roots sit symmetrically on either side of $-\dfrac{b}{2a}$, at a distance $\dfrac{\sqrt{b^2-4ac}}{2a}$ from it. That center point and that spread are the two facts worth remembering; everything else follows.
The formula in use. Substituting with care
Solve $3x^2 + 5x - 2 = 0$.
- Read off the coefficients with their signs: $a = 3$, $b = 5$, $c = -2$.
- Compute the part under the root first: $b^2 - 4ac = 25 - 4(3)(-2) = 25 + 24 = 49$. $c$ is negative, so $-4ac$ comes out positive. This is where most errors happen.
- So $x = \dfrac{-5 \pm \sqrt{49}}{2 \cdot 3} = \dfrac{-5 \pm 7}{6}$.
- The two signs give $x = \dfrac{2}{6} = \dfrac13$ and $x = \dfrac{-12}{6} = -2$.
- Check both: $3\left(\tfrac19\right) + \tfrac53 - 2 = \tfrac13 + \tfrac53 - 2 = 0$ ✓, and $3(4) - 10 - 2 = 0$ ✓. $\blacksquare$
The whole numerator is divided by $2a$ — not just the root. Writing the fraction bar under everything, as in step 3, is the cheapest protection against that slip.
Solve $2x^2 - 3x - 2 = 0$. Give both roots.
Answer: $x = 2$ and $x = -\dfrac12$
$b^2 - 4ac = 9 - 4(2)(-2) = 9 + 16 = 25$, so $x = \dfrac{3 \pm 5}{4}$: that is $x = 2$ or $x = -\frac12$. Note $-b = +3$, since $b = -3$. Check: $8 - 6 - 2 = 0$ ✓ and $\frac12 + \frac32 - 2 = 0$ ✓.
4.4 The discriminant
The quantity under the root controls everything:
Without solving anything: how many real solutions does each of $\;x^2 + 1 = 0$, $\;x^2 = 0$, $\;x^2 - 1 = 0\;$ have? What decides it?Decide, then open
None, one, and two. Each is $x^2 = c$ with $c = -1$, $0$, $1$, and the count depends only on whether $c$ is negative, zero, or positive.
Completing the square turns every quadratic into that shape, with $\dfrac{b^2 - 4ac}{4a^2}$ in the role of $c$. Its denominator is positive, so the sign of $b^2 - 4ac$ alone decides.
- $\Delta > 0$: two distinct real roots — the graph crosses the $x$-axis twice.
- $\Delta = 0$: one (double) root, $x = -\dfrac{b}{2a}$ — the graph touches the axis.
- $\Delta < 0$: no real root — the graph misses the axis entirely.
You can therefore answer "how many solutions?" without solving anything. And the third case is not a dead end: in Chapter 14 we build numbers in which $\Delta < 0$ has square roots too, and every quadratic gets its two roots back.
Example 4. Counting roots without solving
How many real solutions does $2x^2 - 4x + 5 = 0$ have?
- Here $a = 2$, $b = -4$, $c = 5$.
- $\Delta = (-4)^2 - 4(2)(5) = 16 - 40 = -24$.
- $\Delta < 0$, so there is no real solution. $\blacksquare$
Sanity check by completing the square: $2x^2 - 4x + 5 = 2(x-1)^2 + 3$, which is at least $3$ for every real $x$ — so it is never $0$.
For which value of $c$ does $x^2 + 6x + c = 0$ have exactly one real root?
Answer: $c = 9$
$\Delta = 36 - 4c$, which is zero when $c = 9$. And indeed $x^2 + 6x + 9 = (x + 3)^2$, zero only at $x = -3$. In the picture: $9$ is exactly the missing corner that completes the square on $x^2 + 6x$.
Set the sliders so the graph is $y = x^2 - 4x + 4$, then press Check. Before you do: how many times will it meet the $x$-axis?
Answer: $a = 1$, $b = -4$, $c = 4$ — it touches once
$b^2 - 4ac = 16 - 16 = 0$, so there is one double root. Indeed $x^2 - 4x + 4 = (x - 2)^2$, and the vertex sits on the axis at $x = 2$.
4.5 Vertex, symmetry, and the graph
Completing the square on $y = ax^2 + bx + c$ rewrites it as
In this form the graph is transparent. The squared term is $0$ at $x = -\dfrac{b}{2a}$ and positive everywhere else, so:
- If $a > 0$ the curve opens upward and has its lowest point at $x = -\frac{b}{2a}$; if $a < 0$ it opens downward and has its highest point there. This point is the vertex.
- Since $\left(x + \frac{b}{2a}\right)^2$ depends only on the distance from $x$ to $-\frac{b}{2a}$, points equally far to the left and right give the same $y$: the curve is symmetric about the vertical line $x = -\frac{b}{2a}$.
- The two roots, when they exist, are that same distance on either side of the vertex — which is what the $\pm$ in the formula was saying all along.
Example 5. Vertex and range
Find the vertex of $y = 3x^2 + 12x + 7$ and the smallest value $y$ can take.
- Vertex at $x = -\dfrac{b}{2a} = -\dfrac{12}{6} = -2$.
- Its height: $y = 3(4) + 12(-2) + 7 = 12 - 24 + 7 = -5$.
- Since $a = 3 > 0$ the parabola opens upward, so this is the minimum: $y \ge -5$ for every $x$, with equality only at $x = -2$.
- Confirm by completing the square: $3x^2 + 12x + 7 = 3(x+2)^2 - 5$ ✓. $\blacksquare$
What is the smallest value that $y = x^2 - 8x + 10$ can take?
Answer: $-6$
The vertex is at $x = -\frac{b}{2a} = 4$, where $y = 16 - 32 + 10 = -6$. Since $a = 1 > 0$ the parabola opens upward, so that is the minimum. Completed square: $y = (x-4)^2 - 6$, which is at least $-6$ because the square is at least $0$.
Practice
Where an exercise asks for several roots, separate them with a comma in any order.
Solve $x^2 + 5x = 14$.
Answer: $x = 2$ and $x = -7$
Rearrange to $x^2 + 5x - 14 = 0$. Two numbers with product $-14$ and sum $5$ are $7$ and $-2$, so $(x + 7)(x - 2) = 0$, giving $x = -7$ or $x = 2$.
Check: $4 + 10 = 14$ ✓ and $49 - 35 = 14$ ✓.
Complete the square: $x^2 - 8x + 3 = (x - 4)^2 + k$. What is $k$?
Answer: $k = -13$
$(x-4)^2 = x^2 - 8x + 16$, so $x^2 - 8x = (x-4)^2 - 16$, and therefore $$x^2 - 8x + 3 = (x-4)^2 - 16 + 3 = (x-4)^2 - 13.$$ So $k = -13$.
Compute the discriminant of $3x^2 + 2x + 1 = 0$.
Answer: $\Delta = -8$
$\Delta = 2^2 - 4(3)(1) = 4 - 12 = -8$. Being negative, it tells us this equation has no real solution — the parabola $y = 3x^2 + 2x + 1$ stays entirely above the $x$-axis.
How many real roots does $x^2 - 6x + 9 = 0$ have?
- None.
- Two distinct roots.
- Exactly one (a double root).
- Infinitely many.
Answer: exactly one
$\Delta = 36 - 36 = 0$, so there is a single double root at $x = -\frac{b}{2a} = 3$. Indeed $x^2 - 6x + 9 = (x-3)^2$, which is zero only at $x = 3$: the parabola touches the $x$-axis at its vertex instead of crossing.
Solve $x^2 - 3x + 1 = 0$ and give both roots to two decimal places.
Answer: $x \approx 2.62$ and $x \approx 0.38$
$\Delta = 9 - 4 = 5$, so $$x = \frac{3 \pm \sqrt5}{2}.$$ With $\sqrt5 \approx 2.236$: $x \approx \frac{5.236}{2} \approx 2.618$ and $x \approx \frac{0.764}{2} \approx 0.382$.
Check the center: the two roots average to $1.5 = -\frac{b}{2a}$ ✓, as the formula guarantees.
At which $x$ does $y = -2x^2 + 8x - 1$ take its largest value?
Answer: $x = 2$
The vertex is at $x = -\frac{b}{2a} = -\frac{8}{-4} = 2$. Since $a = -2 < 0$ the parabola opens downward, so the vertex is the highest point. Its height is $-2(4) + 16 - 1 = 7$, so $y \le 7$ for every $x$.
For which values of $k$ does $x^2 + kx + 4 = 0$ have exactly one (double) root? Give one such value.
Answer: $k = 4$ or $k = -4$
A double root means $\Delta = 0$: here $\Delta = k^2 - 16$, so $k^2 = 16$ and $k = \pm 4$.
Sanity check: with $k = 4$ the equation is $x^2 + 4x + 4 = (x+2)^2 = 0$, with the double root $x = -2$; with $k = -4$ it is $(x-2)^2 = 0$.
Solve $2x^2 + 10x = 0$.
Answer: $x = 0$ and $x = -5$
Factor: $2x(x + 5) = 0$. By the zero-product property, $2x = 0$ or $x + 5 = 0$, so $x = 0$ or $x = -5$.
Dividing both sides by $x$ instead would have lost the root $x = 0$ — and dividing by something that might be zero is exactly the move Chapter 2 warned about.
A rectangle has perimeter $26$ and area $40$. What is the length of its longer side?
Answer: $8$
Let the sides be $x$ and $y$. Then $2(x + y) = 26$, so $y = 13 - x$, and $xy = 40$ gives $$x(13 - x) = 40 \quad\Longrightarrow\quad x^2 - 13x + 40 = 0.$$ Factoring: $(x - 5)(x - 8) = 0$, so the sides are $5$ and $8$. The longer side is $8$.
Check: perimeter $2(5+8) = 26$ ✓, area $40$ ✓.
A parabola $y = ax^2 + bx + c$ has $a > 0$ and no real root. What follows?
- $y > 0$ for every real $x$.
- $y < 0$ for every real $x$.
- $y = 0$ at the vertex.
- Nothing follows without knowing $b$.
Answer: $y > 0$ for every real $x$
Opening upward ($a > 0$) the curve has a minimum at the vertex. Having no real root means it never meets the $x$-axis, so that minimum is strictly above it — and since the vertex is the lowest point, the whole curve is above the axis.
With $a < 0$ and no real root the same reasoning gives $y < 0$ everywhere.
Recap
If one side is $x$, the other is $20 - x$ (the perimeter is $40$), and the area is $x(20 - x) = -x^2 + 20x$. Complete the square: $-x^2 + 20x = -(x - 10)^2 + 100$. A square is never negative, so the area is at most $100$, with equality only at $x = 10$. The square pen wins — and completing the square proved it for every possible rectangle at once, including the ones nobody tried.
- $x^2 = c$ has two roots, one, or none according to the sign of $c$; and $uv = 0$ forces $u = 0$ or $v = 0$ — which is why factoring works.
- $x^2 + bx = \left(x + \frac b2\right)^2 - \frac{b^2}{4}$ turns any quadratic into a perfect square plus a constant.
- Doing that in general gives $x = \dfrac{-b \pm \sqrt{b^2-4ac}}{2a}$ — a derivation, not a spell.
- $\Delta = b^2 - 4ac$ counts the real roots: two, one, or none.
- The vertex is at $x = -\frac{b}{2a}$, the parabola is symmetric about that line, and the roots sit equally far on either side of it.