A "new" general formula for the quadratic equation?

This is a very useful formula for when you want to accurately find the roots of a quadratic equation in which $a$ might be very small using finite precision arithmetic (e.g. on a computer). It's something I have used occasionally in programming. Sometimes it is called the "Citardauq formula" since it's sort of the quadratic formula, but backwards.

When $a$ is really small and $b$ is positive, the formula $$\frac{-b +\sqrt{b^2 - 4ac}}{2a}$$ might involve adding $-b$ and $\sqrt{b^2-4ac}$ which is about $b$ - meaning that most of the significant figures cancel with each other - this causes a loss of significance in a floating point calculation (bad). Worse, then you go and divide this small result by $2a$ which means that if you were using a fixed point calculation, you've now suffered a loss of significance - either way, you could end up keeping track of lots of digits in the intermediate values and still get an inaccurate answer. Plus, this gives the impression that the exact value $a$ matters a ton since we divided by it, but if $b$ is really large and $a$ really small, the root of the quadratic closer to $0$ might not depend very much on $a$ - the quadratic would basically be linear near $0$ - despite what this formula suggests. (Of course, this formula accurately depicts the other root: if $a$ is small, its exact value does massively influence where the further root is).

On the other hand, the equivalent value $$\frac{2c}{-b - \sqrt{b^2 - 4ac}}$$ likely suffers from neither problem: the value of $\sqrt{b^2-4ac}$ is not cancelling with $-b$ but rather adding to it, which does cause an undue loss of precision - and we are probably not dividing two small numbers, unless $c$ and $b$ were both small. Note that you can mix and match these formulas, noting that the $+$ case of one is the $-$ case of the other for the $\pm$ term. This form also makes what happens in the limiting case where $a$ goes to $0$ clear - it just decays to $\frac{c}{-b}$ - and sometimes the root of a quadratic that you care about is mostly determined by this linear term anyways (e.g. if you wanted to know when a ball thrown quickly at the ceiling would hit it - the other formula references this time off of when the ball would reach its apex, which may be long after it would reach the ceiling. This formula respects that the answer is just "a bit longer than if there were no gravity").

As a result of numerical stability, it tends to not be unreasonable to list the roots of a quadratic with $b>0$ as: $$\frac{2c}{-b - \sqrt{b^2 - 4ac}} \text{ and }\frac{-b -\sqrt{b^2 - 4ac}}{2a}$$ since these forms avoid the loss of precision that happens when adding a term near $b$ to $-b$. For negative $b$, you would want to flip the signs of the added radical to avoid the cancellation. This is also sort of cute because it makes the fact that the product of the roots is $\frac{c}a$ more obvious, whereas the usual formula emphasizes that their sum is $\frac{-b}a$.

It's worthy of note that you can also derive this formula by starting with $$ax^2+bx+c=0$$ dividing by $x^2$ to get $$a+b(1/x)+c(1/x)^2 = 0$$ which is a quadratic in $1/x$. Solving for $1/x$ using the usual formula and then reciprocating that gives the formula you list. Generally, if you exchange the order of the coefficients in a polynomial, you reciprocate its roots, which is an often useful abstract fact.


What's interesting here isn't your result, it's your technique.

Ask a typical algebra teacher, "What's important about the quadratic formula?", they'll probably say, "The fact that it lets you find the roots of a quadratic through a simple calculation."

Ask a mathematician the same question and she'll probably just say, "The discriminant". The discriminant shows up in higher math in all kinds of incredible ways, and the quadratic formula is the first place a student ever encounters it. For the expert, the really important information isn't the raw answers the formula provides but the structure of the elements within the formula.

Your formula gives a simple example of how the structure of a formula can provide a new (though elementary) insight. In the traditional version, the "a" in the denominator tells us that the formula only applies to quadratics with non-zero "a" values. Frankly, that's no insight at all. But your version, with c in the numerator, tells us instantly that if c=0, zero is a root of the equation. That's a useful fact. Granted, you can easily reach the same conclusion by factoring the original equation, but your formula makes it blindingly obvious.

What you've done is applied general technique that mathematicians (and especially physicist) use all the time. They massage equations in various ways until the form of the equation itself provides useful insights. Indeed, mathematicians don't usually spend much time "solving" equations - the important insights almost always come from manipulating equations until they reveal their deeper secrets.


Assuming neither $a$ nor $c$ are zero (so that $-b\pm\sqrt{b^2-4ac}$ does not equal $-b\pm|b|$, which could then be equal to zero), we can also obtain your formula by an “rationalization of the numerator” of the usual formula. E.g., $$\begin{align*} \frac{-b+\sqrt{b^2-4ac}}{2a} &= \left(\frac{-b+\sqrt{b^2-4ac}}{2a}\right)\left(\frac{-b-\sqrt{b^2-4ac}}{-b-\sqrt{b^2-4ac}}\right)\\ &= \frac{b^2 - (b^2-4ac)}{2a\left(-b-\sqrt{b^2-4ac}\right)} = \frac{4ac}{2a\left(-b-\sqrt{b^2-4ac}\right)} \\ &= \frac{2c}{-b-\sqrt{b^2-4ac}}. \end{align*}$$ And similarly, starting with the minus sign for the radical instead, we get $$\frac{2c}{-b+\sqrt{b^2-4ac}}.$$

This does not mean what you are doing is wrong; it’s correct (as noted by others already). I’m just pointing out that the expressions are in fact the same, provided $ac\neq 0$, which can be verified directly using the same basic algebra “trick” often used to get rid of a radical in a fraction, or when you prefer your radical in the denominator/numerator rather than the numerator/denominator.