I should calculate the limit of a sequence. A friend told me, that the solution is $1$. But I got $(-1)^n$.
The exercise is: $\lim\limits_{n \to \infty} \frac{1}{n^2} + (-1)^n \cdot \frac{n^2}{n^2+1}$
I did following: $\begin{align*} &=\frac{n^2 ((-1)^n n^2 + 1 + \frac{1}{n^2})}{n^2(n^2+1)}\\ &=\frac{(-1)^n n^2 + 1 + \frac{1}{n^2}}{(n^2+1)}\\ &=\frac{n^2(\frac{(-1)^n n^2}{n^2} + \frac{1}{n^2} + \frac{1}{n^4})}{n^2(1 + \frac{1}{n^2})}\\ &=\frac{(-1)^n + 0 +0}{1}\\ &=\lim\limits_{n \to \infty} (-1)^n \end{align*}$
What did I wrong?
Edit Well, some answers confused me. Here the complete exercise. I should check if the sequence is convergent for ${n \to \infty}$ and determine the limit if it exist. Also for a sequence which is $\infty$ or $-\infty$.
My friend got $1$ as limit. I got $(-1)^n$. I would say, that this sequence has no limit, just limit points $1$ and $-1$.