# Suppose that the function $f:[0,1]\rightarrow \mathbb{R}$ is continuous and that $f\left(x\right)>2$

Suppose that the function $f:[0,1]\rightarrow \mathbb{R}$ is continuous and that $f\left(x\right)>2$ if $0\leq x<1$. Is it necessarily true that $f\left(1\right)>2$?

My attempt:

Yes, using the sequence definition of continuous.

Since $f$ is continuous at $x=1$, so we can take $x_n\rightarrow 1$ as $n\rightarrow \infty$, then $f\left(x_n\right) \rightarrow f\left(1\right)$ as $n\rightarrow \infty$.

Furthermore, $f\left(x_n\right)>2$ $\forall$ $x_n$ where $0\leq x_n < 1$.

$\implies f\left(1\right)>2$.

Does this make sense?

You need to be careful with the distinction between $\geq$ and $\gt$. Specifically, just because a sequence has values that are $\gt 2$, it doesn't mean that the limit is $\gt2$, just that it's $\geq2$.
In your case, $f(x)=3-x$ fulfills the criteria, but $f(1) =2$.
HINT: Consider the function $f(x)=3-x$. For further explanation/discussion see the spoiler-protected block below, but think about that function a bit first.
Think about the fact that $0$ is the limit of a sequence of positive numbers (e.g., of the reciprocals $\frac1n$; now translate this upwards by $2$ units to see that the limit of a sequence of numbers greater than $2$ need not itself be greater than $2$.