Example 4 Given the equation $|x|=a x+1$ has one negative root and no positive root. Then, the range of values for $a$ is ( ).
(A) $a>-1$
(B) $a=1$
(C) $a \geqslant 1$
(D) None of the above
(1987, National Junior High School Mathematics League)
To solve correctly, a case-by-case discussion is required. First, the absolute value is a factor to consider. Second, the requirement for the roots "one negative, no positive" is another factor to consider.
Solution: It is clear that the roots of the equation are not equal to 0.
The following is completed in three steps.
(1) Find the range of values for $a$ when the equation has negative roots.

Let $x-1$.
For $a>-1$, the equation has negative roots, but it may also have positive roots, so we need to remove those $a$ that have positive roots to get the desired result.
(2) Find the range of values for $a$ when the equation has no positive roots.
First, find the range of $a$ when the equation has positive roots (using the idea of complement). Let $x>0$, the original equation can be transformed into an inequality about $a$
$$
x=\frac{1}{1-a}>0 .
$$

Solving this gives $a<1 ; \\
-1-\frac{1}{x}, & x>\frac{1}{2}, \\
-1<0,
$$

we know there must be two real roots.
To ensure there is a negative root, take $x_{1} x_{2}<0$, we have
$$
x_{1} x_{2}=\frac{1}{a^{2}-1}<0 \text {. }
$$

Solving this gives $-1<a<1$. Therefore, the answer is (D).