7.18 The range of the function $y=\operatorname{arctg} \frac{1}{x^{2}-1}$ is
(A) $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$.
(B) $\left(0, \frac{\pi}{2}\right)$.
(C) $\left(-\frac{\pi}{2},-\frac{\pi}{4}\right) \cup\left(0, \frac{\pi}{2}\right)$.
(D) $\left(-\frac{\pi}{2},-\frac{\pi}{4}\right] \cup\left(0, \frac{\pi}{2}\right)$.
(2nd "Hope Cup" National Mathematics Invitational Competition, 1991)
[Solution] Let $f(x)=\frac{1}{x^{2}-1}$, then when $|x|>1$, $f(x)$ takes all positive real numbers; when $|x|<1$, $f(x) \leqslant-1$.
That is, the range of $f(x)$ is $(-\infty,-1] \cup(0,+\infty)$.
$\therefore \quad y \in\left(-\frac{\pi}{2},-\frac{\pi}{4}\right] \cup\left(0, \frac{\pi}{2}\right)$.
Therefore, the correct choice is $(D)$.