已知函数 $f(x)=a x+\frac{\mathrm{e}^x}{x}+a \ln \frac{1}{x}$ 在 $x \in\left(\frac{1}{2}, 2\right)$ 上有三个单调区间,则实数 $a$ 的取值可以是()
$\text{A.}$ $ -e$
$\text{B.}$ $-2 \sqrt{\mathrm{e}}$
$\text{C.}$ $-\frac{\mathrm{e}^2}{2}$
$\text{D.}$ $-\frac{7}{2}$
$\text{E.}$
$\text{F.}$