Condition for $x^4-18x^2+4dx+9=0$ has four real roots Prove that if $x^4-18x^2+4dx+9=0$ has four real roots, Then $d^4 \le 1728$
My try:
obviously the equation should have two unequal negative roots and two repeated positive roots OR vice versa.
Choosing first case here is the rough sketch:

Let the two negative roots are $-p_1, -p_2$ and repeated positive root be $p_3$
where $p_1,p_2,p_3 \gt 0$
Thus we have the polynomial identity as:
$$(x+p_1)(x+p_2)(x-p_3)^2=x^4-18x^2+4dx+9$$
Comparing coefficients we get:
$$p_1+p_2=2p_3 \tag{1}$$
$$p_1p_2=3p_3^2-18\tag{2}$$
$$p_1p_2p_3^2=9\tag{3}$$
$$p_3^2(p_1+p_2)-2p_1p_2p_3=4d\tag{4}$$
From $(2)$ and$ (3)$ we get:
$$\frac{9}{p_3^2}=3p_3^2-18$$
we get:
$$p_3^4-6p_3^2-3=0$$
Since $p_3 \gt 0$ we get
$$p_3=\sqrt{3+2\sqrt{3}}$$
Using $(4)$ we get:
$$2p_3^3-\frac{18}{p_3}=4d$$
From this we get a unique value of $d$
But how proof is to be done, what went wrong in my analysis? 
 A: Your approach can be made rigorous.  Let $P_d(x)=x^4-18x^2+4dx+9$.  The sum of the roots of $P_d$ is $0$ and the product is $9$, so if all the roots are real, there must be two positive roots and two negative roots.  Now if you can find a value $a$ such that $P_a$ has a positive double root, it follows that $P_a(x)\geq 0$ for all $x\geq 0$ (since by considering the sum and product of the roots, there can be no other positive roots, so $P_a$ never changes sign on $[0,\infty)$).  It follows that for any $d>a$, $P_{d}(x)>0$ for all $x\geq 0$, so $P_{d}$ cannot have any positive roots and thus $P_{d}$ cannot have four real roots.  Similarly, if you can find $b$ such that $P_b$ has a negative double root, then $P_d$ cannot have four real roots for any $d<b$.
To conclude that $d^4\leq 1728$ whenever $P_d$ has four real roots, then, it suffices to show there is a positive double root when $d=\sqrt[4]{1728}$ and a negative double root when $d=-\sqrt[4]{1728}$.  You have already done most of the work of the first statement; the value of $d$ you have found is $\sqrt[4]{1728}$ so you just have to show there really do exist $p_1$ and $p_2$ that work with $p_3=\sqrt{3+2\sqrt{3}}$ and $d=\sqrt[4]{1728}$ (which essentially amounts to observing that your equations $(1)$ and $(2)$ say $p_1$ and $p_2$ are the roots of a certain quadratic determined by $p_3$, so given $p_3$ you can always find such $p_1$ and $p_2$).  You can then do a similar analysis in the case of a negative double root.
Alternatively, you can simply compute the discriminant of $P_d$ which turns out to be $6912(1728-d^4)$ so $P_d$ has a repeated root for $d=\pm\sqrt[4]{1728}$.  We could check that the double root is positive for $d=\sqrt[4]{1728}$ and negative for $d=-\sqrt[4]{1728}$, but we actually don't need to.  Indeed, suppose that $P_{\sqrt[4]{1728}}$ does not have a positive double root.  Then it has either a nonreal double root or a negative double root.  If $P_{\sqrt[4]{1728}}$ has a nonreal double root, then $P_{\sqrt[4]{1728}}$ has no real roots so it is always positive, and so the same reasoning as in the first paragraph shows that $P_d$ does not have four real roots for any $d>\sqrt[4]{1728}$.  If $P_{\sqrt[4]{1728}}$ had a negative double root, then $P_d$ would have no negative roots for all $d<\sqrt[4]{1728}$, and in particular $P_{-\sqrt[4]{1728}}$ would have no negative roots.  Thus the double root of $P_{-\sqrt[4]{1728}}$ would have to be positive or nonreal, and in either case as above we conclude that $P_d$ does not have four real roots for any $d>-\sqrt[4]{1728}$.  We thus conclude that no matter what sort of double root $P_{\sqrt[4]{1728}}$ has, $P_d$ does not have four real roots for any $d>\sqrt[4]{1728}$.  Similar reasoning shows $P_d$ does not have four real roots for any $d<-\sqrt[4]{1728}$.
A: Here is an alternative approach to the original question. As you have reasoned, it is helpful to solve for the $d$ that make $f(x)=x^4-18x^2+4dx+9$ have a repeated root. If $f$ has a repeated root, then the gcd of $f$ and $f'$ also shares that root. 
We have $f'(x)=4x^3-36x+4d=4\left(x^3-9x+d\right)$.
We look for a linear combination of $f$ and $f'$ that is just a linear polynomial. Starting with $$\left(-x^2+Ax+B\right)\frac{f'(x)}{4}+\left(x+C\right)f(x)=mx+b$$ 
we slowly deduce values for $A,B,C$ and find
$$\left(-x^2-\frac{d}{3}x+9\right)\left(x^3-9x+d\right)+\left(x+\frac{d}{3}\right)\left(x^4-18x^2+4dx+9\right)=\left(d^2-72\right)x+12d$$
Since we are assuming there is a repeated root, it must be the root of this linear polynomial, $\frac{12d}{72-d^2}$.
So $\frac{1}{4}f'\mathopen{}\left(\frac{12d}{72-d^2}\right)\mathclose=0$.
$$\begin{align}
\left(\frac{12d}{72-d^2}\right)^3-9\left(\frac{12d}{72-d^2}\right)+d&=0\\
(12d)^3-108d\left(72-d^2\right)^2+d\left(72-d^2\right)^3&=0\\
-d\left(d^6-108d^4-1728d^2+186624\right)&=0\\
-d\left(d^2-108\right)\left(d^4-1728\right)&=0
\end{align}$$
So (assuming we are searching for the positive $d$) either $d=\sqrt{108}$ or $d=\sqrt[4]{1728}$. The first would mean $-\sqrt{12}$ is the common root of $f$ and $f'$. But try this for $x$ in $f(x)$ (with $d=\sqrt{108}$) and it does not give $0$.
Therefore $d=\sqrt[4]{1728}$. From here you already have the reasoning for why $\lvert d\rvert\leq\sqrt[4]{1728}$ is the general condition for four real roots.
