8. Find $a$ such that the sum of the squares of the real roots of the equation $x^{4}+a x^{2}-$ $2017=0$ is 4.
Answer: $1006.5$.

Solution: Let's make the substitution $t=x^{2}$. The equation $t^{2}+a t-2017=0$ has two roots, the product of which is -2017 according to Vieta's theorem. Therefore, one of them is negative. Let $t_{1}>0$, then the roots of the original equation are $\pm \sqrt{t_{1}}$. The sum of their squares is $2 t_{1}$, so $t_{1}=2$. Substituting into the equation $t^{2}+a t-2017=0$, we get $4+2 a-2017=0$, from which $a=1006.5$.

## Variant $2-$ -