Given x^2-12x-2 = 0x2−12x−2=0
Completing the square is simpler if we move the constant to the right side:
color(white)("XXXX")XXXXx^2-12x = 2x2−12x=2
If x^2x2 and -12x−12x are the first two terms of a squared binomial expansion:
color(white)("XXXX")XXXX(x-a)^2 = (x^2-2ax+a^2)(x−a)2=(x2−2ax+a2)
then
color(white)("XXXX")XXXXa=6a=6
and
we need to add a^2 = 36a2=36 to both sides to complete the square
color(white)("XXXX")XXXXx^2-12x+36 = 2+36x2−12x+36=2+36
Rewriting as a squared binomial (and simplifying the right side)
color(white)("XXXX")XXXX(x-6)^2 = 38(x−6)2=38
Taking the square root of both sides
color(white)("XXXX")XXXXx-6 = +-sqrt(38)x−6=±√38
Adding 66 to both sides:
color(white)("XXXX")XXXXx=6+-sqrt(38)x=6±√38