Mathwords logoReference LibraryMathwords

Completing the Square

Completing the square is a method for rewriting a quadratic expression like ax2+bx+cax^2 + bx + c into the form a(xh)2+ka(x - h)^2 + k, where hh and kk are constants. This makes it easier to solve quadratic equations, graph parabolas, and derive the quadratic formula.

Completing the square is an algebraic technique that transforms a quadratic expression ax2+bx+cax^2 + bx + c into vertex form a(xh)2+ka(x - h)^2 + k. The process works by adding and subtracting a carefully chosen constant to create a perfect square trinomial within the expression. Specifically, for x2+bxx^2 + bx, you add and subtract (b2)2\left(\frac{b}{2}\right)^2 so that x2+bx+(b2)2x^2 + bx + \left(\frac{b}{2}\right)^2 factors as (x+b2)2\left(x + \frac{b}{2}\right)^2. When a1a \neq 1, you first factor aa out of the quadratic and linear terms before applying the technique.

Key Formula

x2+bx+c=(x+b2)2(b2)2+cx^2 + bx + c = \left(x + \frac{b}{2}\right)^2 - \left(\frac{b}{2}\right)^2 + c
Where:
  • bb = the coefficient of the linear term $x$
  • cc = the constant term
  • b2\frac{b}{2} = half the coefficient of $x$, used to form the perfect square

Worked Example

Problem: Solve x2+6x+2=0x^2 + 6x + 2 = 0 by completing the square.
Step 1: Move the constant to the right side of the equation.
x2+6x=2x^2 + 6x = -2
Step 2: Take half of the coefficient of xx and square it. Half of 6 is 3, and 32=93^2 = 9. Add this value to both sides.
x2+6x+9=2+9x^2 + 6x + 9 = -2 + 9
Step 3: Factor the left side as a perfect square and simplify the right side.
(x+3)2=7(x + 3)^2 = 7
Step 4: Take the square root of both sides, remembering both the positive and negative roots.
x+3=±7x + 3 = \pm\sqrt{7}
Step 5: Subtract 3 from both sides to isolate xx.
x=3±7x = -3 \pm \sqrt{7}
Answer: x=3+70.354x = -3 + \sqrt{7} \approx -0.354 or x=375.646x = -3 - \sqrt{7} \approx -5.646

Why It Matters

Completing the square is the method used to derive the quadratic formula itself, so understanding it gives you insight into where that formula comes from. Beyond solving equations, it converts a quadratic function into vertex form, which immediately tells you the vertex of a parabola — essential for graphing and optimization problems. It also appears in later courses when working with equations of circles and conic sections.

Common Mistakes

Mistake: Forgetting to add (b2)2\left(\frac{b}{2}\right)^2 to both sides of the equation.
Correction: When you add a value to one side to create the perfect square, you must add the same value to the other side to keep the equation balanced.
Mistake: Not factoring out the leading coefficient aa before completing the square when a1a \neq 1.
Correction: If the coefficient of x2x^2 is not 1, factor it out of the x2x^2 and xx terms first. For example, rewrite 2x2+8x2x^2 + 8x as 2(x2+4x)2(x^2 + 4x), then complete the square inside the parentheses.

Related Terms