# Proving an alternate quadratic formula [duplicate]

It is well known that the quadratic formula for $ax^2+bx+c=0$ is given by$$x=\dfrac {-b\pm\sqrt{b^2-4ac}}{2a}\tag1$$ Where $a\ne0$. However, I read somewhere else that given $ax^2+bx+c=0$, we have another solution for $x$ as$$x=\dfrac {-2c}{b\pm\sqrt{b^2-4ac}}\tag2$$ Where $c\ne0$. In fact, $(2)$ gives solutions for $0x^2+bx+c=0$!

Question:

1. How would you prove $(2)$?
2. Why is $(2)$ somewhat similar to $\dfrac 1{(1)}$ but with $2a$ replaced with $-2c$?
• First of all, your equation (1) is incorrect -- it should have an $a$ in the denominator. Second, try multiplying both the numerator and denominator of (1) by $-b \mp \sqrt{b^2 - 4ac}$ and watch things in the numerator cancel. – mweiss Jan 19 '17 at 22:29
• It may be saying a few words about why anyone would want such a formula. If your equation is close to not being quadratic -- i.e., $a$ is small relative to the other coefficients -- then typically there is one root "near to infinity" and one other. This can happen, e.g., when what you have is a more or less linear function with a small perturbation. The root "near infinity" is then often unwanted, e.g. because the quadratic function is an approximation that only applies for "reasonable" values of x. [... continues] – Gareth McCaughan Jan 20 '17 at 12:50
• In this situation, you don't want to be using equation (1) because it calculates the "reasonable" root as [(big thing)-(nearby big thing)]/(small thing). For instance, suppose your equation is $10^{-4}x^2+x-1=0$; clearly this has a root near 1, and equation (1) finds it as $\frac{-1+\sqrt{1.0004}}{0.0002}$. So the effect of any rounding error in the calculations is magnified. Using equation (2) avoids this; it instead does $\frac{2}{1+\sqrt{1.0004}}$. If I make it $10^{-12}$ instead of $10^{-4}$ then on my computer (1) gets the answer wrong by 0.00002 or so but (2) is fine. – Gareth McCaughan Jan 20 '17 at 13:06

You can write $ax^2+bx+c=0$ as $a+b(\frac 1x)+c(\frac 1x)^2=0,$ solve for $\frac 1x$, then invert it. You can have the minus sign top or bottom as you like by multiplying top and bottom by $-1$

Take (2), and rationalize the denominator:

$$\frac{-2c}{b \pm \sqrt{b^2-4ac}} = \frac{-2c}{b \pm \sqrt{b^2-4ac}}\frac{b \mp \sqrt{b^2-4ac}}{b \mp \sqrt{b^2-4ac}} =$$ $$\frac{-2c(b\mp\sqrt{b^2-4ac})}{b^2-(b^2-4ac)} = \frac{-b \mp \sqrt{b^2-4ac}}{2a}$$

• Is there a way to start with $ax^2+bx+c$ and derive $(2)$? – Frank Jan 19 '17 at 22:36
• Ross Millikan did so in his answer. – florence Jan 19 '17 at 22:37
• To prove (1) just use completing the square and then reverse the steps given here to get from (1) to (2). – nurdyguy Jan 19 '17 at 22:41

Just for the fun trivia, here are some other "quadratic formulas" $(a>0):$

for $|\frac{b^2}{2a}-2c-1|\le1:$

$$x=-\frac b{2a}\pm\frac1{\sqrt a}\cos\left(\frac12\arccos\left(\frac{b^2}{2a}-2c-1\right)\right)$$

for $\frac{b^2}{2a}-2c-1>1:$

$$x=-\frac b{2a}\pm\frac1{\sqrt a}\cosh\left(\frac12\operatorname{arccosh}\left(\frac{b^2}{2a}-2c-1\right)\right)$$

You can play around with some graphs here if you want.

• Sorry for being a bit out of area, but this didn't fit in the comments. – Simply Beautiful Art Jan 19 '17 at 23:01
• And before some asks, these are derived from the double angle formulas. – Simply Beautiful Art Jan 19 '17 at 23:06

There are a few errors in the question as posed.

First, the quadratic formula is $$x = \frac{-b \pm \sqrt {b^2-4ac} }{2a}$$ Note the factor of $a$ in the denominator, missing from the OP. [EDIT -- I see this has been fixed now.]

Second, you write:

In fact, (2) gives solutions for $0x^2+bx+c=0$!

This is not true, and does not even make sense. The equation $0x^2+bx+c=0$ is equivalent to $bx = -c$, whose only solution is $x=-c/b$ (assuming $b\ne 0$).

In any case, to turn (1) into (2), just multiply by $-b \mp \sqrt{b^2-4ac}$ in both the numerator and the denominator:

$$x = \frac{-b \pm \sqrt {b^2-4ac} }{2a} \cdot \frac{-b \mp \sqrt{b^2-4ac}}{-b \mp \sqrt{b^2-4ac}}$$ The numerator now has the form $(X \pm Y)(Y \pm X)$, which simplifies to just $X^2-Y^2$. So we have $$x = \frac{1}{2a} \frac{ \left( -b \right)^2 - \left(b^2-4ac\right)}{-b \mp \sqrt{b^2-4ac}}$$ Cleaning up, the $(-b)^2-b^2$ in the numerator cancels out; the $2a$ in the denominator reduces against the $4ac$ in the numerator, leaving just $2c$; and you can move a negative sign out of the denominator and into the numerator, giving the alternative form of the quadratic formula you wanted.

Why is (2) somewhat similar to $\frac{1}{(1)}$ but with $2a$ replaced with $−2c$?
As Ross Millikan says in his answer, if in the original equation $ax^2 + bx + c =0$ we assume that $x=0$ is not a solution (which is equivalent to assuming that $c\ne 0$), then we can divide the entire equation through by $x^2$, obtaining $$c \left(\frac{1}{x}\right)^2 + b\left(\frac1x\right) + a = 0$$ If we set $u=\frac1x$, then this is $cu^2 + bu + a = 0$, and the quadratic equation tells us $$u = \frac{ - b \pm \sqrt{b^2 - 4ac} }{2c}$$ Finally we get $$x = \frac{2c}{-b \pm \sqrt{b^2-4ac}}$$ and you can pull the negative sign out of the denominator into the numerator. So the reason the equations are so similar is because of a duality in the equation: interchanging $a$ with $c$ and simultaneously replacing $x$ with $1/x$ changes one quadratic equation into an equivalent one.
• What is meant by that $0x^2 + bx + c$ statement is that when $a = 0$, the quadratic formula simply fails. However in the other version, letting $a = 0$ gives $-\frac cb$ as one of its solutions (the other being infinite). – Paul Sinclair Jan 20 '17 at 5:22
• Oh, I see. In other words, "This alternate formula works in the case $a=0$, where the standard formula fails." Of course, the opposite could be said about the case $c=0$; this is really just a manifestation of the duality I explain in the last paragraph. – mweiss Jan 20 '17 at 5:24
• It doesn't fail completely when $c = 0$, since it gives $0$ as one solution. However I agree with you overall. I just wanted to point out what does make sense about the original statement (or would if it had been more clearly stated). The real usefulness of the citardauq formula is for numeric stability of the smaller root, and even that can be obtained by instead using $r_2 = \frac c{ar_1}$ after finding the larger root $r_1$ by the quadratic formula.. – Paul Sinclair Jan 21 '17 at 0:26