Q.E.D. — quod erat demonstrandum · every step shown, every result verifiedJournal · ISSN pending · Crossref DOI member
Sign inSign up

Completing the Square

Completing the square is the technique that turns any quadratic into a shifted perfect square — the move behind vertex form, the quadratic formula, and half the integrals in a calculus course.

Algebra · Foundations

1. The geometric picture

x² + bx is literally an x-by-x square plus a b-by-x rectangle. Slice the rectangle in half and paste the two b/2 strips onto adjacent sides of the square: the figure is now a larger square of side x + b/2, minus a missing (b/2)² corner. Algebraically:

That identity is completing the square; everything else is bookkeeping.

2. The algorithm on a general quadratic

For ax² + bx + c with a ≠ 0: factor a out of the x-terms, apply the identity, tidy up.

This is vertex form: the parabola's vertex sits at x = −b/2a, and the sign of a says whether it opens up or down. Worked example: 2x² − 12x + 7 = 2(x − 3)² − 11, so the minimum value −11 occurs at x = 3 — read off with no calculus.

3. It proves the quadratic formula

Set the vertex form equal to zero and solve:

The discriminant b² − 4ac appears as the quantity whose sign decides whether the square root is real — see the quadratic formula page and try the solver.

Key takeaway

One identity, three payoffs: vertex form for graphing, exact optimisation without derivatives, and the quadratic formula as a two-line corollary.

4. More worked examples

Example 2 — a maximum without calculus. Profit P(x) = −2x² + 8x + 3. Factor and complete: P = −2(x² − 4x) + 3 = −2[(x−2)² − 4] + 3 = −2(x−2)² + 11. The square term is never positive, so P ≤ 11 with equality at x = 2: maximum profit 11 at production level 2, read off with algebra alone — and the same rearrangement is the standard proof behind "vertex at −b/2a."

Example 3 — an integral unlocked. ∫dx/(x² + 6x + 13). The denominator has no real roots (Δ = 36 − 52 < 0), so partial fractions stall — but x² + 6x + 13 = (x+3)² + 4, and

Every irreducible quadratic in every partial-fraction and Laplace-transform table is handled by exactly this move; completing the square is the calculus student's most-used algebra after factoring.

Example 4 — a circle recovered. x² + y² − 6x + 4y − 12 = 0. Complete in each variable: (x−3)² − 9 + (y+2)² − 4 − 12 = 0 → (x−3)² + (y+2)² = 25: centre (3, −2), radius 5. Conic sections arrive in "general form" and leave in standard form by this technique — twice per conic.

Example 5 — an inequality. Solve x² − 4x − 5 ≥ 0. Complete: (x−2)² ≥ 9 → |x − 2| ≥ 3 → x ≤ −1 or x ≥ 5. No factoring luck required, and the geometry (distance from 2 at least 3) is visible in a way the factored form (x−5)(x+1) hides.

5. Common misconceptions

"Halve b, square it, add it" — forgetting a. The identity applies to a monic quadratic. For 3x² + 12x, factor first: 3(x² + 4x) = 3[(x+2)² − 4]; adding (12/2)² = 36 to the raw expression is the classic wrong turn.

"Add to one side only." Within an expression, whatever is added must be subtracted in the same line ((b/2)² in, (b/2)² out). Within an equation, add to both sides. Mixing the two habits produces off-by-(b/2)² answers with full confidence.

"Vertex at (h, k) means h appears with its own sign." a(x − h)² + k has vertex at +h: from (x + 3)² the vertex abscissa is −3. Reading the sign through the minus is the single most common vertex error.

"It only works when the discriminant is positive." The completion is pure identity, valid always; Δ's sign only decides whether the subsequent square root (when solving = 0) is real. Example 3 used a negative-Δ quadratic on purpose.

6. Where this shows up

