Quadratic equation

Quadratic equation
General form
 * $$x^2 + \frac{b}{a} x + \frac{c}{a}=0.$$

Derivation of the formula
The quadratic formula can be derived with a simple application of technique of completing the square.Divide the quadratic equation by $a$, which is allowed because $a$ is non-zero:
 * $$x^2 + \frac{b}{a} x + \frac{c}{a}=0.$$

Subtract $c⁄a$ from both sides of the equation, yielding:
 * $$x^2 + \frac{b}{a} x= -\frac{c}{a}.$$

The quadratic equation is now in a form to which the method of completing the square can be applied. Thus, add a constant to both sides of the equation such that the left hand side becomes a complete square:


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

which produces:


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

Accordingly, after rearranging the terms on the right hand side to have a common denominator, we obtain:


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

The square has thus been completed. Taking the square root of both sides yields the following equation:


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

Isolating $x$ gives the quadratic formula:


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

The plus-minus symbol "±" indicates that both


 * $$ x=\frac{-b + \sqrt {b^2-4ac}}{2a}\quad\text{and}\quad x=\frac{-b - \sqrt {b^2-4ac}}{2a}$$

are solutions of the quadratic equation. There are many alternatives of this derivation with minor differences, mostly concerning the manipulation of $a$.

Some sources, particularly older ones, use alternative parameterizations of the quadratic equation such as $ax^{2} − 2bx + c = 0$ or $ax^{2} + 2bx + c = 0$, where $b$ has a magnitude one half of the more common one. These result in slightly different forms for the solution, but are otherwise equivalent.

A lesser known quadratic formula, as used in Muller's method, and which can be found from Vieta's formulas, provides the same roots via the equation:


 * $$x=\frac{2c}{-b\mp\sqrt{b^2-4ac}}.$$