I want to check if a sequence converges or diverges. The sequence is the following:
$$a_n = \cos\left(n\ln \left(1+\frac{\pi}{n}\right)\right)$$
I though of maybe using sandwich theorem, but can I use it, saying that the value will lie between $-1$ and $1$? If not, can anyone point me to where I should be looking at.
$$\begin{align}a_n &= \cos \left(n \ln \left( 1+ \frac \pi n\right) \right)\\ &=\cos\left(\ln\left(1+\frac\pi n\right)^n\right) \end{align}$$
You may recognize that $$\lim_{n\to \infty}\left(1+\frac x n\right)^n = e^x$$ for all $x$ (this being one way to define the exponential function).
Thus $\lim_{n\to\infty}\left(1+\frac \pi n\right)^n = e^\pi$.
Since $\ln$ is continuous throughout its domain, which includes $e^\pi$, and $\cos$ is continuous everywhere, your sequence will approach $\cos(\ln e^\pi)=\cos \pi = -1$.
Thanks for the tip on continuity from davin.