2x^2-5x-12=0

solve by completing the square.
please explain how it's sovled.

A perfect square is,

(a+b)^2=a^2+b^2+2ab

So you have to adapt the equation given to this expression.

The term with x should be of the form 2ab, but a=sqrt(2)x, so b=5/(2*sqrt(2)), then

2x^2-5x-12=(sqrt(2)*x)^2+sqrt(2)*x*5/(2*sqrt(2))+25/8-25/8-12=0

(sqrt(2)x+5/(2sqrt(2)))^2=121/8

x=4; x=-3/2