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.

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)$$
