16. Given that $a$ is a real constant, the function
$$
f(x)=\mathrm{e}^{-x} \sin x + a x \quad (x \in [0,2 \pi])
$$
(1) Let $g(x)$ be the derivative of $f(x)$, find the intervals of monotonicity of $g(x)$ within the interval $[0,2 \pi]$;
(2) If $f(x)$ has exactly one maximum and one minimum in the interval $(0,2 \pi)$, find the range of the real number $a$.
16. (1) From $f(x)=\mathrm{e}^{-x} \sin x+a x$, we know $g(x)=f^{\prime}(x)=a-\mathrm{e}^{-x}(\sin x-\cos x)$. Then $g^{\prime}(x)=-2 \mathrm{e}^{-x} \cos x$.
From $g^{\prime}(x)=0$
$\Rightarrow x=\frac{\pi}{2}$ or $\frac{3 \pi}{2}$.
From $g^{\prime}(x)0$
$\Rightarrow \frac{\pi}{2}<x<\frac{3 \pi}{2}$.
From $g^{\prime}(x)0$
$\Rightarrow \frac{\pi}{2}g\left(\frac{3 \pi}{2}\right)>g(2 \pi)>g\left(\frac{\pi}{2}\right)$.
(i) If $g\left(\frac{\pi}{2}\right) \geqslant 0$, then $f^{\prime}(x)>0, f(x)$ is monotonically increasing in the interval $(0,2 \pi)$.
Thus, $f(x)$ has no extremum in the interval $(0,2 \pi)$, which is a contradiction.
Therefore, $g\left(\frac{\pi}{2}\right)0$ when, $f(x)$ has at least three extremum points in the interval $(0,2 \pi)$, which is a contradiction.
Therefore, $g(2 \pi)>0$.
Conversely, when $g\left(\frac{\pi}{2}\right)0$, $f(x)$ has one extremum point in the interval $\left(0, \frac{\pi}{2}\right)$ and one in the interval $\left(\frac{\pi}{2}, 2 \pi\right)$.

Thus, the sufficient and necessary condition for $f(x)$ to have exactly one maximum and one minimum in the interval $(0,2 \pi)$ is
$$
\begin{array}{l}
\left\{\begin{array}{l}
g(2 \pi)=a+\mathrm{e}^{-2 \pi}>0, \\
g\left(\frac{\pi}{2}\right)=a-\mathrm{e}^{-\frac{\pi}{2}}<0
\end{array}\right. \\
\Rightarrow-\mathrm{e}^{-2 \pi}<a<\mathrm{e}^{-\frac{\pi}{2}} .
\end{array}
$$