Continuity iff lower/upper semi continuity (using $\epsilon$-$\delta$)

calculuscontinuityepsilon-deltametric-spacesreal-analysis

The definitions that I am using are:

A real valued function $f$ defined on a metric space X is said to be continuous at $x$ iff for each $\epsilon > 0$ there exists $\delta > 0$ such that if $|x-y| < \delta$ then $|f(x)-f(y)| < \epsilon$.

A function is said to be lower semicontinuous if $\{x : f(x) > t\} =: \{f > t\}$ is open and upper semicontinuous if $\{x : f(x) < t\} =: \{f < t\}$ is open.

Statement: Show that $f$ is continuous iff it is lower/upper semicontinuous.

Sketch of work: Let $f$ be continuous. Take $x \in \{f < t\}$. Then $f(x) < t$. Since $f$ is continuous, namely at $x$, then for $\epsilon = t – f(x) > 0$ there exists $\delta > 0$ such that if $|x-y| < \delta$ then $|f(x)-f(y)| < |f(x)-t| < \epsilon$. This mean sthat $f(y)-f(x) < \epsilon$ which by adding up $f(x)$ yields $f(y) < \epsilon + f(x) = t$. Hence $y \in \{f < t\}$. A similar argument shows that $\{f > t\}$ is also open.

Now its the part that I am not sure about:

Assume that f is both lower/upper semicontinuous. Our goal is to prove that $f$ is continuous at $x$. Let $\epsilon > 0$. Choose $t > 0$ such that $|f(x) – t| < \epsilon/2$. Then $x \in \{f < t\}$. Since this set is open, we can find $r > 0$ such that if $y \in B(x,r) := \{a : |x-a| < r\}$ then $f(y) < t$. But then, $$|f(x)-f(y)| = |f(x)-f(y)+t-t| \leq |f(x)-t|+|f(y)-t| < \epsilon.$$In this step I used the fact that $|f(x)-t| < \epsilon$ and that the distance from $f(y)$ to $t$ must be smaller than $\epsilon$ as well because otherwise the open set would not be contained in $\{f > t\}$.

Can anyone verify if my reasoning is correct?

Thank you very much.

Best Answer

There are a few mistakes in your proof of the second direction of implication, firstly we cannot be guaranteed to find a $t>0$ such that

$$ |f(x)-t|<\frac{\varepsilon}{2} $$

Since for example $f(x)$ could be very large and negative. So I'm assuming you meant to choose $t>f(x)$, since then we can also conclude $x\in\{f<t\}$

Secondly, we only know that

$$ |f(x)-t|<\frac{\varepsilon}{2} $$

And we know that there must be some open ball around $x$ which is contained in $\{f<t\}$, but every element $y$ of this open ball except $x$ could have $f(y) = t-3\varepsilon$, in which case we can't conclude that $|f(x)-f(y)|<\varepsilon$. The key point is that using only upper semicontinuity is not sufficient, it should also be suspicious to you that you seemingly proved a theorem which is much stronger than the one asked in the exercise. So we suspect we need to use both upper and lower semicontinuity, and the way to do so is to also choose $t'<f(x)$ such that

$$|t'-f(x)|<\varepsilon/2$$

(in fact, one can actually just take $t'=f(x)+\varepsilon/2$ and $t=f(x)+\varepsilon/2$ ) and then to note that since both of these are open, their intersection is open, and therefore there is some open ball around $x$ which is contained in the intersection.

What can you say about the distance between any element in this open ball and $x$, when you apply $f$ to them? Can you still have for example $f(y)= f(x)-3\varepsilon$ for some $y$ in this open ball ? Why or why not?

Related Question