I'm trying to prove the following limit using the algebra of limits and first principles, but I run into a problem.
First I find the limit using algebra of limits.
$$x_n = \frac{n+(-1)^n}{n+2} = \frac{1+\frac{(-1)^n}{n}}{1 + \frac{2}{n}} \implies \lim_{n \rightarrow \infty} x_n = 1$$
Next using first principles. Fix $\epsilon > 0$, $N \in \mathbb{N}$
$$n\geq N \implies \left|\frac{n+(-1)^n}{n+2} - 1\right| < \epsilon$$
However when I try set a $n$ to remove the absolute value there doesn't appear to be $n$ (except for something nearing $\infty$) that ensures
$$\left|\frac{n+(-1)^n}{n+2} - 1\right| =\frac{n+(-1)^n}{n+2} - 1 $$
Any help would be much appreciated!
$|{n+(-1)^n \over n+2} -1| = |{2-(-1)^n \over n+2}|\le {3 \over n}$.