Completing the square

Illvoices

Junior Member
Joined
Jan 13, 2017
Messages
116
What is the perfect square and what does it do in completing the square Khan academy.
(X+a)2
 
I'm not sure what you are asking. A perfect square is something like what you wrote: a single quantity (typically a binomial), squared, just as in working with numbers, a perfect square is something like 9, which is an integer squared.

A perfect square is a useful goal, because an equation with one side in that form is easy to solve, by taking a square root.

Khan Academy doesn't have a monopoly on them.
 
For example, if you want to solve the equation \(\displaystyle x^2+ 6x+ 7= 0\) you could note that the left sides is NOT a "perfect square" because there is no number "a" such that \(\displaystyle (x- a)^2= x^2+ 2ax+ a^2\) is equal to \(\displaystyle x^2- 6x+ 7\). But you could notice, comparing "\(\displaystyle x^2+ 6x\)" with "\(\displaystyle x^2+ 2ax\) that 2ax= -6x if a= -3. In that case, it would be a "perfect square" if it were \(\displaystyle (x- 3)^2= x^2- 6x+ 9\). That is, if the constant term were "9" instead of 7. Well, that's easily fixed! We can
"complete" the square, make it a "perfect square just adding 2! Of course to keep the equation true we have to add 2 to both sides:
\(\displaystyle x^2- 6x+ 7+ 2= 0+ 2\)
\(\displaystyle x^2- 6x+ 9= (x- 3)^2= 2\) so
\(\displaystyle x- 3= \pm\sqrt{2}\) and
\(\displaystyle x= 3 \pm\sqrt{2}\).
 
To build on Hall's answer, the quadratic formula is developed by "completing the square." Once you have that formula, completing the square is seldom necessary to solve an equation.

[MATH](x + d)^2 = (x + d)(x + d) = x(x + d) + d(x + d) =\\ x^2 + dx + dx + d^2 = x^2 + 2dx + d^2.[/MATH]Notice the pattern. In the expanded form, the coefficient of x^2 is 1, the coefficient of x is twice some number, d in this case, and the constant term is that SAME number squared, d^2 in this case. The moment you see that pattern, you know that

[MATH]\sqrt{x^2 + 2dx + d^2} = x + d.[/MATH]
That set of very convenient relationships is true for perfect squares, but is NOT true for quadratic expressions in general. So "completing the square" is the technique of turning a quadratic that is not a perfect square into a perfect square. I am going to take baby steps here. Make sure you follow each step. Ask questions if you get lost.

[MATH]\text {Given } a \ne 0,\ \left ( \dfrac{b}{2} \right )^2 \ne c, \text { and } ax^2 + bx + c = 0.[/MATH]
Unless a happens to equal 1, we do not have our desired pattern. But we can fix that problem easily by dividing everything by a, which is not zero.

[MATH]ax^2 + bx + c = 0 \implies x^2 + \dfrac{b}{a} * x + \dfrac{c}{a} = \dfrac{0}{a} = 0.[/MATH]
But we want the coefficient of x to have 2 as a factor. Again, that is easy to fix.

[MATH]\dfrac{b}{a} = 1 * \dfrac{b}{a} = \dfrac{2}{2} * \dfrac{b}{a} = 2 * \dfrac{b}{2a}.\\ \therefore x^2 + \dfrac{b}{a} * x + \dfrac{c}{a} = 0 \implies x^2 + \left ( 2 * \dfrac{b}{2a} \right )x + \dfrac{c}{a} = 0[/MATH]But we assumed that [MATH]\left ( \dfrac{b}{2} \right )^2 \ne c \implies \dfrac{b^2}{4} \ne c \implies \dfrac{b^2}{4a} \ne \dfrac{c}{a}.[/MATH]
That assumption means this is not a perfect square because the constant term is wrong. So we move it to the other side of the equal sign.

[MATH]x^2 + \left (2 * \dfrac{b}{2a} \right )x + \dfrac{c}{a} - \dfrac{c}{a}= 0 - \dfrac{c}{a} \implies x^2 + \left (2 * \dfrac{b}{2a} \right )x = - \dfrac{c}{a}.[/MATH]
The constant we need to turn the expression on the left hand side into a perfect square is the square of the factor of x that is not 2.

[MATH]\left ( \dfrac{b}{2a} \right )^2 = \dfrac{b^2}{4a^2}.[/MATH]
Pure mechanics, no real thought involved. So we add that to the left hand side to get a perfect square, but that means we must also add it to the right hand side.

[MATH] x^2 +\left (2 * \dfrac{b}{2a} \right )x = - \dfrac{c}{a} \implies x^2 + \left (2 * \dfrac{b}{2a} \right )x + \dfrac{b^2}{4a^2} = \dfrac{b^2}{4a^2} - \dfrac{c}{a} [/MATH]
We can combine those fractions on the right hand side by using a common denominator.

[MATH]\dfrac{b^2}{4a^2} - \dfrac{c}{a} = \dfrac{b^2}{4a^2} - \dfrac{c}{a} * \dfrac{4a}{4a} = \dfrac{b^2}{4a^2} - \dfrac{4ac}{4a^2} = \dfrac{b^2 - 4ac}{4a^2}.[/MATH]
So we have

[MATH]x^2 + \left (2 * \dfrac{b}{2a} \right )x + \dfrac{b^2}{4a^2} = \dfrac{b^2 - 4ac}{4a^2}.[/MATH]
But the left hand side is now a perfect square where [MATH]d = \dfrac{b}{2a}.[/MATH]
[MATH]\therefore \sqrt{x^2 + \left (2 * \dfrac{b}{2a} \right )x + \dfrac{b^2}{4a^2}} = x + \dfrac{b}{2a}.[/MATH]
Confirm that if you are unsure. But

[MATH]\therefore x^2 + \left (2 * \dfrac{b}{2a} \right )x + \dfrac{b^2}{4a^2} = \dfrac{b^2 - 4ac}{4a^2} \implies \\ x + \dfrac{b}{2a} = \pm \sqrt{\dfrac{b^2 - 4ac}{4a^2}} = \pm \dfrac{\sqrt{b^2 - 4ac}}{\sqrt{4a^2}} = \pm \dfrac{\sqrt{b^2 - 4ac}}{2a}.\\ \text {And, obviously, } x + \dfrac{b}{2a} = \pm \dfrac{\sqrt{b^2 - 4ac}}{2a} \implies x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}.[/MATH]We have a general formula to solve all quadratic equations, and we got it by using the method of completing the square.
 
Top