# Where is the order of the variables inside the parentheses coming from?

I'm reading Sawyer's Prelude to Mathematics, here:

I can't understand what's the meaning and application of "condition" here. Also when he gives the example on the cubic equation, stating that the condition is: $$(bc-ad)^2-4(ac-b^2)(bd-c^2)=0$$

I can understand that it is $b^2-4ac=0$ (I hope I'm right with this), I just have no idea on where is the order of the variables inside the parentheses coming from.

1: I noticed that the $b^2-4ac$ can be found here:

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

Which could be found by solving a general form quadratic equation:

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

Then I thought about searching it on the solutions for cubic equations with some help of Mathematica, but I got nothing that was similar to:

$$(bc-ad)^2-4(ac-b^2)(bd-c^2)=0$$

or:

$$a^2d^2-6abcd+4b^3d+4ac^3-3b^2c^2=0$$

With no success. You can see it here:

-
He writes $ax^2+2bx+c=0$ which completing the square gives $a(x+b/a)^2+c-ab^2/a^2=0$ for this to be a perfect square we need $c-b^2/a=0$ or simply $ac-b^2=0$. I guess you understand this part already. I'll have to think about the other part. –  James S. Cook Sep 1 '12 at 19:07
I'm reading the condition $(bc-ad)^2-4(ac-b^2)(bd-c^2)=0$ as the condition for a cubic to have a three-peated root. You say "quadratic" I think this is a typo. –  James S. Cook Sep 1 '12 at 19:10
@James: No. If you look at the example $x^3-x^2$, which has two (not three) repeated roots, you will find that the expression is zero. (And I fixed the "quadratic" typo.) –  TonyK Sep 1 '12 at 19:11
Read the few words just before the condition. This tells where the constants $a$, $b$, $c$, and $d$ come from. As the few sentences before that describe, the author starts by talking about a quadratic equation then changes to talking about a cubic equation. –  Code-Guru Sep 1 '12 at 19:14
@JamesS.Cook I think the "typo" actually points out where the OP is confused. He might have missed that the second condition is for a cubic equation rather than a quadratic one. –  Code-Guru Sep 1 '12 at 19:15

A polynomial has two equal roots when it has a common root with its (formal) derivative. Apply the euclidean algorithm to establish conditions for a common factor. This makes for an easily computable procedure - rather than remembering the equations.

-

Actually, the stated equation ensures that at least two of the roots are equal. Let $x_1$, $x_2$ and $x_3$ be three roots of the cubic $a x^3 + 3 b x^2 + 3 c x+d =0$. Discriminant of the equation: $$D = a^4 (x_1-x_2)^2 (x_2-x_3)^2 (x_1-x_3)^2$$ can be expressed in terms of coefficients of the cubic: $$D = -27 \left(a^2 d^2-6 a b c d+4 a c^3+4 b^3 d-3 b^2 c^2\right)$$ $D$ equals zero when at least two of the roots are equal.

-
Correct, I just worked out the triple root case and got something entirely different only to reread the post and find "repeated root" for the cubic. My mistake. –  James S. Cook Sep 1 '12 at 19:20
@Sasha: Yes, but how do you get from the first expression to the second? I think that this is the OP's question... –  TonyK Sep 1 '12 at 19:29
Please see the wikipedia article. $D$ is defined as a determinant of a matrix, whose elements are expressed in terms of coefficients of the equation. –  Sasha Sep 1 '12 at 19:31

Let $p(x)=x^3+b x^2+c x+d$ have roots $\alpha,\beta,\gamma$. By Vieta's formulas we have

$$\begin{cases}e_1 & =\alpha+\beta+\gamma & =-3b \\ e_2 & =\alpha\beta+\beta\gamma+\gamma\alpha & =~~\,3c \\ e_3 & =\alpha\beta\gamma & = -d.\end{cases}\tag{*}$$

In view of the fundamental theorem of symmetric polynomials, we desire to write the discriminant

$$D(p)=(\alpha-\beta)^2(\beta-\gamma)^2(\gamma-\alpha)^2$$

as a polynomial $F(e_1,e_2,e_3)$ in the first three elementary symmetric polynomials. I touched on a recursive procedure for doing this in an answer here. Begin by setting $\gamma=0$ to get

$$(\alpha-\beta)^2\beta^2\alpha^2=(\bar{e}_1^2-4\bar{e}_2)\bar{e}_2^2$$

where $\bar{e}_1=\alpha+\beta$ and $\bar{e}_2=\alpha\beta$. We expand out the difference and recombine to get (thanks, W|A)

$$D(p)-(e_1^2-4e_2)e_2^2$$ $$=6\underbrace{\alpha\beta\gamma}_{\large e_3}\big(\,\underbrace{\alpha\beta(\alpha+\beta)+\beta\gamma(\beta+\gamma)+\alpha\gamma(\alpha+\gamma)}_{g}\,\big)-4\underbrace{\alpha\beta\gamma}_{\large e_3}(\underbrace{\alpha^3+\beta^3+\gamma^3}_{\large p_3})+3\underbrace{\alpha^2\beta^2\gamma^2}_{\large e_3^2}$$

The power sum polynomial $p_3=e_1^3-3e_2e_1+3e_3$ is already computed here thankfully, so we only need to worry about the polynomial $g$ labelled above. Then we compute the new difference $g-e_1e_2=-3e_3$ and we're pretty much good to go at this point: $g=e_1e_2-3e_3$ and so

$$D(p)=(e_1^2-4e_2)e_2^2+6e_3(e_1e_2-3e_3)-4e_3(e_1^3-3e_1e_2+3e_3)+3e_3^2.$$

We could have also used Mathematica's SymmetricReduction command to expediate the process and not do any hand computations. Plugging in $(*)$ we get

$$b^2c^2-4c^3-27d^2+18bcd-4db^3 \tag{\circ}$$

We may re-homogenize $(\circ)$ by substituting $b\mapsto b/a,c\mapsto c/a,d\mapsto d/a$ and then multiplying by $a^4$, in which case we get the formula on Wikipedia's discriminant article. If we then divide by $27$ and then apply the substitutions $b\mapsto 3b,c\mapsto3c$ we get the formula presented in the text.

There should it seems be a good theoretical reason why the polynomials

$$ax^3+3bx^2+3cx+d\qquad\&\qquad \begin{vmatrix}a&b\\b&c\end{vmatrix}x^2+\begin{vmatrix}b&d\\a&c\end{vmatrix}x+\begin{vmatrix}b&c\\c&d\end{vmatrix} \tag{\bullet}$$

have the same discriminant up to a constant independent of $a,b,c,d$, however it escapes me for now. (And probably such a reason was why the author expressed the condition how they did.)

-
Eh, I should amend my last statements. As the other two answers get at, we can relate the discriminant with the resultant $R(p,p\,')$ and then use a Sylvester matrix for the latter. I will try to think about this more later and tie it all together. –  anon Sep 2 '12 at 3:23

Any cubic polynomial with roots $r$, $s$, $t$ has the form $$k(x-r)(x-s)(x-t) = k x^3 - k x^2 ( r + s + t ) + k x ( r s + s t + t r ) - k r s t$$ for some $k \ne 0$. If we're taking that polynomial to be $a x^3 + 3 b x^2 + 3 c x + d$, then certainly $a=k$ so we won't bother using "$k$" further; also, by equating the remaining coefficients, $$3 b = - a (r+s+t) \qquad 3 c = a (rs+st+tr) \qquad d = -a rst$$

If the cubic two equal roots ---say $s=t$--- then $$3 b = - a (r+2s) \qquad 3 c = a s(2r+s) \qquad d = -a rs^2$$

Now, consider "the condition" that Sawyer proposes: $$(bc-ad)^2-4(ac-b^2)(bd-c^2)=0$$

If you'd be satisfied knowing that the condition does what Sawyer claims, then you can simply apply it to our $a$, $b$, $c$, $d$ and what what happens. Note

\begin{align} bc-ad &= -\frac{1}{9}a^2s(r+2s)(2r+s)+a^2rs^2 = -\frac{2}{9}a^2s\left(r-s\right)^2 \\ ac-b^2 &= \frac{1}{3}a^2s(2r+s)-\frac{1}{9}a^2(r+2s)^2 = -\frac{1}{9}a^2\left(r-s\right)^2 \\ bd-c^2 &= \frac{1}{3} a^2rs^2(r+2s)-\frac{1}{9}a^2s^2(2r+s)^2 = -\frac{1}{9}a^2s^2\left(r-s\right)^2 \end{align} so that $$(bc-ad)^2-4(ac-b^2)(bd-c^2) = \frac{4}{81} a^4 s^2\left(r-s\right)^4-\frac{4}{81} a^4 s^2\left(r-s\right)^4 = 0$$

That is, the condition is a somewhat magical relation that combines the coefficients ---which depend on $r$ and $s$--- in just the right way to make everything vanish. That, at least, explains the purpose of the condition; the derivation of the condition, on the other hand, is something of a mess. The powerful concepts of discriminant and (my favorite tool) resultant give high-level views that nicely blur the details, but if you aren't familiar with those ---or just want to try brute force--- how might you proceed?

Well, you can view the expressions for $a$, $b$, $c$, $d$ as a system of three equations in just two parameters $r$ and $s$. Because the system is over-determined, the coefficients cannot be free agents; they must be related somehow. Eliminating $r$ and $s$ from the system is the way to find the relation.

For starters, note that the last equation tells us that $r = -d/a/s^2$; substituting into the first two equations gives: $$3 b s^2 = d-2as^3 \qquad 3 c s = -2 d + as^3$$

And then all we have to do is eliminate $s$ ... which gets back to the mess I mentioned. I'd normally invoke the method of resultants (with the aid of Mathematica), which automates the required clever algebra, but that's as unmotivating as pulling the discriminant out of the air. For now, I'll leave this as a challenge, and will update this answer once can bring myself to TeX-up the steps.

Okay, here's an elementary (though long and drawn-out) way to eliminate $s$.

Note: The point of this is that it's complicated; it makes you appreciate the machinery of the discriminant and resultant!

Combining the $3bs^2$ equation with twice the $3cs$ equation yields $3bs^2+6cs=-3d$ ... or, better, $$bs^2=-(d+2cs)$$ The best way to think of this equation is that it allows us to re-write second-powers of $s$ in terms of first-powers of $s$, thus reducing an expression's $s$-degree in exchange for increasing its overall size. (In effect, we reduce expressions modulo the polynomial $bs^2+2cs+d$ ... curiously enough, a quadratic with discriminant $4(c^2-bd)$.) So, for instance, returning to the $3cs$ equation, we can multiply-through by $b$ a couple of times, ratcheting the $s$-degree down from $3$ to $1$ by replacing $bs^2$ where it appears ... \begin{align} 3cs=-2d+as\cdot s^2 &\implies 3bcs = -2bd + as \cdot b s^2 \\ &\implies 3bcs = -2bd - as (d+2cs) \\ &\implies 3bcs = - 2 b d - a d s - 2 a c \cdot s^2 \\ &\implies 3b^2cs = - 2 b^2 d - a b d s + 2 a c (d+2cs) \\ &\implies s(3b^2c+abd-4ac^2) = 2d(ac-b^2) \end{align} We've just effectively solved for $s$, although I don't want to divide by its possibly-zero multiplier, which I'll abbreviate $m$ so that $$s m = 2 d(ac-b^2)$$ Going back to the $bs^2$ equation and multiplying-through by $m$ a time or two ... \begin{align} b s^2 = - d - 2 c \cdot s &\implies b s^2 m = - d m - 4 c d (ac-b^2) = bd(bc-ad) \\ &\implies b \cdot s^2 m^2 = bd(bc-ad)m \\ &\implies 4 b d^2 ( b^2 - a c )^2 = bd(bc-ad)m \\ \end{align}

From the last equation, we get $$b^2 d \left( a^2 d^2 - 6 a b c d + 4 b^3 d + 4 a c^3 - 3 b^3 c^2 \right) = 0$$

Ignoring the cases $b=0$ and $d=0$ in general, we find that "the condition" must hold when two roots of a cubic coincide! whew!

(In fact, the cases $b=0$ ---in which $r=-2s$--- and $d=0$ ---in which either $r=0$ or $s=0$--- fall under the umbrella of the condition.)

-