Completing the square is a technique which consists of adding a certain value to an expression of the form |ax^2 + bx| to obtain a square trinomial of the form |ax^2 + bx + c|. In fact, it is also possible to factor trinomials in different forms with this method as well.
To complete the square, we can follow these steps.
-
If necessary, we factor out a common factor of |a|, so that the coefficient of the 1st term is equal to |1|.
-
We create a perfect square trinomial by adding, then subtracting from the trinomial the value |\left(\dfrac{b}{2}\right)^{2}|.
-
We factor the first 3 terms using the perfect square trinomial method, which will create a difference of squares.
-
We factor the difference of squares.
The completing the square method involves other factoring techniques.
If the discriminant of the trinomial of the form |ax^2+bx+c| is negative, then the latter cannot be factored.
||b^2-4ac<0 \Longrightarrow \text{Not factorable}||
Consider the trinomial |2x^2 - 4x - 16|.
-
Make sure that the coefficient of the first term is |1|. In this case, |1| is not the coefficient, so it is necessary to factor out a common factor of 2. ||\begin{align}2x^2-4x-16 &= \color{blue}{2}\left(\dfrac{2x^2}{\color{blue}{2}} - \dfrac{4x}{\color{blue}{2}} - \dfrac{16}{\color{blue}{2}}\right)\\ &=2\left(x^2-2x-8\right)\end{align}||
-
We create a perfect square trinomial by adding and then subtracting the value. ||\left (\dfrac{b}{2}\right) ^2 = \left( \dfrac {-2}{2} \right)^2=(-1)^2=\color{blue}{1}|| Add |1| and subtract |1| — doing both will not change the starting algebraic expression.
It is important to place these additions just before the last term, which is |-8|. ||2 (x^2 - 2x - 8) = 2 \left( x^2 - 2x +\color{blue}{1}-\color{blue}{1} - 8 \right)|| -
We factor the first 3 terms using the perfect square trinomial method. ||\begin{align}2x^2-4x-16&=2(\underbrace{\color{green}{x^2-2x+1}}_{\text{perfect square trinomial}}-1-8)\\ &= 2\big( \color{green}{(x-1)^2}-1-8\big) \\ &=2\big( (x-1)^2-9\big) \end{align}||
-
Factor the difference of squares created in step 3. ||\begin{align} &2x^2-4x-16 &&=&&2\big(\underbrace{\color{green}{(x-1)^2-9}}_{\text{difference of squares}}\big)\\ \boxed{ \begin{array}{c} \sqrt{(x-1)^2}=\color{purple}{(x-1)}\\ \ \ \sqrt{9}=\color{teal}{3}\end{array}}\\& &&=&&2\big(\color{purple}{(x-1)}-\color{teal}{3}\big)\big(\color{purple}{(x-1)}+\color{teal}{3}\big)\\ & &&=&&2(x-4)(x+2)\end{align}||
Answer : The trinomial |2x^2-4x-16|, after being factored by completing the square, equals |2(x-4)(x+2).|
Consider the trinomial |2x^2+13x+15|.
-
Make sure that the coefficient of the first term is |1|. In this example, |1| is not the coefficient, so it is necessary to factor out a common factor of 2. ||\begin{align}2x^2+13x+15 &= \color{blue}{2}\left( \dfrac{2x^2}{\color{blue}{2}} + \dfrac{13x}{\color{blue}{2}} + \dfrac{15}{\color{blue}{2}}\right)\\ &=2\left(x^2+\dfrac{13}{2}x+\dfrac{15}{2}\right)\end{align}||
-
We create a perfect square trinomial by adding and then subtracting like so:
||\left ( \dfrac{b}{2}\right) ^2 = \left( \dfrac {13/2}{2} \right)^2=\left(\dfrac{13}{4}\right)^2=\color{blue}{\dfrac{169}{16}}|| Add |\dfrac{169}{16}| and subtract |\dfrac{169}{16}|, which will not change the initial algebraic expression. It is important to place these terms just before the last term, which is |\dfrac{15}{2}|. ||2\left(x^2+\dfrac{13}{2}x+\dfrac{15}{2}\right)= 2 \left( x^2 +\dfrac{13}{2}x +\color{blue}{\dfrac{169}{16}}-\color{blue}{\dfrac{169}{16}} +\dfrac{15}{2} \right)|| -
We factor the first 3 terms using the perfect square trinomial method. ||\begin{align}2x^2+13x+15&=2\left(\underbrace{\color{green}{x^2+\frac{13}{2}x+\dfrac{169}{16}}}_{\text{perfect square trinomial}}+\dfrac{15}{2}-\dfrac{169}{16}\right)\\ &= 2\left( \color{green}{\left(x+\dfrac{13}{4}\right)^2}+\dfrac{15}{2}-\dfrac{169}{16}\right) \\ &=2\left( \left(x+\dfrac{13}{4}\right)^2-\dfrac{49}{16}\right)\end{align}||
-
We factor the difference of squares that was created in step 3. ||\begin{align}&2x^2+13x+15 &&=&&2\left( \underbrace{\color{green}{\left(x+\dfrac{13}{4}\right)^2-\dfrac{49}{16}}}_{\text{difference of squares}}\right)\\ \boxed{ \begin{array}{c}\sqrt{\left(x+\dfrac{13}{4}\right)^2}=\color{purple}{x+\dfrac{13}{4}}\\ \sqrt{\frac{49}{16}}=\color{teal}{\frac{7}{4}}\end{array}}\\ & &&=&&2\left(\color{purple}{x+\dfrac{13}{4}}+\color{teal}{\dfrac{7}{4}}\right)\left(\color{purple}{x+\dfrac{13}{4}}-\color{teal}{\dfrac{7}{4}}\right)\\ & &&=&&2\left(x+\dfrac{20}{4}\right)\left(x+\dfrac{6}{4}\right)\\& &&=&&2\left(x+5\right)\left(x+\dfrac{3}{2}\right)\end{align}||
Answer: The trinomial |2x^2+13x+15|, once factored by completing the square, equals |2\left(x+5\right)\left(x+\frac{3}{2}\right).|
The binomial |x^2+bx| can be represented by the following illustration.
The area of the orange square, whose sides are |x|, is |x^2|. Since each blue rectangle has a width of |\dfrac{b}{2}| and a length of |x|, their area is |\dfrac{b}{2}x|. Therefore, the area of the orange square and the 2 blue rectangles is |x^2+\dfrac{b}{2}x+\dfrac{b}{2}x=x^2+2\left(\dfrac{b}{2}x\right)=x^2+bx|.
Visualizing completing the square consists of determining the area of the small square which enters the upper right corner and completes the large square.
As the side of the small square represented by a red dotted line is |\dfrac{b}{2}|, the area of the small square equals |\left(\dfrac{b}{2}\right)^2=\dfrac{b^2}{2^2}=\dfrac{b^2}{4}.|