# limit of trigonometric function to infinity

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.

• $n\to\infty$ does not necessarily imply $n$ is an integer, for non integer $n,(-1)^n=?$ – lab bhattacharjee Apr 28 '18 at 18:11
• True. Then it would tend to oscillate. I'm not quite sure what I can do with that then. Thanks – user25758 Apr 28 '18 at 18:20
• Usually $n$ is used to denote an integer, so assuming it is, note that $\cos(-\pi)=\cos(\pi)=-1$. – Cedron Dawg Apr 28 '18 at 19:06

Note that $$\cos$$ is even; that is, $$\cos(x)=\cos(-x)$$ for any $$x\in\mathbb{R}$$. Thus,
• If $$n$$ is odd, then $$\cos\left((-1)^n \frac{n-1}{n+1}\pi\right)=\cos\left((-1)^{n+1}\frac{n-1}{n+1}\pi\right)=\cos\left(\frac{n-1}{n+1}\pi\right)$$.
• If $$n$$ is even, then $$\cos\left((-1)^n \frac{n-1}{n+1}\pi\right)=\cos\left(\frac{n-1}{n+1}\pi\right)$$.
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.$$