Take [math]a*x^2 + b*x +c = 0[/math]
Then
=>[math]x^2 + \frac{b}{a} x + \frac{c}{a} = 0[/math]
=>[math]x^2 + \frac{2b}{2a} x + \frac{c}{a} = 0[/math]
=>[math]x^2 + \frac{2b}{2a} x + (\frac{b}{2a})^2 + \frac{c}{a} - ( (\frac{b}{2a})^2 = 0[/math] -(1)
We have it in the form of [math]x^2 + 2px + p^2 + q = 0[/math]
which is [math](x+p)^2 + q = 0[/math]
Thus (1) becomes
[math](x + (\frac{b}{2a} ))^2 + \frac{c}{a} - (\frac{b}{2a})^2 = 0[/math]
[math](x + (\frac{b}{2a}))^2 = (\frac{b}{2a})^2 - \frac{c}{a}[/math]
[math]x + \frac{b}{2a} = \pm \sqrt((\frac{b}{2a})^2 - \frac{c}{a})[/math]
[math]x = -\frac{b}{2a} \pm \sqrt((\frac{b}{2a})^2 - \frac{c}{a})[/math]
[math]x = -\frac{b}{2a} \pm \sqrt(\frac{b^2 - 4ac}{4a^2})[/math]
[math]x = -\frac{b}{2a} \pm \frac{\sqrt(b^2 - 4ac)}{2a}[/math]
[math]x = \frac{-b \pm \sqrt(b^2 - 4ac)}{2a} [/math]