For a function $f:[-1,1]\rightarrow R$, consider the following statements:
Statement 1: If $$`\lim_{n\to \infty}f\left(\frac{1}{n}\right)=f(0)=\lim_{n\to \infty}f\left(-\frac{1}{n}\right)`,$$then $f$ is continuous at $x=0$
Statement 2: If $f$ is continuous at $x=0$, then $$\lim_{n\to \infty}f\left(\frac{1}{n}\right)=\lim_{n\to \infty}f\left(-\frac{1}{n}\right)=\lim_{n\to \infty}f\left(e^{\frac{1}{n}}-1\right)=f(0)$$
Then which of the above statements is/are true.
My Attempt:
I feel that $\lim_{n\to \infty}f\left(\frac{1}{n}\right)=f(0)$ is same as $\lim_{x\to 0}f(x)=f(0)$, so $f$ should be continuous at $x=0$. So statement 1 must be true.
In statement 2, since $f$ is continuous at $x=0$ we have $\lim_{n\to \infty}f\left(\frac{1}{n}\right)=f\left(\lim_{n\to \infty}\frac{1}{n}\right)=f(0)$. By same logic we can prove $\lim_{n\to \infty}f\left(-\frac{1}{n}\right)=\lim_{n\to \infty}f\left(e^{\frac{1}{n}}-1\right)=f(0)$
Can there be counter-examples to what I am thinking
For first statement
$$f(x)=\begin{cases}0\;\text{ if } x=\frac{1}{n}\; n\in\mathbb{Z}\;\backslash \;\{0\}\\ \\0\;\; \text{if }x=0 \\ \\ 1\; \text{ otherwise}\end{cases}$$
So $$\lim_{n\to\infty}f\left(\frac{1}{n}\right)=\lim_{n\to\infty}f\left(-\frac{1}{n}\right)=0=f(0)$$
But $$\lim_{n\to\infty}f\left(\frac{\sqrt{3}}{n}\right)=1$$
Hence for every $\lim x_n=0$ our $\lim f(x_n)\neq f(0)$
Hence statement is false
Second statement is obvious becouse of continuity of function