Study the pointwise and uniform convergence of $f_n(x)=\cos \frac{nx}{1+n^2}$ for $x \in \mathbb{R}$.
If $x=0$ it is $f_n(0)=1$, for $x \ne 0$ it is $$\lim_{n \to \infty} \cos\frac{nx}{1+n^2}=\cos 0=1$$ So $f_n(x)$ converges pointwise to $f(x)=1$ for all $x \in \mathbb{R}$. To study the uniform convergence I must evaluate $$\lim_{n \to \infty} \sup_{x \in \mathbb{R}}\left|\cos \frac{nx}{1+n^2}-1\right|=\lim_{n \to \infty} \sup_{x \in \mathbb{R}}\left(1-\cos \frac{nx}{1+n^2}\right)$$ Since the derivative of $1-\cos \frac{nx}{1+n^2}$ exists for all $x\in\mathbb{R}$, it is $$\frac{d}{dx} \left(1-\cos \frac{nx}{1+n^2}\right)=\frac{n}{1+n^2} \sin \frac{nx}{1+n^2} \geq 0$$ $$\iff 2k\pi \leq \frac{nx}{1+n^2} \leq (2k+1)\pi \iff \frac{1+n^2}{n}2k\pi \leq x \leq \frac{1+n^2}{n}(2k+1)\pi$$ For $k\in\mathbb{Z}$, so $$\lim_{n \to \infty} \sup_{x \in \mathbb{R}}\left(1-\cos \frac{nx}{1+n^2}\right)=\lim_{n \to \infty} \left(1-\cos \frac{n \left(\frac{1+n^2}{n}(2k+1)\pi\right)}{1+n^2}\right)=\lim_{n\to\infty}(1-\cos\pi)=2$$ So $f_n$ is not uniformly convergent in $\mathbb{R}$. Is this correct? Some more questions:
I've noticed that $f_n(\frac{1+n^2}{n})=\cos 1$, can I conclude that since there exists at least one $\bar{x}=\frac{1+n^2}{n}$ such that $|f_n(\bar{x})-f(\bar{x})|=1-\cos 1 \ne 0$ so $f_n$ cannot be uniform convergent in whole $\mathbb{R}$ because it it will never be $|f_n(x)-f(x)|<\varepsilon$ for all $x \in \mathbb{R}$ because of $\bar{x}$. Is this correct?
It is $\cos \frac{nx}{1+n^2} \approx 1-\frac{n^2 x^2}{2(1+n^2)^2}$ as $n \to \infty$, can this be useful to evaluate the limit of the supremum? Or is it useless because the asymptotic behaviour can't give informations about a supremum?
Is there a way to identify if there are some subsets of $\mathbb{R}$ where $f_n$ can converge uniformly to $f$?