## Approximation with continuous functions

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

Is it true that for every function $\mathbb{R} \to \mathbb{R}$ there exists a sequence of continuous functions $f_n(x): \mathbb{R} \to \mathbb{R}$ such that for any $x \in \mathbb{R}$ $f_n(x)$ converges to $f(x)$?

I started with characteristic function of rationals and tried to find corresponding sequence and got stuck. So additional question if this statement is true for this function.

-

12
See "Baire function" - en.wikipedia.org/wiki/Baire_function – Yemon Choi Jul 10 2010 at 6:02
Is $f$ at least measurable? and are you asking about convergence everywhere, or almost everywhere? – Piero D'Ancona Jul 11 2010 at 7:17

## 5 Answers

Quick answer since it is late:

What you want to do is look up Baire function'' (in Wikipedia, for example).

Here is a simple way of seeing that the answer is negative: Any continuous function $f:{\mathbb R}\to{\mathbb R}$ is determined by its value on the rationals, so by an easy counting argument, there are only as many continuous functions as there are reals. Since a sequence of reals can be easily coded by a single real, there are only $|{\mathbb R}|$-many functions that are limit of sequences of continuous functions (you could replace "pointwise limit" with just about anything you want as long as the countable sequence suffices to describe the new function). But there are $2^{|{\mathbb R}|}$ many functions from ${\mathbb R}$ to itself.

This argument shows that even if you iterate the process (the Wikipedia entry talks about class $n$ Baire functions for all $n\in{\mathbb N}$. You need to go on much longer through a transfinite process), you have to iterate it for a very long time if you hope to capture all functions this way.

Let me add something of an advertisement, now that I have some time. Pete Clark's comments in another answer show that $\chi_{\mathbb Q}$ is not the pointwise limit of continuous functions. For this, he described a characterization of the Baire class 1 functions that clearly $\chi_{\mathbb Q}$ does not satisfy.

The argument above, on the other hand, only refers to cardinality considerations, so it does not apply to specific examples.

One can refine the argument (essentially, by a sophisticated use of Cantor's diagonalization) by appealing to techniques of descriptive set theory. Here, one studies definable'' classes of functions $f:{\mathbb R}\to{\mathbb R}$ or, more generally, of subsets of ${\mathbb R}^n$, and it is therefore the right setting for this type of problems.

The simplest kind of definability a function my have is that its graph is Borel (this is the case if the function is continuous, for example). From here, a very large hierarchy of levels of complexity of subsets of ${\mathbb R}^m$ is defined, starting by taking projections of Borel subsets of ${\mathbb R}^{m+1}$, and complements, and then iterating this procedure.

The fact that we can actually iterate the procedure, i.e., that the hierarchy does not collapse, is where Cantor's diagonalization appears. Anyway, any class of functions with a simple description is easily seen to belong to a (tipically, very short) initial segment of this hierarchy, and so we know it cannot capture the class of all functions. Many variants of your question are seen immediately to have negative answers through this procedure, which has the advantage of separating levels of complexity in a more refined way than mere cardinality.

An excellent reference you may want to look at is Alekos Kechris's book.

-

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

Well, if you look at the Dirichlet function, which is the characteristic function of the rationals in $[0,1]$ it can be written as the double pointwise limit: $$f(x)= \lim_{k\to\infty}\left(\lim_{j\to\infty}\left(\cos(k!\pi x)^{2j}\right)\right)$$ This definition holds for any $x \in \mathbb{R}$ as well.

(Taken from Wikipedia, Nowhere continuous function)

-

Yep.  So it's of Baire class 2, not of Baire class 1 (which, as already mentioned, is the set described by the asker). – Nate Eldredge Jul 12 2010 at 15:23

I quote a theorem due to Lusin:

Let $X$ be a locally compact Hausdorff space and let $\mu$ be a regular Borel measure on $X$ such that $\mu(K)<\infty$ for every compact $K\subseteq X$. Suppose $f$ is a complex measurable function on $X$, $\mu(A)<\infty$, $f(x)=0$ if $x\in X\setminus A$, and $\epsilon>0$. Then there exists a continuous complex function $g$ on $X$ with compact support such that

$\mu({x:f(x)\neq g(x)})<\epsilon$.

Furthermore, the function $g$ can be chosen such that

\$sup_{x\in X}|g(x)|\leq sup_{x\in X}|f(x)|.

As an immediate corollary (which is more relevant to your question), observe that:

If the hypotheses of Lusin's theorem are satisfied and if $|f|\leq 1$, then there is a sequence ${g_n}$ of continuous complex functions with compact support such that $|g_n|\leq 1$ for all $n$ and

$f(x)=\lim_{n \to \infty}g_n(x)$

almost everywhere with respect to $\mu$.

Note that the proof of Lusin's Theorem requires Urysohn's lemma for locally compact Hausdorff spaces, or at least a variation of it. (A very similar argument to that used to prove Urysohn's lemma for Normal Hausdorff spaces establishes the fact that any locally compact Hausdorff space is completely regular.) For more details on these results and their proofs, see Chapter 2 of the second edition of Walter Rudin's Real and Complex Analysis. (The results can be more precisely located on pages 56 and 57.)

-

Quick, but less sharp, answer: The bounded Borel measurable functions are closed under bounded pointwise convergence. So any bounded non-measurable function is not the pointwise limit of continuous functions.

-

The question is ill-posed. A function continuous in one topology might not be continuous in another topology. The same goes for convergence. When you precisely formulate your question, I am sure you will be able to come with the answer.

-

2
Huh? I think it's clear that the OP is talking about the classical topology on R and pointwise convergence... – Andy Putman Jul 10 2010 at 6:17

3
This is an unhelpful answer. There is a standard topology on $\mathbb{R}$, and surely that is the one the OP intends. Just asking the question precisely (as the OP has done) does not suggest the answer. Rather, as Yemon Choi points out, this question is the beginning of theory of Baire classes: a function is in Baire class one if it is a pointwise limit of continuous functions. Such functions have to have a dense subset of points of continuity, ruling out the characteristic function of $\mathbb{Q}$. – Pete L. Clark Jul 10 2010 at 6:20

3
Slight correction: a real function $f$ is in Baire class one iff: for every nonempty closed subset $P \subset \mathbb{R}$ without isolated points, there exists $x \in P$ such that the restriction of $f$ to $P$ is continuous at $x$. Taking $P$ to be a closed interval $[a,b]$, this shows that there is a dense subset of points at which $f$ is either left- or right- continuous. This is not the case for $\chi_{\mathbb{Q}}$. – Pete L. Clark Jul 10 2010 at 6:28
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 53, "mathjax_display_tex": 1, "mathjax_asciimath": 2, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9415366053581238, "perplexity_flag": "head"}