Suppose $A,B,C$ are real numbers, with $A\neq 0$, and suppose

 $Ax^{2}+Bx+C=0.$

Since $A$ is nonzero, we can divide by $A$ and obtain the equation

 $x^{2}+bx+c=0,$

where $b=\frac{B}{A}$ and $c=\frac{C}{A}$. This equation can be written as

 $x^{2}+bx+\frac{b^{2}}{4}-\frac{b^{2}}{4}+c=0,$

so completing the square, i.e., applying the identity $(p+q)^{2}=p^{2}+2pq+q^{2}$, yields

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

Then, taking the square root of both sides, and solving for $x$, we obtain the solution formula

 $\displaystyle x$ $\displaystyle=$ $\displaystyle-\frac{b}{2}\pm\sqrt{\frac{b^{2}}{4}-c}$ $\displaystyle=$ $\displaystyle\frac{B}{2A}\pm\sqrt{\frac{B^{2}}{4A^{2}}-\frac{C}{A}}$ $\displaystyle=$ $\displaystyle\frac{-B\pm\sqrt{B^{2}-4AC}}{2A},$

and the derivation is completed.

A slightly less intuitive but more aesthetically pleasing approach to this derivation can be achieved by multiplying both sides of the equation

 $\displaystyle ax^{2}+bx+c=0$

by $4a$, resulting in the equation

 $\displaystyle 4a^{2}x^{2}+4abx+b^{2}=b^{2}-4ac,$

in which the left-hand side can be expressed as $(2ax+b)^{2}$. From here, the proof is identical.