# Pointwise and uniform convergence of $f_n(x)=\cos \frac{nx}{1+n^2}$

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:

1. 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?

2. 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?

3. Is there a way to identify if there are some subsets of $$\mathbb{R}$$ where $$f_n$$ can converge uniformly to $$f$$?

For $$(1)$$, the answer is yes. Another simple way to see this is that $$\text{Im}(f_n) = \text{Im}(\cos) = [-1,1]$$ for all $$n$$, and since $$\text{Im}(f) = \{1\}$$ convergence cannot be uniform.

For $$(2)$$, I don't really see how that helps. If $$x$$ is fixed and you're letting $$n$$ grow, all you're getting help with is calculating the pointwise limit.

For $$(3)$$, notice that as $$n\to\infty$$, $$n/(1+n^2)$$ approaches $$0$$. I guess the natural approach here would be to consider what happens if $$x$$ is bounded. And then you'd have to ask yourself what happens if $$x$$ is not bounded?

• Thanks for your answer, I will think a little more about what you've said for (3) and write here if I found some ideas. Did you spot any mistake in the solution I've written? Have a nice day.
– Gwyn
Commented Jan 23, 2021 at 17:30
• Your solution seems correct, albeit needlessly complicated. If I were to be super picky, the choice of $x=\frac{1+n^2}n(2k+1)\pi$ being at the end of an interval where $f_n$ is increasing does not guarantee that the $\sup$ is attained at that value of $x$, which seems to be implied by the calculation of the derivative and the equality right after "For $k \in \Bbb Z$, so". This could be fixed simply by changing the equality symbol to $\geqslant$. Commented Jan 23, 2021 at 18:23
• Thanks again, but I'm not sure if I'm getting your corrections: I used the fact that if $f$ is increasing in $(a,b)$ then its supremum is achieved taking the limit as $x \to b^-$ of $f$. So I've not used the fact that the derivative is non negative, because (if I'm not wrong) that gives me informations only in open sets, so it doesn't give me information for what happens on the right end of the interval. Maybe now it is clearer, what do you think? Thanks for your time!
– Gwyn
Commented Jan 24, 2021 at 4:44
• What you said in the comment is correct, assuming that the domain of $f$ is $(a,b)$, which is not the case. Commented Jan 24, 2021 at 4:54