Let $f(x)=x^6-2x^3-8$ and $g(x)=x^2+2x+4$. Let $a_1$ through $a_6$ be its roots. Find the value of $\prod_{n=1}^{6} (g(a_n))$

Note that $(x^2+2x+4)(x-2)=x^3-8$. So the product of the $g(a_i)$ is $P/Q$, where

$$P=\prod(a_i^3-8)$$ $$Q=\prod(a_i-2)$$

As @mathcounterexamples.net notes, the roots of $f$ are the cube roots of $4$ and $-2$; so $a_i^3-8$ takes the values $-4,-4,-4,-10,-10,-10$. Hence $P=64000$.

And the product of $a_i-2$ taken over all roots of $f(x)$ is the product of $a_i$ taken over all roots of $$f(x+2)=(x+2)^6-2(x+2)^3-8$$ which is simply the constant term $2^6-2.2^3-8=40$. So we get $P/Q=1600$.


$g(x)=(x-a)(x-b)$ where $a=-1+\sqrt 3 i, b=-1-\sqrt 3 i$ are cubic roots of 8.

For $n=1, 2, \ldots, 6, a_n-a$ are the roots of $h_1 (x) = f(x+a)$, $a_n-b$ are the roots of $h_2(x)=f(x+b)$.

Recall that $a^3=b^3=8$, then the desired product is the product of $h_1(x)$ and $h_2(x)$'s constant terms

$$ h_1(0) \cdot h_2(0) = (a^6-2a^3-8)\cdot (b^6-2b^3-8) = (8^2-2 \cdot 8 - 8)^2 = 40^2=1600. $$