7. If the equation $x^{4}-2 a x^{2}-x+a^{2}-a=0$ has exactly two distinct real roots, then the range of the real number $a$ is $\qquad$ .
7. $\left(-\frac{1}{4}, \frac{3}{4}\right)$.

Notice that the original equation is equivalent to
$$
\left(x^{2}-x-a\right)\left(x^{2}+x+1-a\right)=0 .
$$

The discriminant of the equation $x^{2}-x-a=0$ is $\Delta_{1}=1+4 a$, and the discriminant of the equation $x^{2}+x+1-a=0$ is $\Delta_{2}=4 a-3$. When $\Delta_{1} \Delta_{2}<0$, i.e., $-\frac{1}{4}<a<\frac{3}{4}$, the original equation has exactly two distinct real roots.