The World of Astoria Bob

Completing the Square Algorithm

Start with:

\[ax^2+bx+c\]

1. Divide by \(a\).

\[x^2+\frac{b}{a}x+\frac{c}{a}\]

2. Complete the square on \(x^2\) and \(x\) terms.

\[x^2+\frac{b}{a}x+\left( \frac{b}{2a} \right)^2=\left(x+ \frac{b}{2a}\right)^2\]

3. Subtract \(\left( \frac{b}{2a} \right)^2\).

\[\left(x+ \frac{b}{2a}\right)^2+\left[\frac{c}{a} - \left(\frac{b}{2a}\right)^2\right]\]

So, completing the square yields close to the vertex form of a quadratic equation:

\[ax^2+bx+c = \boxed{\left(x+ \frac{b}{2a}\right)^2+\left[\frac{c}{a} - \left(\frac{b}{2a}\right)^2\right]}\]