0:00 / 0:00

Completing the Square

Given a quadratic equation in standard form y=x2+bx+cy=x^2+bx+c, we often want to rewrite it in vertex form y=(xh)2+ky=(x-h)^2+k. This process is called completing the square.

Steps for Completing the Square for y=x2+bx+c\bco{y=x^2+bx+c}

  1. Focus on the first 2 terms: y=[x2+bx]+cy=[\colorbox{yellow}{$x^2+bx$}]+c
  2. Add and subtract (b2)2\left(\dfrac{b}{2}\right)^2: y=[x2+bx+(b2)2(b2)2]+cy=\left[x^2+bx\colorbox{yellow}{$+\left(\dfrac{b}{2}\right)^2-\left(\dfrac{b}{2}\right)^2$}\right]+c
  3. Rewrite (factor) the first 3 terms as a perfect square: y=[(x+b2)2(b2)2]+cy=\left[\colorbox{yellow}{$\left(x+\dfrac{b}{2}\right)^2$}-\left(\dfrac{b}{2}\right)^2\right]+c
  4. Simplify the constant terms: y=(x+b2)2(b2)2+cy=\left(x+\dfrac{b}{2}\right)^2\colorbox{yellow}{$-\left(\dfrac{b}{2}\right)^2+c$}

Write it Down
Short-cut Formula for Completing the Square for y=x2+bx+cy=x^2+bx+c:
x2+bx+c=(x+b2)2(b2)2+c\boxed{x^2+bx+c=\left(x+\dfrac{b}{2}\right)^2-\left(\dfrac{b}{2}\right)^2+c}

0:00 / 0:00

Example: Completing the Square

Write y=x212x+7y=x^2-12x+7 in vertex form by completing the square.

1. Focus on the first 2 terms: y=[x2+bx]+c\bco{y=[\colorbox{yellow}{$x^2+bx$}]+c}

y=[x212x]+7y=[x^2-12x]+7


2. Add and subtract (b2)2\bco{\left(\dfrac{b}{2}\right)^2}: y=[x2+bx+(b2)2(b2)2]+c\bco{y=\left[x^2+bx\colorbox{yellow}{$+\left(\dfrac{b}{2}\right)^2-\left(\dfrac{b}{2}\right)^2$}\right]+c}

  • In our equation b=12b=-12
  • b2=122=6\dfrac{b}{2}=\dfrac{-12}{2}=-6
  • (b2)2=(6)2=36\left(\dfrac{b}{2}\right)^2=(-6)^2=36
y=[x212x+3636]+7y=\left[x^2-12x+36-36\right]+7


3. Rewrite (factor) the first 3 terms as a perfect square: y=[(x+b2)2(b2)2]+c\bco{y=\left[\colorbox{yellow}{$\left(x+\dfrac{b}{2}\right)^2$}-\left(\dfrac{b}{2}\right)^2\right]+c}

y=[(x6)236]+7 y=\left[\left(x-6\right)^2-36\right]+7


4. Simplify the constant terms: y=(x+b2)2(b2)2+c\bco{y=\left(x+\dfrac{b}{2}\right)^2 \colorbox{yellow}{$-\left(\dfrac{b}{2}\right)^2+c$}}

y=(x6)236+7y=(x6)229\begin{aligned} y&=\left(x-6\right)^2-36+7\\ y&=(x-6)^2-29 \end{aligned}

So, by completing the square, we get the vertex form equation y=(x6)229y=(x-6)^2-29

Practice: Completing the Square

Write y=x2+10x14y=x^2+10x-14 in vertex form by completing the square. Then determine the vertex of this quadratic relation.

Practice: Completing the Square

Write y=x218x11y=x^2-18x-11 in vertex form by completing the square. Then, graph this quadratic relation.

Practice: Completing the Square

Write y=x211x6y=x^2-11x-6 in vertex form by completing the square. Then, determine the vertex and y-intercept of this quadratic relation.

Practice: Completing the Square

Write the following in vertex form by completing the square.

a) x2+8xx^2+8x

b) x2+16x1x^2+16x-1

c) x26x+17x^2-6x+17

d) x2+9x+7x^2+9x+7

e) x221x3x^2-21x-3