Completing Square
Formula:
\((x + y)^2 = x^2 + 2 \:.\: x \:.\: y + y^2\)
\((x - y)^2 = x^2 - 2 \:.\: x \:.\: y + y^2\)
Example 01
Convert \(x^2 + 6x + 7\) to the form of \((x + p)^2 + q\)
\begin{equation*} \begin{split} & x^2 + 6x + 7 \\\\ & x^2 + 2 \:.\: 3 \:.\: x + 3^2 - 3^2 + 7 \\\\ & {\color {blue} \text{Form } x^2 + 2 \:.\: 3 \:.\: x + 3^2 = (x + 3)^2} \\\\ & (x + 3)^2 - 3^2 + 7 \\\\ & (x + 3)^2 - 9 + 7 \\\\ & (x + 3)^2 - 2 \end{split} \end{equation*}
Example 02
Convert \(x^2 - 8x + 20\) to the form of \((x + p)^2 + q\)
\begin{equation*} \begin{split} & x^2 - 8x + 20 \\\\ & x^2 - 2 \:.\: 4 \:.\: x + 4^2 - 4^2 + 20 \\\\ & {\color {blue} \text{Form } x^2 - 2 \:.\: 4 \:.\: x + 4^2 = (x - 4)^2} \\\\ & (x - 4)^2 - 4^2 + 20 \\\\ & (x - 4)^2 - 16 + 20 \\\\ & (x - 4)^2 + 4 \end{split} \end{equation*}
Exercise