9. Given $f(\sin x)=\frac{\sin 3 x}{\sin ^{2} x}$.
(1) Find the analytical expression and domain of $f(x)$;
(2) If the equation $f(x)=m$ has two distinct real roots, find the range of $m$.


(1) $f(\sin x)=\frac{3-4 \sin ^{2} x}{\sin x}=\frac{3}{\sin x}-4 \sin x \Rightarrow f(x)=\frac{3}{x}-4 x, f(x)$'s domain is $[-1,0) \cup(0,1]$.
(2) Since $f(x)$ is an odd function, and it is monotonically decreasing on $(0,1]$, with a range of $[-1,+\infty)$;

it is monotonically decreasing on $[-1,0)$, with a range of $(-\infty, 1]$.
Therefore, when the equation $f(x)=m$ has two distinct real roots, the range of $m$ is $[-1,1]$.