Consider a sequence of functions on $\Bbb R$ defined by $$f_n(x)=\sum_{k=0}^n \frac{x^{2k}}{(2k)!}, n \ge 0.$$ I'd like to show that $\{f_n(x)\}$ converges uniformly on any compact subset of $\Bbb R$. We have $\{f_n(x)\}$ is a monotonically increasing sequence which converges pointwise to a continuous function $f(x)=\frac{e^x+e^{-x}}2$ since $$\lim_{n \to \infty}f_n(x)=\sum_{k=0}^\infty \frac{x^{2k}}{(2k)!}=\frac{e^x+e^{-x}}2,$$ by Dini's theorem $\{f_n(x)\}$ converges uniformly.
How does the proof look? Is there any better proof?
That's a fine proof.
A more direct proof is to show it is uniformly convergent on $[-N,N]$ for any $N$.
Given $\epsilon>0$, pick $n_0$ so that $\frac{N^{2n_0}}{(2n_0)!}<\frac{\epsilon}{2}$ and $\frac{N^2}{(2n_0+1)(2n_0+2)}<\frac{1}{2}$. (You need to argue why you can find such $n_0$.)
Then for $n\geq n_0$ and $x\in[-N,N]$ you show that:
$$\left|\frac{e^x+e^{-x}}{2}-f_n(x)\right|\leq \frac{\epsilon}{2}\left(1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\cdots\right)=\epsilon$$
The Weierstass $M$-test proof is to define $a_k(x)=\frac{x^{2k}}{(2k)!}$. Then, for $x\in [-N,N]$, $|a_k(x)|\leq a_k(N)=M_k$ so $$\sum_{k=0}^{\infty} \frac{x^{2k}}{(2k)!}$$ converges uniformly on $[-N,N]$ because $\sum_{k=0}^\infty M_k$ converges to $\frac{e^{N}+e^{-N}}{2}$.