Lời giải:
a.
$x(x-\frac{1}{2})< 0$
\(\Leftrightarrow \left[\begin{matrix}
\left\{\begin{matrix}
x< 0\\
x-\frac{1}{2}>0\end{matrix}\right.\\
\left\{\begin{matrix}
x>0\\
x-\frac{1}{2}< 0\end{matrix}\right.\end{matrix}\right.\Leftrightarrow \left[\begin{matrix}
0> x>\frac{1}{2} (\text{vô lý})\\
0< x< \frac{1}{2}(\text{chọn})\end{matrix}\right.\)
b.
\(\frac{x-1}{x+2}< 0\Leftrightarrow \left[\begin{matrix} \left\{\begin{matrix} x-1< 0\\ x+2>0\end{matrix}\right.\\ \left\{\begin{matrix} x-1>0\\ x+2< 0\end{matrix}\right.\end{matrix}\right.\Leftrightarrow \left[\begin{matrix} -2< x< 1(\text{chọn})\\ -2> x>1(\text{vô lý})\end{matrix}\right.\)