We wish to prove that the sequence of functions $f_n(x)=\frac{1+\cos^2(nx)}{\sqrt{n}}$ converges uniformly to $0$ on $\mathbb{R}$.
Scratch work: $|f_n(x)|=|\frac{1+\cos^2(nx)}{\sqrt{n}}|\le|\frac{2}{\sqrt{n}}|$
If we have $$|\frac{2}{\sqrt{n}}| <\varepsilon \implies n>\frac{4}{\varepsilon^2} $$
Proof:
$\varepsilon>0$ is given, we choose $N = \lceil \frac{4}{\varepsilon^2} \rceil$ $n>N$ is given.
We know $n>N\ge \frac{4}{\varepsilon^2}$
$|f_n(x)|=|\frac{1+\cos^2(nx)}{\sqrt{n}}|\le|\frac{2}{\sqrt{n}}|$
$$ \frac{2}{\sqrt{n}}<\frac{2}{2/\varepsilon}=\varepsilon$$
Hence the function converges uniformly to $0$ on $\mathbb{R}$.