Find supremum and infimum of a subset of $\mathbb{R}$. Check my answer.

41 Views Asked by At

Given $S\subseteq \mathbb{R}$. $$S=\left\{x\in\mathbb{R}\mid x=\dfrac{1}{n}+(1+(-1)^n)n^2, n\in\mathbb{N}\right\}$$ Find $\sup S$ and $\inf S$.

I have tried to answer as below. $$ x= \begin{cases} \dfrac{1}{n}&\text{ if }n \text{ odd }\\ \dfrac{1}{n}+2n^2&\text{ if }n \text{ even} \end{cases} $$ The lower bound of $S$ is $0$ and no upper bound of $S$. So I can conclude $$\sup S=\text{undefined}$$ and $$\inf S=0.$$

Does my answer is correct?