Let $\left\{x_n\right\}$ be a sequence such that $x_n= (-1)^n+\cos\frac{n\pi}{4}$. Find $\sup\left\{x_n\right\}$ and $\inf\left\{x_n\right\}$.
$(-1)^n=-1$ (when $n$ is odd), $1$(when $n$ is even).
$\cos\frac{n\pi}{4}= \frac{1}{\sqrt2}$ or $-\frac{1}{\sqrt2}$(when $n$ is odd), $0, 1$ or $-1$(when $n$ is even).
So, from the values, I can directly write $\sup\left\{x_n\right\}=2$ and $\inf\left\{x_n\right\}=-1-\frac{1}{\sqrt2}$.
But I want to know, does the sequence $\left\{x_n\right\}$ converge? If yes, to which point does it converge?
Please anyone help me. Thanks in advance.
The sequence does not converge. Note that $x_{n+8} = x_n$, and so the sequence is periodic, but it takes at least two distinct values, so it can never converge to a single value.