# solve x^2 = 5x + 2 by completing the square

#### dkarolasz

##### Junior Member
Could someone let me know if i did this right.

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

#### Denis

##### Senior Member
Noooooo; in order to see where you're at:
can you solve x^2 - 5x - 2 = 0 using the quadratic formula?

#### morson

##### Full Member
For $$\displaystyle x^2 + bx + c$$

This is equal to: $$\displaystyle x^2 + bx + (\frac{b}{2}$$^2 - (\frac{b}{2}\)^2 + c\)

You see how the expression $$\displaystyle (\frac{b}{2}$$^2\) has been added and subtracted, which doesn't change the expression at all. Notice also that the first three terms form the expansion of $$\displaystyle (x + \frac{b}{2}$$^2\), so the expression becomes:

$$\displaystyle (x + \frac{b}{2}$$^2 + c - (\frac{b}{2}\)^2\)