8. Given the equation $\left(a x+a^{2}-1\right)^{2}+\frac{a^{2}}{(x+a)^{2}}+2 a^{2}-1$ $=0$ has real solutions. Find the range of real values for $a$.

 untranslated text remains the same as the source text.
(Solution: $-\frac{1}{2} \leqslant a \leqslant \frac{1}{2}, a \neq 0$ )