To solve a quadratic equation by the method of completing square is illustrated through the following examples.

### Example

Solve the equation *x ^{2} − 3x − 4 = 0* by completing square.

### Solution:

*x ^{2} − 3x − 4 = 0 (i)*

Shifting constant term −4 to the right, we have

*x ^{2} − 3x = 4 (ii)*

Adding the square of 1⁄2 × coefficient of x, that is,

(−3⁄2)^{2} on both sides of equation (ii), we get

*x ^{2} − 3x + (−3⁄2)^{2} = 4 + (−3⁄2)^{2} (ii)*

As x^{2} **− 3x** + (−3⁄2)^{2} = x^{2} **− 1⁄2 × x × 3⁄2** + (−3⁄2)^{2} = (x−3⁄2)^{2}, so we have

*(x−3⁄2) ^{2} = 4 + 9⁄4 = 4 + (16 + 9)/4*

*(x−3⁄2) ^{2} = 25⁄4*

Taking square root of both sides of the above equation,

*√(x−3⁄2) ^{2} = ±√(25⁄4)*

⇒ *x−3⁄2 = ± 5⁄2 or x = 3⁄2 ± 5⁄2*

Either *x = 3⁄2 + 5⁄2 = (3 + 5)/2 = 8⁄2 = 4 or x = 3⁄2 − 5⁄2 = (3 – 5)/2 = −2⁄2 = −1
*

∴ 4, −1 are the roots of the given equation.

Thus, the solution set is {−1, 4}.