algebra

Completing the Square: A Walkthrough That Finally Clicks

Completing the square — the technique behind the quadratic formula, vertex form, and many calculus integrals. Step-by-step examples for monic and non-monic cases.

本文中文版本即将上线。下方暂以英文原文展示。

AI-Math Editorial Team

作者: AI-Math Editorial Team

发布于 2026-05-01

Completing the square is one of those algebra moves that students see once and forget. But it is the single technique behind the quadratic formula, vertex form of a parabola, and several common calculus integrals. Once you internalise the trick, you have a tool you'll use forever.

The core idea

The squared binomial (x+h)2(x + h)^2 expands to x2+2hx+h2x^2 + 2hx + h^2. To turn any expression x2+bxx^2 + bx into a perfect square, you need to add (b2)2\left(\frac{b}{2}\right)^2. That is the entire trick.

Worked example: monic case

Complete the square on x2+6x+5x^2 + 6x + 5.

  1. Take half the linear coefficient: b/2=3b/2 = 3.
  2. Square it: 99.
  3. Rewrite: x2+6x+99+5=(x+3)24x^2 + 6x + 9 - 9 + 5 = (x + 3)^2 - 4.

We added 9 and subtracted 9 — net zero, but the first three terms now form a perfect square.

Worked example: non-monic case

Complete the square on 2x2+12x+72x^2 + 12x + 7.

  1. Factor 2 out of the first two terms: 2(x2+6x)+72(x^2 + 6x) + 7.
  2. Inside the bracket, complete the square: x2+6x+99=(x+3)29x^2 + 6x + 9 - 9 = (x+3)^2 - 9.
  3. Substitute back: 2((x+3)29)+7=2(x+3)218+7=2(x+3)2112((x+3)^2 - 9) + 7 = 2(x+3)^2 - 18 + 7 = 2(x+3)^2 - 11.

Application 1: solving quadratics

To solve x2+6x+5=0x^2 + 6x + 5 = 0:
(x+3)24=0(x+3)2=4x+3=±2x=1,5(x + 3)^2 - 4 = 0 \Rightarrow (x+3)^2 = 4 \Rightarrow x + 3 = \pm 2 \Rightarrow x = -1, -5.

Same answer as the quadratic formula, derived from scratch.

Application 2: vertex of a parabola

y=2x2+12x+7=2(x+3)211y = 2x^2 + 12x + 7 = 2(x + 3)^2 - 11 is in vertex form y=a(xh)2+ky = a(x - h)^2 + k. Vertex is at (h,k)=(3,11)(h, k) = (-3, -11), opening upward (since a>0a > 0). You can read this off without calculus.

Application 3: integration

Integrals like dxx2+4x+13\int \frac{dx}{x^2 + 4x + 13} resist direct attack but yield to completing the square: x2+4x+13=(x+2)2+9x^2 + 4x + 13 = (x + 2)^2 + 9, then substitute u=x+2u = x + 2 to recognize an arctangent.

Common mistakes

  • Forgetting to subtract what you added — the expression must remain equal to itself.
  • Not factoring out the leading coefficient in non-monic cases first.
  • Halving the wrong coefficient — it's the linear coefficient bb, not the leading aa.

Try with the AI Quadratic Solver

The Quadratic Solver shows the completing-the-square approach side-by-side with the quadratic formula.

Related references:

AI-Math Editorial Team

作者: AI-Math Editorial Team

发布于 2026-05-01

A small team of engineers, mathematicians, and educators behind AI-Math, focused on making step-by-step math help accessible to every student.