Given 2x^2+8x2x2+8x
Extract the coefficient of x^2x2 as a factor
color(white)("XXXX")XXXX=(2)(x^2+4x)=(2)(x2+4x)
Half of the coefficient of xx is 1/2xx4 = 212×4=2
So the square of half the coefficient of xx is 2^2 = 422=4
Add (and subtract) the square of half the coefficient of xx
color(white)("XXXX")XXXX= (2)(x^2+4x+2^2 -4)=(2)(x2+4x+22−4)
Which could be written as
color(white)("XXXX")XXXX=(2)((x+2)^2 -4)=(2)((x+2)2−4)
In case you were wondering "why the square of half the coefficient of xx?)
color(white)("XXXX")XXXXWe are trying for a squared binomial of the form (x+a)^2(x+a)2
color(white)("XXXX")XXXXSince
color(white)("XXXX")XXXXcolor(white)("XXXX")XXXX(x+a)^2 = x^2+2ax+a^2(x+a)2=x2+2ax+a2
color(white)("XXXX")XXXXGiven the first 2 terms in the form:
color(white)("XXXX")XXXXcolor(white)("XXXX")XXXXx^2+dx2+d
color(white)("XXXX")XXXXcolor(white)("XXXX")XXXXcolor(white)("XXXX")XXXX(d=2ad=2a)
color(white)("XXXX")XXXXWe need to add (d/2)^2(d2)2 to get a "squared form"