13. (15 points) Given the function
$$
f(x)=\left(a-\frac{1}{2}\right) \mathrm{e}^{2 x}+x(a \in \mathbf{R}) \text {. }
$$
(1) If $f(x)$ is monotonically increasing on the interval $(-\infty, 0)$, find the range of real number $a$;
(2) If on the interval $(0,+\infty)$, the graph of the function $f(x)$ is always below the curve $y=2 a \mathrm{e}^{x}$, find the range of real number $a$.
13. (1) Since $f(x)$ is monotonically increasing on the interval $(-\infty, 0)$, we know that on the interval $(-\infty, 0)$,
$$
f^{\prime}(x)=(2 a-1) \mathrm{e}^{2 x}+1 \geqslant 0 .
$$

Thus, $1-2 a \leqslant \frac{1}{\mathrm{e}^{2 x}}$.
When $x \in(-\infty, 0)$, $\frac{1}{\mathrm{e}^{2 x}}>1$, so
$$
\begin{array}{l}
1-2 a \leqslant 1 \Rightarrow a \geqslant 0 . \\
\text { (2) Let } g(x)=f(x)-2 a \mathrm{e}^{x} \\
=\left(a-\frac{1}{2}\right) \mathrm{e}^{2 x}-2 a \mathrm{e}^{x}+x .
\end{array}
$$

By the problem statement, $g(x)\frac{1}{2}$, when $x$ is sufficiently large, $g(x)$ is also sufficiently large, which does not meet the requirement.
(ii) If $a \leqslant \frac{1}{2}$, then $2 a-1 \leqslant 0$. In this case, on the interval $(0,+\infty)$, we always have $g^{\prime}(x)<0$, so $g(x)$ is a decreasing function on the interval $(0,+\infty)$.

To ensure that $g(x)<0$ on the interval $(0,+\infty)$, it is sufficient to satisfy
$$
g(0)=-a-\frac{1}{2} \leqslant 0 \Rightarrow a \geqslant-\frac{1}{2} .
$$

Thus, $a \in\left[-\frac{1}{2}, \frac{1}{2}\right]$.
Combining (i) and (ii), we know that when $a \in\left[-\frac{1}{2}, \frac{1}{2}\right]$, the graph of the function $f(x)$ is always below the line $y=2 a \mathrm{e}^{x}$.