Example  3

Convert \(y = 2x^2 + 4x + 7\) to vertex form by completing the square.

Step 1: Group the first two terms, and remove \(a\) as the common factor.

This is done whether \(a\) is a factor of \(b\) or not.

\(\begin{array}{l}
 y = \left( {2x^2 + 4x} \right) + 7 \\
 y = 2\left( {x^2 + 2x} \right) + 7 \end{array}\)


Step 2: Calculate the value of the constant term of the perfect square trinomial, \(c = \left( {\frac{b}{2}} \right)^2 \). Add and subtract this value within the brackets.

\[\begin{array}{l}
 c = \left( {\frac{2}{2}} \right)^2 = 1 \\
 y = 2\left( {x^2 + 2x + 1 - 1} \right) + 7 \end{array}\]

Step 3
: Remove the subtracted value from inside the brackets.

Note that you must multiply the value by \(a\) to take it out of the brackets.

\(\begin{array}{l}
 y = 2\left( {x^2 + 2x + 1} \right) + 7 + \left( { -1} \right)2 \\
 y = 2\left( {x^2 + 2x + 1} \right) + 7 - 2 \\
 \end{array}\)


Most of the errors in completing the square occur in this step.

Step 4:  Factor the perfect square trinomial and simplify the constants. In this example, the simplification of the constants happens in step 4, whereas previously, in Example 2, the simplification happened in step 3.

\(y = 2\left( {x + 1} \right)^2  + 5\)