# Simple question about closed sets

I have two functions $f,g: \mathbb{R} \rightarrow \mathbb{R}$ which are continuous. Now in a proof one step that is not further explained says that the set

$$M = \{x \in \mathbb{R}| f(x) \leq g(f(x))\}$$ is closed.

I thought about it but could not find a short formal argument and I fear the answer is very trivial because the book explains all others steps very detailed. I noticed that if you instead say $f(x) < g(f(x))$ it is not true anymore because you could set $f(x)=\frac{1}{|x|+1}$ and $g(x)=1$ getting a contradiction for a sequence with $x_n \rightarrow 0$. Thank you in advance.

-
$g\circ f$ is continuous and so is $g\circ f-f$. – Davide Giraudo Jul 7 '11 at 12:30

## 3 Answers

Look at $h(x) = g(f(x)) - f(x)$ and observe that $M = h^{-1}[0,\infty)$ is closed because $h$ is continuous.

-
Rule of thumb: sets defined via $\leq$ involving continuous functions are usually closed, while sets involving $\lt$ are open. – t.b. Jul 7 '11 at 12:37
Thanks this is the perfect explanation :-) – Listing Jul 7 '11 at 12:38
@Listing Let me add an (easy) exercise: if $f,g,h$ are continuous functions $\mathbb{R}\to\mathbb{R}$, which of the following sets is closed: $\{x:f(x)g(x)\leq h(x)\}$, $\{x:\frac{f(x)}{g(x)}\leq h(x)\}$ (if $g\neq 0$ everywhere), $\{-1\leq x\leq 1: f(x)\leq g(x)\}$, and if we have continuous functions $f_N,g_N:\mathbb{R}\to\mathbb{R}$ for each positive integer $N$, $\{x:\text{for all positive integers }N\text{ we have } f_N(x)\leq g_N(x)\}$? – Amitesh Datta Jul 7 '11 at 13:01
(I have included the comment above as part of a list of exercises given as an answer below.) – Amitesh Datta Jul 7 '11 at 13:14
@Amitesh: I saw that, thanks. Already voted on it... – t.b. Jul 7 '11 at 13:16

Both $f$ and $g$ are continuous, so the function $f - g\circ f$ is continuous. Hence $\{x| f(x) - g\circ f(x) \le 0\}$ is closed.

In your case, $$g(x) - g\circ f(x) = 1 = {1\over |x| + 1|} = {|x|\over |x| + 1}.$$ This is continuous everywhere.

-

The following exercise might be useful. In every case, either prove or give a counterexample:

Exercise 1: If $f,g,h$ are continuous functions $\mathbb{R}\to\mathbb{R}$, which of the following sets is closed:

(a) $\{x:f(x)g(x)\leq h(x)\}$,

(b) $\{x:\frac{f(x)}{g(x)}\leq h(x)\}$ (if $g\neq 0$ everywhere),

(c) $\{-1\leq x\leq 1: f(x)\leq g(x)\}$?

Exercise 2: If we have continuous functions $f_N,g_N:\mathbb{R}\to\mathbb{R}$ for each positive integer $N$, is the following set closed: $\{x:\text{for all positive integers }N\text{ we have } f_N(x)\leq g_N(x)\}$?

Exercise 3: If $f_N:\mathbb{R}\to\mathbb{R}$ is continuous for each positive integer $N$ and if $g,h:\mathbb{R}\to\mathbb{R}$ are also continuous, then is the following set closed: $\{x:\text{for some positive integer }N\text{ we have } g(x)\leq f_N(x) + h(x)\}$?

Exercise 4: In the notation of Exercise 3 is the set $\{x:\text{for all positive integers }N\text{ we have } f_N(x)-\sin(h(x)g(x))+e^{f(x)\tan{x}}\leq g(x)\}$ closed?

Exercise 5: If $f,g:\mathbb{R}\to\mathbb{R}$ are continuous, is the set $\{x:\sin(\cos(f(x))g(x))\leq \cos(\sin(g(x))f(x))\}$ closed?

I hope this helps!

-
Wow thank you, I will try to solve it when tex is working again :-D – Listing Jul 7 '11 at 13:34
Lets start: 1. a) b) and c) are all closed using the same argument as Theo when I am not mistaken. On c) you also need that the intersection of closed sets is closed. 2. Yes because it is an intersection of closed sets which is closed. – Listing Jul 7 '11 at 15:02
@Listing Yes, you are correct! – Amitesh Datta Jul 8 '11 at 0:42
(Asking and answering my own thought) For 2, it is an infinite intersection of closed sets, but it doesn't matter. E.g. a boundary for an N might involve 1/N: either the intersection uses the 1/1 case or the 1/oo limit which is closed in the limit. (However, a union of an infinite number of closed sets could be open.) – Mark Hurd Jul 9 '11 at 9:11
@Listing May I ask if you have thought about Exercises 3-5? – Amitesh Datta Jul 9 '11 at 10:24