2. Let $a \in \mathbf{R}$, if for all $x>0$, $\left(x^{2}+a x-5\right)(a x-1) \geq 0$ holds, then $a=$
Solve $\frac{1}{2}$.
Analysis When $a=0$, it is obviously not possible to make the original inequality hold for any $x>0$, so $a \neq 0$.
Notice that $y=x^{2}+a x-5$ opens upwards, so it is necessary that $a>0$.
For the equation $x^{2}+a x-5=0$, let its two roots be $x_{1}, x_{2}$, and $x_{1}<0, x_{2}>0$.
Let $x_{3}=\frac{1}{a}$, and since the original inequality holds for $x>0$, we know $x_{2}=x_{3}$, hence $\frac{-a+\sqrt{a^{2}+20}}{2}=\frac{1}{a}$, solving this gives $a=\frac{1}{2}$.