finding out the value of the expression Let $P(x)=x^5+x^2+1$ have roots $x_i,i=1,2,3,4,5$. Let $g(x)=x^2-2$,then the question is to find the value of $$\prod_{i=1}^5 g(x_i)-30g(\prod_{i=1}^5 x_i)$$.
It is  clear that $30g(\prod_{i=1}^5 x_i)=-30$.I tried to substitute the values of the $g(x_i)$ and then tried to simplify
it but couldnot proceed.I know that it is not an elegant way to this problem and there must be some trick involved in it.Any hint would be highly appreciated. Thanks.
 A: Factoring P gives:
$$P(x)=\prod_{i=1}^5(x-x_i)=-\prod_{i=1}^5(x_i-x)$$
So $P(\sqrt 2)=-\prod_{i=1}^5(x_i-\sqrt 2)$ and $P(-\sqrt 2)=-\prod_{i=1}^5(x_i+\sqrt 2)$
So
$$P(\sqrt 2)P(-\sqrt 2)=\prod_{i=1}^5(x_i-\sqrt 2)\prod_{i=1}^5(x_i+\sqrt 2)=\prod_{i=1}^5(x_i^2-2)$$
A: There is an approach that does not need any special properties of $g$ or $P$, that does not need any radicals and that does not need a big amount of manipulation of symmetric polynomials.
Let $A$ be a matrix with eigenvalues $x_1,\ldots, x_n$, where $n$ is the degree of $P$ (take the companion matrix of $P$). Then $g(x_1),\ldots,g(x_n)$ are the eigenvalues of $g(A)$. Let $Q$ be the characteristic polynomial of $g(A)$. 
$$
Q(t):= \chi_{g(A)}(t) = t^n+q_{n-1}t^{n-1}+\ldots+q_0
$$
As $g(x_1),\ldots,g(x_n)$ are the roots of this polynomial, we have
\begin{eqnarray*}
e_1(g(x_1),\ldots,g(x_n)) & = \sum_i g(x_i) = & -q_{n-1} = Tr(g(A)) \\
e_2(g(x_1),\ldots,g(x_n)) & = & q_{n-2} \\
\vdots \\
e_{n-1} (g(x_1),\ldots,g(x_n)) & =&  (-1)^{n-1} q_1 \\
e_n(g(x_1),\ldots,g(x_n)) & = \prod_i g(x_i) = & (-1)^n q_0 = \det(g(A))
\end{eqnarray*}
$(e_1,\ldots,e_n$ are the elementary symmetric polynomials.)
