9. For any positive real number $a$, let the minimum value of the function $f(x)=|\lg x|$ on $[a,+\infty)$ be $m_{a}$, and the maximum value of the function $g(x)=\sin \frac{\pi x}{2}$ on $[0, a]$ be $M_{a}$. If $M_{a}-m_{a}=\frac{1}{2}$, find all possible values of $a$.


When $01$, $M_{a}=1$, at this time $m_{a}=\lg a=\frac{1}{2} \Rightarrow a=\sqrt{10}$. Therefore, all possible values of $a$ are $\frac{1}{3}, \sqrt{10}$.