I now that I can prove this by the definition of $\epsilon$ $\delta$, but I was playing and I found that if I use the substitution
$\cos(nx) = \frac{1}{2}(e^{inx} + e^{-inx})$
Hence, for any $n \in \mathbb{N}$ we have $$ \frac{1}{n+1}\sin([n+1]x) + \frac{1}{n-1}\sin([n-1]x)\biggr|_{-\pi}^{\pi} = 0$$
It's something wrong with my solution?
Doing integration by parts
$$A_n=||\int_{-\pi}^{\pi}e^{ix}\cos(nx)dx||=||\frac{e^{ix}(n\sin{nx}+i \cos{nx})}{n^2-1}]_{-\pi}^{\pi}||_2=|-\frac{2n \sin{n\pi}}{n^2-1}|=0$$
where $||.||_2$ denotes the complex absolute value.
Thus $\limsup_{n \rightarrow \infty}A_n=0$