The derivation of the quadratic formula is done using completing the square as shown below.
Given a quadratic equation: [tex]a x^{2} +bx+c=0[/tex].
Make the coefficient of [tex]x^2[/tex] to be 1 by dividing through by a, to get [tex]x^2+ \frac{b}{a} x+ \frac{c}{a} =0[/tex].
Next, take the constant term (the term with no x) to the other side of the equation to get [tex] x^{2} + \frac{b}{a} x=- \frac{c}{a} [/tex].
Then add to both sides of the equation, the square of half the coefficient of x, to get:
[tex] x^{2} + \frac{b}{a} x+\left( \frac{1}{2}\cdot \frac{b}{a} \right)^2=- \frac{c}{a} +\left( \frac{1}{2}\cdot \frac{b}{a} \right)^2 \\ \\ \Rightarrow x^2+ \frac{b}{a} x+ \frac{b^2}{4a^2} =- \frac{c}{a} +\frac{b^2}{4a^2}[/tex]
Next, we factorize the left hand side to get [tex]\left(x+ \frac{b}{2a} \right)^2 =- \frac{c}{a} +\frac{b^2}{4a^2}[/tex].
Then, we take the square root of both sides to get:
[tex]\sqrt{\left(x+ \frac{b}{2a} \right)^2} =\sqrt{- \frac{c}{a} +\frac{b^2}{4a^2}} \\ \\ \Rightarrow x+ \frac{b}{2a}=\pm\sqrt{ \frac{b^2-4ac}{4a^2} }=\pm \frac{ \sqrt{b^2-4ac }}{2a} [/tex]
Finally, solve for x, to get:
[tex]x=- \frac{b}{2a}\pm \frac{ \sqrt{b^2-4ac }}{2a} \\ \\ \Rightarrow x= \frac{-b\pm\sqrt{b^2-4ac}}{2a} [/tex]