5. Let the function $f(x)=\mathrm{e}^{x}-1-x-a x^{2}$, when $x \geqslant 0$ is monotonically increasing, then the range of values for $a$ is
Solve
$f^{\prime}(x)=\mathrm{e}^{x}-1-2 a x \geqslant 0, x=0$  the inequality always holds;
$x>0$  when, $2 a \leqslant \frac{\mathrm{e}^{x}-1}{x}$, let $g(x)=\frac{\mathrm{e}^{x}-1}{x}, g^{\prime}(x)=\frac{x \mathrm{e}^{x}-\left(\mathrm{e}^{x}-1\right)}{x^{2}}=\frac{(x-1) \mathrm{e}^{x}+1}{x^{2}}$.
Let $p(x)=(x-1) \mathrm{e}^{x}+1, p^{\prime}(x)=x \mathrm{e}^{x}>0 \Rightarrow p(x)$ is monotonically increasing, and $p(0)=0 \Rightarrow p(x)>0$,
thus $g(x)$ is monotonically increasing, and $g(0)=\lim _{x \rightarrow 0} \frac{\mathrm{e}^{x}-1}{x}=\lim _{x \rightarrow 0} \mathrm{e}^{x}=1$, so $2 a \leqslant 1 \Rightarrow a \leqslant \frac{1}{2}$. Therefore, the range of $a$ is $\left(-\infty, \frac{1}{2}\right]$.