#### Question

Find the roots of the following quadratic equations (if they exist) by the method of completing the square.

`x^2-(sqrt2+1)x+sqrt2=0`

#### Solution

We have been given that,

`x^2-(sqrt2+1)x+sqrt2=0`

Now take the constant term to the RHS and we get

`x^2-(sqrt2+1)x=-sqrt2`

Now add square of half of co-efficient of ‘*x*’ on both the sides. We have,

`x^2-(sqrt2+1)x+((sqrt2+1)/2)^2=((sqrt2+1)/2)^2-sqrt2`

`x^2+((sqrt2+1)/2)^2-2((sqrt2+1)/2)x=(3-2sqrt2)/4`

`(x-(sqrt2+1)/2)^2=(sqrt2-1)^2/2^2`

Since RHS is a positive number, therefore the roots of the equation exist.

So, now take the square root on both the sides and we get

`x-(sqrt2+1)/2=+-((sqrt2-1)/2)`

`x=(sqrt2+1)/2+-(sqrt2-1)/2`

Now, we have the values of ‘*x*’ as

`x=(sqrt2+1)/2+(sqrt2-1)/2=sqrt2`

Also we have,

`x=(sqrt2+1)/2-(sqrt2-1)/2=1`

Therefore the roots of the equation are `sqrt2`and 1.