Unfoiling quadratic equation How can I convert $ax^2 + bx + c = 0$ to a FOIL-style $(x + d)(x - e) = 0$ equation?
I have an equation in a computer program that I'm currently solving with the standard $\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.  If the discriminator is negative I end up with an imaginary number solution, and I don't know how to deal with that.  Using the FOIL method seems like a nice alternative for getting two real solutions to x.
Update
Based on the answers here, I realized that I probably made a mistake arriving at the values for $a$, $b$, and $c$.  I went back and re-solved my equation, and ended up with values that are giving me real solutions.
So in summary, getting imaginary results told me I had an incorrect equation.  And now I know a lot more about quadratic equations. Thanks for the help everyone!

If a polynomial has a root $r$ (imaginary or real), then you can pull out a factor of $x-r$. 
For example, to factor $x^2 + 1$, we first find the roots. You can use the quadratic equation for this in general, but it's easy to see in this example that the roots are $i$ and $-i$. This means the polynomial $x^2 + 1$ factors as $(x - i)(x + i)$.
Notice this polynomial has no real solutions. There is no amount of algebraic trickery you can do to get around that fact. Depending on your application, you will either have to accept the imaginary roots or regard the polynomial as having no (real) solutions.
