# For integrable $f$ finding continuous $\phi$ and $\psi$ such that $\phi<f<\psi$ and $\int\psi-\phi<\varepsilon$

Let $A\subset\mathbb{R}^n$ and suppose $f:A\to\mathbb{R}$ is integrable. Show that for any $\varepsilon>0$ there are continuous functions $\phi,\psi:A\to\mathbb{R}$ such that $\phi(x)<f(x)<\psi(x)$ for all $x\in A$ and $\int_A\psi-\phi<\varepsilon$

This is somewhat similar to This question, but there they only deal with the one-dimensional case (and there isn't even an answer).

I think I understand the theoretical idea, that as the set of points of discontinuities of $f$ is negligible we can find boxes $\{Q_i\}_{i\in\mathbb{N}}$ containing it, and each of these boxes must have at least one edge whose length converge to 0.

We then use the same construction we use in the one-dimensional case, of $\psi$ and $\phi$ which are identical to $f$ outside a box somewhat larger than $Q_i$, equal to $\sup f$ and $\inf f$ on $Q_i$ respectively and then taking the maximum/minimum of connecting the edge points of $Q_i$ with the continuous part of $f$ linearly and the actual behaviour of $f$.

But I'm having a really rough time formalizing it. I'm not sure how to show that we can find sets $Q_i$ which are disjoint (so that this construction could work), and I'm not sure how to explicitly write the "connecting of the edge point of $Q_i$ with the continuous part of $f$".

Any insights?

edit: I've still been trying to formalize it. I solved one of the problems, that is if I have a collection of open balls $\{Q_i\}$ such that $$\sum_i\rm{vol}(Q_i)<\delta$$ I can take a collection of open balls $\{Q_i'\}$ where each $Q_i'$ is a ball centered at the center of $Q_i$ with double the radius, and then $$\sum_i\rm{vol}(Q_i')<c\cdot\delta$$ for some $c\in\mathbb{R}$, and then if for some $i,j$, $$Q_i'\cap Q_j'\neq\emptyset$$ I replace $Q_i$ and $Q_j$ with $Q_i\cup Q_j$ (and similarly for $Q_i', Q_j'$).

Now I want to define $\phi,\psi$ very similarly somewhat like this:

$$\psi(x)=\begin{cases} f(x) & \forall i, x\notin Q_i'\\ \sup(\{f(a)| a\in Q_i\}) & \exists i,x\in Q_i\\ \max\{f(x),\text{Some continuous connection}\} & \rm{Otherwise} \end{cases}$$

and

$$\phi(x)=\begin{cases} f(x) & \forall i, x\notin Q_i'\\ \inf(\{f(a)| a\in Q_i\}) & \exists i, x\in Q_i\\ \min\{f(x),\text{Some continuous connection}\} & \rm{Otherwise} \end{cases}$$

where I have that, supposing $\sup f=M$ and $\inf f = m$

$$\int_A\left(\psi-\phi\right)=0+\sum_i\int_{Q_i'}\left(\psi-\phi\right)\leq\sum_i\int_{Q_i'}\left(\sup_{Q_i'}f-\inf_{Q_i'}f\right)\leq c\delta(M-m)$$

This works as $\delta$ is as small as I wish, but I still don't know how to deal with the "Some continuous connection" part in the definition of $\phi$ and $\psi$. Also I was told the continuous can be interchanged with smooth and even infinitely differentiable, where again I'd love insight on how this is done..

• Hint: Simple Functions – Alessandro Blasetti Nov 24 '16 at 9:26
• @AlessandroBlasetti Unfortunately not sure how to use that hint. I guess these are the multi dimensional version of step functions? But it still doesn't help me formalize everything rigorously... – Nescio Nov 25 '16 at 19:25

It is (almost) in the answer of the question you quote, but it is in the form of a comment.

In any case, it's not rocket science to smooth out any regular partition of $f$, so that the upper partition and lower partitions form a continuous function, but the details of how to do that depend on the function you choose, so they are usually omitted in more advanced courses, in favor of some handwaving about "smoothing the corners".

Without further ado then, here is an example using bump functions. Suppose that your partition is the following elementary part of $f$ (with upper sums green and lower sums blue):

Consider the function:

$$p(x)=\begin{cases} e^{-1/x}, x>0\\ 0, otherwise \end{cases}$$

And then the (normalized) bump function(s) defined as:

$$g_n(x)=e\cdot p(1-nx^2)$$

These converge uniformly in $(-\epsilon,0)$, so you can use them (displaced) to "patch" the upper and lower sums as follows:

Now if you, instead of the original upper and lower sums $U(f,p_i)$, $L(f,p_i)$ use $U(f,p_i)=$ modified continuous function with blue and $L(f,p_i)=$ modified continuous function with green, everything in the proof should follow easily, particularly taking into account the uniform convergence of the bump functions.

This is an example which points beyond simple continuity, as these functions can be arranged to be $C^k$ for any $k>0$.

• This works for one dimension, but how would you patch this for $f$ from $\mathbb{R}^n$? – Nescio Nov 26 '16 at 9:49
• By patching $n$- dimensional cubes of the Upper and Lower sums there, with appropriate $C^k$ surface bump functions. Do you see a problem with that? – Yiannis Galidakis Nov 26 '16 at 10:01
• How do you "patch $n$ dimensional cubes with appropriate $C^k$ surface bump functions"? I don't think just saying that is what I do is very rigorous (and I already got that far myself, as is hopefully clear in the question itself) – Nescio Nov 26 '16 at 10:05
• Right. And your proof is correct, modulo the actual construction (some continuous connection), which was given an example to show how it works for $n=1$. For two dimensions the details are of course more involved. – Yiannis Galidakis Nov 26 '16 at 10:08