solve by completing the square

x^2=5x+2

to complete the square the middle term must be of the 2 x a x b so we get

x2 - 2 x( 5/2 x X) + ( 5/2)2+ 2 - (5/2)2 =( x -5/2)2 +2-25/4 or we get ( x-5/2 )2=17/4 so we get

x = 5/2 + or - root 17/2 so the solutions are x = 5/2+ or - (square root 17) /2