Let $f_n:[0,2] \to \mathbb{R}$, $f_n=\cos(\pi+\frac{x}{n})$. Show the sequence $f_n$ converges uniformly, and find the uniform limit.
I often struggle with proving uniform convergence, I wasn't sure if I should try to do it from first principles, or use the fact that $[0,2]$ is compact, and try to show that $f_n(x)$ is decreasing after some $n$, and then use Dini's theorem. I dont seem to be able to show $f_n$ is decreasing at each $x$ without pictures. Thanks
First, note that if a uniform limit exists, it must coincide with the pointwise limit. At any $x$, we calculate $$ \lim_{n \to \infty} \cos\left(\pi + \frac xn\right) = \cos \pi = -1 $$ Now, we wish to show that the convergence is uniform. That is, we wish to find a uniform upper bound for the difference $|\cos(\pi) - \cos(\pi + x/n)|$. A handy trick here is to use the mean value theorem on the function $x \mapsto \cos(\pi + x/n)$: for all $x \in [0,2]$, there exists a $c \in (0,x)$ such that $$ (\cos(\pi) - \cos(\pi + x/n)) = \left(\left.\frac d{dx} \cos(\pi + x/n)\right|_{x=c} \right) \cdot x $$ perhaps you could take it from there.