Worked examples — Quadratic formula — derivation by completing the square
This is the worked-example deep dive for Quadratic formula — derivation by completing the square. The parent note built the formula from scratch. Here we don't re-derive it — we stress-test it against every kind of quadratic you can meet, so no exam problem is a surprise.
Before anything else, one reminder of what each letter means, because we will match them fast:
And the one number that decides the shape of the answer:
The scenario matrix
Every quadratic you will ever be handed falls into exactly one of these cells. The last column names the example that covers it.
| Cell | What makes it special | Where the trap is | Example |
|---|---|---|---|
| A — clean split | , perfect square | none, warm-up | Ex 1 |
| B — negative | so flips sign | the sign flip | Ex 2 |
| C — negative | so becomes | the double negative | Ex 3 |
| D — repeated root | gives one answer | Ex 4 | |
| E — irrational roots | but not a perfect square | leave in surd form | Ex 5 |
| F — complex roots | Ex 6 | ||
| G — leading , negative | dividing by negative | Ex 7 | |
| H — word problem (geometry) | pull from a sentence | reject the impossible root | Ex 8 |
| I — exam twist (parameter) | an unknown inside | set and solve for | Ex 9 |
We now walk cell by cell.
Forecast: Guess — will the roots be whole numbers, or ugly? (Try: and multiply to and add to … hold that thought.)
- Match coefficients. , , . Why this step? Everything downstream is just plugging these three into the formula; a wrong match poisons the whole answer.
- Compute . . Why this step? and it's a perfect square (), so I already know: two nice rational roots.
- Apply the formula. Why this step? — the first sign flip. The then splits into two.
- Split. or .
Verify: ✓ and ✓. My forecast ( and ) was right.
Forecast: is . Will be or ? Decide before reading on.
- Match. , , . Why this step? The whole point of this cell is to see the sign of explicitly. Write it as , not "9 with a minus lying around."
- . . Why this step? Squaring kills the sign: . A very common slip is writing .
- Formula. Why this step? . This is the trap: the numerator starts positive even though was negative.
- Split. or .
Verify: ✓; ✓.
Forecast: Since is negative, will add to or subtract from ?
- Match. , , . Why this step? Keep the minus glued to the .
- carefully. . So Why this step? Two negatives ( times a negative ) make a plus. A negative grows the discriminant — guaranteeing real roots.
- Formula. Why this step? , denominator .
- Split. or .
Verify: ✓; ✓.
Forecast: How many distinct answers — two, one, or none?
- Match. , , .
- . . Why this step? is the razor's edge: the collapses the two roots into one. Geometrically the parabola just kisses the -axis (see figure).
- Formula. Why this step? With , the does nothing.
- Recognise the perfect square. , zero when , i.e. . Same answer.
Verify: ✓.

The green parabola () touches the axis at one point — that's why there is one repeated root. Compare it to the blue parabola crossing twice and the red one floating clear.
Forecast: won't be a perfect square this time. Do we round, or leave the root symbolic?
- Match. , , .
- . . Why this step? is positive but not a perfect square, so the answers are irrational — keep them exact.
- Formula and simplify the surd. Since , Why this step? Pull the perfect-square factor out of , then cancel the common factor top and bottom. Never write a rounded decimal as the answer in exact algebra.
- The two roots. or .
Verify: their sum is ✓ and product is ✓ (a Vieta check).
Forecast: will be negative. Does that mean "no answers", or "no real answers"?
- Match. , , .
- . . Why this step? Negative → the parabola never touches the axis → no real crossings, but two complex roots.
- Introduce . By definition , so . Why this step? This is why we invented — to give a name so the formula still works.
- Formula.
Verify: sum ✓; product ✓.
Forecast: A negative opens the parabola downward. Will that change the roots, or just flip the picture?
- Match — signs matter most here. , , . Why this step? One tempting shortcut is multiplying the equation by first: . Roots are unchanged (dividing an equation by a nonzero number never moves its roots). We'll do it the direct way to practise a negative .
- . . Why this step? — again a negative coefficient boosts .
- Formula with negative denominator. Why this step? . Divide both branches by — a sign trap.
- Split. or .
Verify: ✓; ✓.
Forecast: We'll get two algebraic roots but only one can be a real width. Which sign survives?
- Name the unknown. Let width metres. Then length . Why this step? Turning the sentence into one variable is the whole battle in word problems.
- Build the equation from area. Area width length: Why this step? Now it's a standard quadratic; match , , .
- . . Why this step? again forces positive; , nice.
- Formula.
- Reject the impossible root. A width can't be , so . Why this step? The algebra gives all mathematical roots; the physics (a length is positive) filters them.
Verify: width , length , area ✓ and ✓ (units: metres × metres = m², correct).

Forecast: "Exactly one root" is a keyword. What must equal?
- Translate the wording into . One repeated root ⟺ . Why this step? This is the exam's disguise: instead of solving the quadratic, they hide behind English.
- Match and write . , , , so
- Set and solve for . Why this step? Both signs are valid parameters — the question asked about , and hides the sign.
- Report both. or .
Verify: with : , root (single) ✓. With : , root (single) ✓.
Recall Quick self-test on the matrix
Which cell does fall into, and why? ::: → Cell F, complex roots. In , what is ? ::: (Cell C double-negative). Why do word-problem quadratics often discard a root? ::: A negative length/time/count is physically impossible, so only the positive root survives (Cell H). "" corresponds to which picture? ::: The parabola just touches the -axis at one point (Cell D).
Connections
- Discriminant and nature of roots — the sign of drives Cells D, E, F.
- Complex numbers and quadratic equations — Cell F needs .
- Vieta's formulas for sum and product of roots — the sum/product checks in Ex 5 and 6.
- Perfect square trinomials — Cell D's repeated root is a perfect square.
- Parabola and its vertex form — the figures here are these parabolas.
- Factoring quadratics — an alternate route for Cells A, B, C.
- Quadratic inequalities — next step once you know where roots sit.
- Completing the square technique — the engine behind the parent derivation.