Quadratic equation

A quadratic equation is any equation in the following form:
ax²+bx+c=0
It can be solved easily with the following formula:

    $$x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$

Proof
ax^2+bx+c=0
4a^2x^2+4abx+4ac=0 (Multiply by 4a)
4a^2x^2+4abx+b^2-b^2+4ac=0 (add b²-b²)
(2ax+b)^2=b²-4ac (4a^2x^2+4abx+b^2=(2ax+b)^2)
2ax+b=\pm\sqrt{b^2-4ac}
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

If b is even then you can simplify it even further:
b=2b’

    $$x_{1,2}=\frac{-b'\pm\sqrt{b'^2-ac}}{a}$$

Proof
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
x=\frac{-2b'\pm\sqrt{4b'^2-4ac}}{2a}
x=\frac{-2b'\pm\sqrt{4(b'^2-ac)}}{2a}
x=\frac{-2b'\pm2\sqrt{b'²-ac}}{2a}
x=\frac{2(-b'\pm\sqrt{b'²-ac})}{2a}
x=\frac{-b'\pm\sqrt{b'²-ac}}{a}

If you only need to know the sum/product of a quadratic equation:
s=x_1+x_2=-\frac{b}{a}
p=x_1x_2=\frac{c}{a}

If you were only given the sum and product you can use the following equation to convert to a quadratic equation:
x^2-sx+p=0
Which gives the following solution:
x_{1,2}=\frac{s\pm\sqrt{s^2-4p}}{2}

To determine the maximum/minimum value of a quadratic equation:
\alpha=-\frac{b}{2a}
\beta=\frac{4ac-b^2}{4a}=-\frac{D}{4a}
a(x-\alpha)^2+\beta=a(x^2-2\alpha x+\alpha^2)+\beta=a^2-2a\alpha x+a\alpha^2+\beta

Try it yourself:
x² + x + = 0

Output: