In Algebra we learned the solution to the quadratic equation

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

is

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

But, if you are like me, we did not learn how to derive that solution. Read on to see one approach.

## Simplify

To start, simplify the quadratic equation by dividing both sides by 'a'. This does not change the values of x that solve this equation. The equeation becomes

$x^{2}+(b/a)x+c/a=0$

Replace b/a with B and c/a with C, so now we are looking for the solution to the following.

$x^{2}+Bx+C=0$

## Factoring

$x^{2}+Bx+C=0$

can be factored to

$(x-k_{1})*(x-k_{2})=0$

where $k_{1}$ and $k_{2}$ are the two solution values for x. Multiplying this out, we have

$x^{2}+(-k_{1}-k_{2})x+k_{1}k_{2}=0$

So, to derive the solution to the simplified quadratic equation, we need to solve the following simultaneous equations for $k_{1}$ and $k_{2}$ as a function of B and C.

$B=-k_{1}-k_{2}$
$C=k_{1}*k_{2}$

## First Try

This looks easy. Lets solve for $k_{1}$ using the first equation, and substitute the solution for $k_{1}$ into the second equation.

$C=(-B-k_{2})*k_{2}$

simplifying, we have

$k_{2}^{2}+Bk_{2}+C=0$

Oh no, we are back to solving the original problem. This approach is a dead end.

## Second Try

Remember, we are trying to solve the following equations for $k_{1}$ and $k_{2}$:

$B=-k_{1}-k_{2}$
$C=k_{1}*k_{2}$

Let's create a new equation by squaring both sides of the first equation and then substituting C for $k_{1}*k_{2}$.

$B^{2}=k_{1}^{2}+k_{2}^{2}+2k_{1}k_{2}$
$B^{2}-2C=k_{1}^{2}+k_{2}^{2}$

And, now let's solve these 2 equations using geometry.

$B^{2}-2C=k_{1}^{2}+k_{2}^{2}$
$k_{2}=-k_{1}-B$

Referring to the following diagram, the blue triangle represents the first equation, and the green line represents the second.

Regarding this daigram, we know what P and Q are. This leads to R, which leads to S, which leads finally to $k_{2}$.

$P^{2}=k_{1}^{2}+k_{2}^{2}=B^{2}-2C$
$Q^{2}=B^{2}/2$
$R={\sqrt {P^{2}-Q^{2}}}={\sqrt {B^{2}-2C-B^{2}/2}}={\sqrt {B^{2}/2-2C}}$
$S={\sqrt {B^{2}/2-2C}}/{\sqrt {2}}$
$k_{2}=-B/2-{\sqrt {B^{2}/2-2C}}/{\sqrt {2}}$

This can be simplified to

$k_{2}={\frac {-B-{\sqrt {B^{2}-4C}}}{2}}$

$k_{1}$ can be determined from $k_{2}$

$k_{1}=-B-k_{2}={\frac {-2B}{2}}-{\frac {-B-{\sqrt {B^{2}-4C}}}{2}}$
$k_{1}={\frac {-B+{\sqrt {B^{2}-4C}}}{2}}$

We now have the two values of x that solve the simplified quadratic equation.

$x^{2}+Bx+C=0$
$x={\frac {-B\pm {\sqrt {B^{2}-4C}}}{2}}$

Replacing B with b/a, and C with c/a we have the solution to the quadratic equation

$ax^{2}+bx+c=0$
$x={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}$