Find limit superior and limit inferior of $\frac{n+(-1)^n n^2}{n^2+1}$: the subsequential limit is $1$ and $-1$. so the limit $\sup = 1$ and limit $\inf = -1$ let $E_k = \{a_n\mid n>k\}$.
$$E_k= \begin{cases} \dfrac{k-k^2}{k^2+1},\dfrac{(k+1)+(k+1)^2}{(k+1)^2+1},\dots, \quad \text{if $k$ is odd} \\[6pt] \dfrac{k+k^2}{k^2+1},\dots, \quad \text{if $k$ is even} \end{cases} $$
so $\inf E_k = -1$ and
$$\sup E_k = \begin{cases} \dfrac{(k+1)+(k+1)^2}{(k+1)^2+1} \text{if $k$ is odd}\\[6pt] \dfrac{k+k^2}{k^2+1} \text{if $k$ is even} \end{cases}$$
therefore $\liminf a_n = -1$ and $\limsup a_n = 1$
is this proof right? if not any hint.