-2

Let $C_c(X,\mathbb{R})$ be the space of continuous functions $f:X\to\mathbb{R}$ of compact support, i. e. the closure of the set $\{x\in X:f(x)\not=0\}$ is compact. Then $C_c(X,\mathbb{R})$ is a subspace of $C_B(X,\mathbb{R})$. So I want to know if there is an example showing that $C_c(X, \mathbb{R})$ is not closed in $C_B(X,\mathbb{R})$.

Note: $C_B(X,\mathbb{R})$ is the set of all continous and bounded functions from $X \to \mathbb{R}$

Thanks a lot in advance :)

user162343
  • 3,383

3 Answers3

1

Consider a sequence of functions $f_k : \mathbb{R} \to \mathbb{R}$ such that the graph of each $f_k$ is a triangle whose base is the interval $[-k,k]$ and whose height is $2^{-k}$. Then $f_k$ is continuous, and it has compact support $[-k,k]$, and moreover, $|f_k(x)| \leq 2^{-k}$ for all $x \in \mathbb{R}$.

Let $s_n(x) = \sum_{k=1}^{n}f_k(x)$, the sum of the first $n$ triangles. Then $s_n$ is continuous (it is the sum of finitely many continuous functions), and it has compact support $[-n,n]$. So $s_n \in C_c(\mathbb{R}, \mathbb{R})$.

Now take the limit as $n \to \infty$ to obtain the function $$s(x) = \lim_{n \to \infty}s_n(x) = \sum_{k=1}^{\infty}f_k(x)$$ This sum converges uniformly by the Weierstrass M-test. Therefore the sequence $s_n$ converges uniformly. Consequently, $s$ is a continuous function, and it is bounded by $\sum_{k=1}^{\infty}2^{-k} = 1$. Therefore, $s \in C_B(\mathbb{R},\mathbb{R})$.

But $s$ does not have compact support. Indeed, $s(x) > 0$ for all $x \in \mathbb{R}$. To see this, note that $f_k(x) \geq 0$ for all $x$ and $k$, and therefore for each $x$, the sequence $(s_n(x))$ is an increasing sequence of nonnegative numbers. Moreover, given any $x \in \mathbb{R}$, there is some natural number $K > |x|$, so $x$ lies in in the interior of the support of triangle $f_K$ (and all triangles $f_k$ with $k > K$). Therefore, $s(x) \geq f_K(x) > 0$.

  • Thanks a lot @Bungo, so is it suffices showing that $s(x)>0$ to have a non compact support? – user162343 Sep 11 '15 at 01:30
  • 1
    @user162343: Yes, If $s$ has compact support then $s(x) = 0$ outside some compact set. That can't happen if $s(x) > 0$ everywhere. –  Sep 11 '15 at 01:31
  • 1
    @user162343: By the way, the fact that I chose $f_k$ to be triangular is irrelevant. The same proof works if $f_k$ is any function which is continuous, with compact support $[-k,k]$, with $f_k(x) > 0$ for all $x \in (-k,k)$, and $f_k(x) \leq 2^{-k}$ for all $x$. –  Sep 11 '15 at 01:32
  • Ok, jajaja and again, let me check it and tomorrow I tell you if I have doubts right? – user162343 Sep 11 '15 at 01:32
  • @user162343: Sure, no problem. –  Sep 11 '15 at 01:32
  • I think you chose triangular so the above properties are clear right? – user162343 Sep 11 '15 at 01:33
  • 1
    @user162343: Yes, exactly, triangles are a simple example which is easy to visualize. –  Sep 11 '15 at 01:34
1

(Assuming you are taking the topology given by the uniform norm):

Consider the function $f(x)=e^{-x^2}$.

Now, take $f_n(x):=\chi _{[-n,n]}e^{-x^2}$ glued with lines in the ends of $[-n,n]$ in order to make it with continuous with compact support. We see that $f_n \rightarrow f$, but $f$ is not compactly supported.

Aloizio Macedo
  • 35,361
  • 6
  • 74
  • 155
  • Hi! I was reading your answer because I'm facing the same problem. If we take the function given in the answer of that question:https://math.stackexchange.com/questions/2174392/about-approximations-of-functions-in-c-o-mathbbr-by-c-c-mathbbr (to make $f_n(x)$ continuous), we have $|f_n-f|_\infty=\sup{e^{-x^2}|g_n(x)-1|:x\in\mathbb{R}}\leq \sup{e^{-x^2}:x\in\mathbb{R}}$. Why this tends to zero? – user326159 Feb 23 '19 at 21:15
1

Define $g$ on $[-2,2]$ by joining the points $(-2,0),(-1,1),(1,1),(2,0)$ with straight line segments. Then set $g=0$ on $\mathbb {R}\setminus [-2,2].$ For $x \in \mathbb {R},$ set

$$f_n(x) = \frac{g(x/n)}{1+x^2}.$$

We have $f_n \in C_c$ for all $n,$ and $\|f_n(x)- 1/(1+x^2)\| \le 1/(1+n^2) , n \in \mathbb {N}.$ Thus $f_n$ is a sequence in $C_c$ converging to a function not in $C_c$ in the metric of $C_B.$

zhw.
  • 107,943