I am trying to learn about $\liminf$ and $\limsup$, as I have struggled with the definition of these, and mostly just avoided questions about this in the past. I have had a go at answering a question posted earlier, but do not feel confident enough with my attempt to post an answer. I have had a go at answering it, and will put my 'proof' here. If I can get some advice on where (if anywhere) I have gone wrong, or any nice tricks I have missed out on using I would be grateful
Question: Let $f:(0,1) \rightarrow \mathbb{R}$ be a continuous function in the standard euclidean metric space $($$\Bbb R$,$d_2$$)$. Let
$\displaystyle\liminf_{x\rightarrow0} f(x)<\limsup_{x\rightarrow0} f(x).$
Prove that for every $l \in (\liminf_{x\rightarrow0} f(x),\limsup_{x\rightarrow0} f(x))$ there exists a sequence $x_{n}$ in $(0,1)$ that converges to $0$ and such that $\lim_{n\rightarrow \infty} f(x_{n}) = l$
My Attempt: I first denote
$\displaystyle I \equiv \left(\liminf_{x\rightarrow0} f(x),\ \limsup_{x\rightarrow0} f(x)\right)$
and let
$y_{n} = f(x_{n})$.
Then
$\displaystyle I = \left( \liminf_{n\rightarrow\infty}f(x_{n}), \limsup_{n\rightarrow\infty}f(x_{n}) \right)\\ \ \ =\displaystyle \left( \liminf_{n\rightarrow\infty}y_{n}, \limsup_{n\rightarrow\infty}y_{n}\right).$
As I understand it $\liminf$ is the largest lower bound of all limit points of subsequences of the sequence $\{y_{n}\}$, and $\limsup$ is the lowest upper bound of all limit points of subsequences of the sequence $\{y_{n}\}$. Hence for arbitrary $l \in I$, there is a subsequence $\{y_{n_{k}}\}$ such that
$\displaystyle\lim_{k\rightarrow\infty}y_{n_{k}} = l.$
Expanding out
$\displaystyle\lim_{k\rightarrow\infty}y_{n_{k}} = \lim_{k\rightarrow\infty}f(x_{n_{k}}) \\ \qquad \quad\ =\displaystyle f\left(\lim_{k\rightarrow\infty}x_{n_{k}}\right) \quad \text{(by continuity of } f\text{)}.$
Now $\lim_{k\rightarrow\infty}x_{n_{k}} = 0$, so I have found a sequence $\{x_{n}\}$ such that $\lim f(x_{n}) = l$, and since $l \in I$ was arbitrary this means we can do this for all $l \in I$.
I can't see a flaw in this reasoning, but the reason that I am dubious about this is that I have really struggled with $\liminf$ and $\limsup$ in the past, whereas this seemed quite easy.
Thanks for reading, Keeran