MathorynMathematical Formula Database

Algebra

Completing the Square

Completing the square rewrites a quadratic expression in vertex form. It is used to derive the quadratic formula, find the vertex of a parabola and put circle equations into standard form.

ax2+bx+c=a(x+b2a)2+c−b24aax^2+bx+c=a\left(x+\frac{b}{2a}\right)^2+c-\frac{b^2}{4a}
LaTeXax^2+bx+c=a\left(x+\frac{b}{2a}\right)^2+c-\frac{b^2}{4a}

Variables

aa
quadratic coefficient (nonzero)
bb
linear coefficient
cc
constant term
xx
variable

Example

Write x2+6x+5x^2+6x+5 in vertex form.

  1. b2a=3\frac{b}{2a}=3 and b24a=9\frac{b^2}{4a}=9.
  2. x2+6x+5=(x+3)2+5−9x^2+6x+5=(x+3)^2+5-9.

Answer: x2+6x+5=(x+3)2−4x^2+6x+5=(x+3)^2-4.

Related formulas