how do you solve by compleing the square?
You have an equation such as ax^2 + bx + c = 0.
Move the c term to the right side of the equation,
by addition or subtraction: ax^2 + bx = -c.
Divide by the co-efficient of the x^2 term: x^2 + b/a x = -c/a
Take half of the x co-efficient and square it: ((b/a) / 2)^2 = (b/2a)^2
Add that to both sides of the equation: x^2 + b/a x + (b/2a)^2 = -c/a + (b/2a)^2
You can easily factor the left side of the equation: (x + b/2a)(x + b/2a)
The equation is now: (x + b/2a)(x + b/2a) = -c/a + (b/2a)^2
Take the square root of both sides: (x + b/2a) = ±√ [-c/a + (b/2a)^2]
Move the b/2a constant to the right side of the equation, again
by either addition or subtraction: x = ±√ [-c/a + (b/2a)^2] - b/2a
Remember that the square root you obtained on the right side of the
equation must be a positive value and a negative value. In the end,
you have two equations for x:
x = √ [-c/a + (b/2a)^2] - b/2a and x = -√ [-c/a + (b/2a)^2] - b/2a