Factoring a quartic polynomial over the integers with roots that are not integers The quartic polynomial
$$
1728(x - 3) - x^2(12^2 - x^2)
$$
factors "nicely" as
$$
(x^2 - 12x + 72) (x^2 + 12x - 72) = (x^2 - 12x + 72)(x - 6\sqrt{3} + 6)(x + 6\sqrt{3} + 6) \, .
$$
(Note that $1728 = 3(24^2)$.)  How is this factorization obtained?
 A: $$
\begin{align}
1728(x - 3) - x^2(12^2 - x^2) & = x^4 - 144 x^2 + 1728 x - 5184 \\
 & = x^4 - 12^2 x^2 + 12 \cdot 12^2 x - 36 \cdot 12^2 \\
 & = x^4 - 12^2(x^2 - 2 \cdot 6 \,x + 6^2) = \\
 & = x^4 - 12^2(x-6)^2 = \\
 & = \big(x^2 - 12(x-6) \big)\big(x^2 + 12(x-6)\big) = \cdots
\end{align}
$$
A: We have
$$
(x^2-12x+72)(x^2+12x-72)=x^4 - 144x^2 + 1728x - 5184=x^2(x^2-12^2)+1728(x-3),
$$
The factorization is of the form $(a^2+b)(a^2-b)=a^4-b^2$, with $a=x$ and $b=12x-72$.
A: This solution was suggested by dxiv.
Solution
The given quartic polynomial factors into a product of two monic, quadratic polynomials:
\begin{equation*}
x^{4} - 144x^{2} + 1728x - 5184 = (x^{2} + ax + b)(x^{2} + cx + d) ;
\end{equation*}
\begin{equation*}
(x^{2} + ax + b)(x^{2} + cx + d) = x^{4} + (a + c)x^{3} + (ac + b + d)x^{2} + (ad + bc)x + bd .
\end{equation*}
Since $c = -a$,
\begin{equation*}
d - b = \dfrac{12^{3}}{a}
\qquad \text{and} \qquad
b + d = a^{2} - 12^{2}
.
\end{equation*}
So,
\begin{equation*}
b = \frac{1}{2a} \Bigl(-12^{3} - 12^{2}a + a^{3} \Bigr)
\qquad \text{and} \qquad 
d = \frac{1}{2a} \Bigl( 12^{3} - 12^{2}a + a^{3} \Bigr) . 
\end{equation*}
Moreover, since $bd = -5184 = -3(12^{3})$, and
\begin{equation*}
bd = \frac{1}{4a^{2}} \Bigl(a^{6} - 2(12^{2}) a^{4} + 12^{4} a^{2} - 12^{6}\Bigr) ,
\end{equation*}
\begin{equation*}
a^{6} - 2(12^{2}) a^{4} + 2(12^{4}) a^{2} - 12^{6} = 0 .
\end{equation*}
$\pm12$ are roots of this polynomial equation in the variable $a$. If $a = 12$, $b = -72$, $c = -12$, and $d = 72$; if $a = -12$, $b = 72$, $c = 12$, and $d = -72$. In either case,
\begin{align*}
&x^{4} - 144x^{2} + 1728x - 5184 \\
&\qquad = (x^{2} + 12x - 72)(x^{2} - 12x + 72) \\
&\qquad = \bigl(x - 6\sqrt{3} + 6\bigr)\bigl(x + 6\sqrt{3} + 6\bigr)(x^{2} - 12x + 72) .
\end{align*}
