Questions on limits of the sequence $a_{n}=\frac{(-1)^{n}n+1}{n}$ 
Given $a_{n}=\frac{(-1)^{n}n+1}{n}$, compute 
  $$\lim\limits{\inf(a_{n})}$$
  $$\lim\limits{\sup(a_{n})}$$ 
  $$\inf\{a_{n}\}$$
  $${\sup(a_{n})}$$ 

My attempt:
I tried taking different values ​​for the sequence and reached the following results:
$$\lim\limits{\inf(a_{n})}=1$$
$$\lim\limits{\sup(a_{n})}=-1$$ 
$$\inf\{a_{n}\}=3/2$$
$${\sup(a_{n})}=-1$$
The teacher told me to do it more formally, anyone can help me please?
 A: Note that you've interchanged '(lim)inf' and '(lim)sup' throughout your question.
It's helpful to note that 
$$a_n=\begin{cases}
1+\frac1n,&\text{if }n\text{ is even}\\\\
-1+\frac1n,&\text{if }n\text{ is odd}\;.
\end{cases}$$
Let's look first at $\sup_n a_n$. When $n$ is odd, $a_n\le 0$, and when $n$ is even, $a_n>0$, so in order to find $\sup_n a_n$ we need only look at the even-numbered terms: all of them are larger than any of the odd-numbered terms. But the subsequence $\langle a_{2n}:n\in\Bbb Z^+\rangle$ is clearly decreasing, so for every $n\in\Bbb Z^+$ we have $a_n\le a_2=\frac32$. Thus, $\sup_n a_n=\max_n a_n=a_2=\frac32$.
You can make a similar argument for $\inf_n a_n$.
Now let's look at $\limsup_n a_n$. By definition $$\limsup_n a_n=\lim_{n\to\infty}\sup_{k\ge n}a_k\;,\tag{1}$$ so for each $n\in\Bbb Z^+$ we need to see what $\sup\{a_k:k\ge n\}$ is. For this we can reason just as I did above to find that 
$$\sup_{k\ge n}a_k=\begin{cases}
a_n,&\text{if }n\text{ is even}\\
a_{n+1},&\text{if }n\text{ is odd}\;,\tag{2}
\end{cases}$$
but I'll leave the details to you. Once you've shown $(2)$, you just have to evaluate $(1)$, and you should find that it's simply $$\lim_{n\to\infty}a_{2n}=\lim_{n\to\infty}\left(1+\frac1n\right)=1\;.$$ (I doubt that you'll be asked for a formal proof that this limit really is $1$.)
The arguments that you need for $\liminf_n a_n$ are very similar.
A: To make it more formal just use the definitions that you have for lim inf, lim sup, inf, and sup.  Show that your answers meet those definitions.