Beyond vertex form and the quadratic formula: optimisation word problems (maximum area for fixed perimeter, projectile peak height h(t) = −½gt² + v₀t + h₀), conic standard forms, Gaussian integrals in probability (the entire trick of computing ∫e^{−ax²+bx}dx is completing the square in the exponent — the source of the e^{b²/4a} factors in every normal-distribution calculation and in statistical mechanics), signal processing (completing the square in quadratic phase terms gives the chirp/Fresnel integrals), and least-squares algebra, where minimising a quadratic form is completion in n dimensions. Few one-line identities carry so much weight so far from home.

7. Practice problems

P1. Write 5x² − 30x + 41 in vertex form. Solution: 5(x−3)² − 4; vertex (3, −4).

P2. Minimise f(x) = x² + 10x + 32 and state where. Solution: (x+5)² + 7 → minimum 7 at x = −5.

P3. Evaluate ∫dx/(x² − 2x + 10). Solution: (x−1)² + 9 → (1/3)arctan((x−1)/3) + C.

P4. For which c does x² + 8x + c have (a) two real roots, (b) one, (c) none — argued via completion, not the formula. Solution: (x+4)² = 16 − c: two if c < 16, one if c = 16, none if c > 16.

P5. Complete the square in the exponent: ∫₋∞^∞ e^{−x²+6x}dx. Solution: −x²+6x = −(x−3)² + 9 → e⁹√π.

8. Going deeper

The move generalises upward in two directions. In degree: the substitution x = t − b/3a kills the quadratic term of a cubic (the Tschirnhaus/depression step), the exact analogue of centring a parabola on its vertex, and the gateway to Cardano's solution — completing the square is the n = 2 case of "translate away the next-highest coefficient." In dimension: for a quadratic form xᵀAx + bᵀx, completion reads x → x + ½A⁻¹b and underlies diagonalisation of Gaussians, the Cholesky view of least squares, and the conjugate-gradient method's geometry. One identity, humble origins, honest empire.

9. Historical context

The technique is nearly four thousand years old and was born geometric. Babylonian clay tablets (c. 1800 BCE, e.g. BM 13901) solve problems equivalent to x² + bx = c by literally completing a square: a rectangle of sides x and b is cut in half, rearranged around the x-square, and a corner patch of area (b/2)² is added to close the figure — arithmetic instructions that track this picture step by step. Al-Khwarizmi's ninth-century Kitab al-jabr — the book whose title gives us "algebra" — presents the same geometric completion with formal proofs, treating cases separately because negative numbers were not yet legitimate coefficients. The symbolic version we teach is essentially Descartes-era notation wrapped around Babylonian geometry, and the quadratic formula is the technique run once in full generality and memorised. Few school procedures carry this much unbroken history.

10. Another way to see it: the picture

Draw x² + 8x as shapes: a square of side x, plus an 8-by-x rectangle. Slice the rectangle into two 4-by-x strips and paste one on the square's right edge, one on its bottom. The result is an L-shaped figure — a square of side (x + 4) with a 4-by-4 corner bite missing. Therefore

read directly off the picture: the completed square, minus the patch you would need to finish the corner. Every algebraic completion is this rearrangement in symbols — "half of b" is slicing the rectangle fairly, "(b/2)²" is the corner patch, and the compensating subtraction is honesty about having added it. The picture also explains the name (you are literally completing a square), makes the sign bookkeeping nearly error-proof for learners, and connects forward: in n dimensions the same move — symmetrise the cross terms, patch the corner — is how quadratic forms are reduced, with the "picture" now an ellipsoid being centred on its axes.

11. Frequently asked questions

When should I complete the square instead of using the quadratic formula? When you need structure, not just roots: vertex and extremum questions, integrals with irreducible quadratics, conic standard forms, range of a quadratic, deriving the formula itself. For bare numeric roots the formula is faster — it is the technique pre-run.

What if the coefficient of x² is negative or fractional? Factor it out of the x-terms first, complete inside the bracket, multiply back. −2x² + 8x = −2(x² − 4x) = −2[(x−2)² − 4]: mechanical once the "monic first" habit is fixed.

