Suppose we have a quadratic, $$ax^2+bx+c=0$$ . We can solve for $$x$$ by completing the square and manipulating the equation as follows:

$ax^2+bx+c=0$

$a\left(x^2+\frac{b}{a}x\right)+c=0$

$\left(x^2+\frac{b}{a}x\right)+\frac{c}{a}=0$

$\left(x+\frac{b}{2a}\right)^2-\frac{b^2}{4a^2}+\frac{c}{a}=0$

$\left(x+\frac{b}{2a}\right)^2=\frac{b^2}{4a^2}-\frac{c}{a}$

$\left(x+\frac{b}{2a}\right)^2=\frac{b^2-4ac}{4a^2}$

$x+\frac{b}{2a}=\pm \sqrt{\frac{b^2-4ac}{4a^2}}$

$x=-\frac{b}{2a} \pm \sqrt{\frac{b^2-4ac}{4a^2}}$

$x=-\frac{b}{2a} \pm \frac{ \sqrt{b^2-4ac}}{2a}$

$\therefore x=\frac{ -b \pm \sqrt{b^2-4ac} }{2a}$