I'm facing a bit of trouble figuring out this limit.
$$ \lim_{n \to \infty} \cos\left(\left(-1\right)^n \frac{n-1}{n+1}\pi\right)$$
and I'm not sure if I can simply find the limit of the inner functions and then apply cosine to that, as in $$ \lim_{n \to \infty} (-1)^n = undefined \quad \quad \lim_{n \to \infty} \frac{n-1}{n+1} = 1 \quad \quad \lim_{n \to \infty} \pi = \pi $$ But because of the oscillation caused by $\displaystyle\lim_{n \to \infty} (-1)^n$, I am not sure what I should do. It would seem to me that the entire thing is undefined, but that is a bad answer.
Note that $\cos$ is even; that is, $\cos(x)=\cos(-x)$ for any $x\in\mathbb{R}$. Thus,
Therefore, $$\lim_{n\to\infty}\cos\left((-1)^n \frac{n-1}{n+1}\pi\right)=\lim_{n\to\infty}\cos\left(\frac{n-1}{n+1}\pi\right)=\cos\pi=-1.$$