How does it produce complex roots? Identically: (x + 3)² = −4 gives x + 3 = ±2i without any new machinery. The method is indifferent to the sign of what remains — one of its advantages over factoring, which stalls.

Is "vertex form" the same as "completed-square form"? Yes — a(x − h)² + k, with the vertex (h, k) readable by inspection and the axis of symmetry x = h. Graphing-first curricula teach the identical algebra under the friendlier name.

Does it work for x² + bx + c with b odd? Of course — (b/2) is simply a fraction: x² + 5x = (x + 5/2)² − 25/4. Fear of fractions, not mathematics, is the only obstacle.

12. Further practice

P6. Find the range of f(x) = 2x² − 12x + 23. Solution: 2(x−3)² + 5 → range [5, ∞).

P7. Reduce x² + y² + 4x − 10y + 20 = 0 and identify the curve. Solution: (x+2)² + (y−5)² = 9: circle, centre (−2, 5), radius 3.

P8. Solve by completion: 3x² + 12x − 7 = 0. Solution: 3[(x+2)² − 4] = 7 → (x+2)² = 19/3 → x = −2 ± √(19/3) ≈ −2 ± 2.516.

P9. Derive the axis-of-symmetry formula x = −b/2a for ax² + bx + c by completion. Solution: a(x + b/2a)² + (c − b²/4a): the square vanishes at x = −b/2a ∎ — the formula every graphing student memorises, earned in one line.

P10. Laplace-transform tables need s² + 4s + 13 in standard form. Solution: (s+2)² + 3²: the inverse transform is e^{−2t}(A cos 3t + B sin 3t) — damped oscillation frequency and decay rate read directly from the completion; this is how engineers extract physics from denominators daily.

13. Worked exam problem

Problem. A ball is thrown from a balcony: height h(t) = −4.9t² + 19.6t + 2.4 metres. (a) Write h in vertex form and give the maximum height and its time. (b) When does the ball land? (c) A separate pricing model gives revenue R(p) = −3p² + 120p; find the revenue-maximising price by completion.

Solution. (a) h = −4.9(t² − 4t) + 2.4 = −4.9[(t−2)² − 4] + 2.4 = −4.9(t−2)² + 22.0: maximum 22.0 m at t = 2 s. (b) Landing: −4.9(t−2)² + 22.0 = 0 → (t−2)² = 4.49 → t = 2 + 2.12 = 4.12 s (the negative root predates the throw). (c) R = −3(p² − 40p) = −3[(p−20)² − 400] = −3(p−20)² + 1 200: price 20, revenue 1 200. Three contexts — kinematics, root-finding, economics — one identity doing all the work, and in each case the vertex form answered a question the standard form hid.

14. Choosing your tool: a quick decision guide

Need only numeric roots? Quadratic formula (it is this method, pre-run). Need the vertex, an extremum, a range, or a graph? Complete the square. Facing an irreducible quadratic inside an integral or Laplace transform? Complete the square — no alternative exists. Recognising conic sections from general form? Complete in each variable. Deriving or proving? Completion is the proof engine; the formula is its output. The method's monopoly cases (integrals, conics, derivations) are why it is taught even though calculators find roots instantly.

15. Key takeaways

Completing the square rewrites ax² + bx + c as a(x−h)² + k by adding and subtracting (b/2)² inside a monic bracket — geometrically, patching a literal square. It yields the vertex form, proves the quadratic formula and the −b/2a axis rule, unlocks arctangent integrals and conic standard forms, handles complex roots without new machinery, and generalises to quadratic forms in any number of variables. Factor out a first; track the patch honestly; read the vertex sign carefully.

16. Where to go next

The identity's most famous output is the quadratic formula; solve equations step by step with the quadratic solver or jump straight to a vertex with the quadratic solver. The dictionary holds the supporting cast — discriminant, vertex, parabola — in one-breath form.