Problem 8. The left side of the equation is non-negative. Therefore, $a x \geq 0$. When $a=0$, the equation has two roots -1 and 1. Hence, $a=0$ does not satisfy the condition.

Consider the case $a>0$. Then $x \geq 0$ and therefore $|x|=x$. Let's construct the graph of the function $y=|\ln x|$. The line $y=a x$ must intersect this graph at three points. From the graph, it is clear that this is true if and only if the line passes within the angle formed by the x-axis and the tangent $y=a_{0} x$ to the graph of the function $y=\ln x$ for $x>1$.

Let's find $a_{0}$. The x-coordinate of the point of tangency satisfies the equations $a_{0} x=\ln x, a_{0}=\frac{1}{x}$, from which $a_{0}=\frac{1}{e}$,

![](https://cdn.mathpix.com/cropped/2024_05_06_d39e2e41eca8a5a4f1bcg-3.jpg?height=574&width=1008&top_left_y=1032&top_left_x=912)
$x=e$. Thus, $0<a<\frac{1}{e}$.

The case $a<0$ is symmetric, that is, $-\frac{1}{e}<a<0$.
Answer. $-\frac{1}{e}<a<0, 0<a<\frac{1}{e}$.