15. Given the function $f(x)=a x^{2}-1(a \in \mathbf{R}, x \in \mathbf{R})$, the sets $A=\{x \mid f(x)=x\}$, $B=\{x \mid f(f(x))=x\}$, and $A=B \neq \varnothing$, find the range of real number $a$.


16. The elements of $A$ are the real roots of the equation $a x^{2}-1=x$. From $A \neq \phi$, we get $a=0$ or $\left\{\begin{array}{l}a \neq 0 \\ \Delta=1+4 a \geqslant 0\end{array}\right.$, i.e., $a \geqslant-\frac{1}{4}$. Let $t \in A$. Then $f(t)=t$, so $f(f(t))=f(t)=\ell$, so $t \in B$, thus $A \subseteq B$. The elements of $B$ are the real roots of the equation $a\left(a x^{2}-1\right)^{2}-1=x$,

Rearranging gives $a^{3} x^{4}-2 a^{2} x^{2}-x+a-1=0$. Since $A \subseteq B$, this equation can be factored, with one of the factors being $a x^{2}-x-1$, hence: $\left(a x^{2}-x-1\right)\left(a^{2} x^{2}+a x-a-1\right)=0$. Therefore, for $A=B$, the equation $a^{2} x^{2}+a x-a+1=0 \cdots \cdots$ (1) either has no real roots, or its real roots are the real roots of $\left(a x^{2}-x-1\right)=0 \cdots \cdots$ (2).
If (1) has no real roots, then $\Delta_{2}=a^{2}-4 a^{2}(1-a)<0$, solving gives $a<\frac{3}{4}$.
(When $a=0$, (D) also has no real roots, this case is included in $a<\frac{3}{4}$) If (1) has real roots and the real roots of (1) are the real roots of (2), then from (2) we have: $a^{2} x^{2}=a x+a(a \neq 0)$, substituting into (1) gives: $2 a x+1=0, x=-\frac{1}{2 a}$, substituting back into (2) gives: $\frac{1}{4 a}+\frac{1}{2 a}-1=0, a=\frac{3}{4}$, in this case, the real roots of (1) are $x_{1}=x_{2}=-\frac{2}{3}$, and the real roots of (2) are $x_{1}=2, x_{2}=-\frac{2}{3}$, satisfying $A=B$.
In summary, the range of real numbers $a$ is $\left[-\frac{1}{4} ， \frac{3}{4}\right]$.