Prove the following function $f$ is continuous

76 Views Asked by At

Let $(X,d)$ be a metric space, $A \subset X$ be nonempty, and $f: X \to \mathbb R, \ f(x) = \max\{1-d(x,A),0\}$ for all $x \in X$. Show $f$ is continuous.

This is an exercise from some test revision material. The example proof used Lipschitz continuity for $g(x) = 1-d(x,A)$, and proved $h(y) = \max\{y,0\}$ is continuous from which continuity for $f$ follows. This is clear to me. However, I tried to prove this using the preimage criterion. My work goes as follows.

Let $U \subset \mathbb R$ be open. Now if $u \in U$, then for some $r>0$ we have $B=B(u,r) \subset U$. Let $C = f^{-1}(B)$. Now $$C = \{y \in X \mid f(y) \in B\} = \{y \in X \mid |\max\{1-d(y,A),0\} - u| < r\}.$$ This is where I get stuck. How should I continue, or is the preimage approach a bad idea for this exercise?

EDIT: For clarification, I'm having trouble choosing $r$ so that $B_d(y,r) \subset C$ for $y \in C$.

1

There are 1 best solutions below

1
On BEST ANSWER

It's generally a better idea to have a set of tools to show continuity, to handle functions that occur in practice, which are often built up from simpler functions that are more easily shown to be continuous by the definitions.

In your case, with some "overkill":

  • The function $X\to \Bbb R$ defined by $x \to d(x,A)$ is (Lipschitz-)continuous as $$\forall x,y \in X: |d(x,A)-d(y,A)| \le d(x,y)$$

  • The sum and difference of two real-valued continuous functions on $X$ is also continuous. This follows from $(x,y)\in \Bbb R^2 \to x\pm y \in \Bbb R$ being continuous functions, plus standard facts on product topologies.

  • Constant maps are always continuous. So $x \to 1-d(x,A)$ is continuous by that (or use the same Lipschitz argument, as the term $1$ cancels, but I wanted to show the general idea).

  • If $f,g: X \to \Bbb R$ are continuous so is $x \to \max(f,g)$. This is a general fact for functions into an ordered topological space.

  • Your function $f$ is just the previous applied to $1-d(x,A)$ and a constant map again.

I'd say, one you can build up these "chains of continuity", forget about trying to show continuity by first principles (like $\epsilon$-$\delta$ or inverse images of open sets); these are often used to prove the building blocks and once you have some theory at your disposal let the theory help make your life easier, I say.