Tutorials › Real Analysis › Approximating Functions by Simple Functions

Measure Theory · Tutorial 845 of 1000

Approximating Functions by Simple Functions

You will construct increasing simple approximations to nonnegative measurable functions and extend pointwise approximation to real-valued measurable functions.

Advanced 9 min read

What You'll Learn

  • Construct simple functions by quantizing values on a dyadic grid and truncating them.
  • Prove that the approximations increase pointwise and converge to the original function.
  • Use measurable threshold sets to verify that each approximating function is measurable.
  • Obtain a pointwise error bound once the truncation level exceeds the function value.
  • Extend pointwise simple approximation from nonnegative functions to real-valued functions.
  • Recognize why a common truncation is needed when approximating an unbounded function.

Building Measurable Functions from Simple Ones

A simple function records only finitely many values, while a general measurable function may take infinitely many values and may be unbounded. The preceding tutorials showed how indicators encode measurable sets and how finite combinations of indicators give simple functions. We now use those ideas in the opposite direction: approximate a nonnegative measurable function by a sequence of simple functions.

The construction has two controls. We round function values downward to a fine grid, and we cap large values at a finite level. Each approximation therefore has only finitely many values. As the grid becomes finer and the cap rises, the approximations increase toward the function. This is a pointwise statement: the approximating functions need not approach the target uniformly over the entire space.

A Dyadic Construction

Let \((X,\mathcal{F})\) be a measurable space, and let \(f:X\to[0,\infty)\) be measurable and finite-valued. For each positive integer \(n\), define

$$ s_n(x)=2^{-n}\sum_{k=1}^{n2^n}\mathbf{1}_{\{f\geq k2^{-n}\}}(x). $$

The sum has finitely many terms, and its largest possible value is \(n\). At a point \(x\), it counts how many grid levels \(k2^{-n}\) do not exceed \(f(x)\), stopping at the cap \(n\). Thus it rounds \(\min(f(x),n)\) downward to the nearest multiple of \(2^{-n}\).

Definition (Dyadic Simple Approximation): For a nonnegative measurable function \(f:X\to[0,\infty)\), its \(n\)-th dyadic simple approximation is $$ s_n=2^{-n}\sum_{k=1}^{n2^n}\mathbf{1}_{\{f\geq k2^{-n}\}}. $$

Each set \(\{f\geq k2^{-n}\}\) is measurable by the threshold characterization of measurability established earlier in the course. Its indicator is therefore measurable by the Measurability of an Indicator Function Theorem. The sum is finite, so the Arithmetic Closure of Simple Functions Theorem shows that \(s_n\) is simple; alternatively, it is a finite linear combination of measurable indicators. In particular, every approximant is measurable and takes only finitely many values.

Worked Example: Approximating the Identity on a Bounded Interval

Let \(X=[0,2]\) with its Borel sigma-algebra, and take \(f(x)=x\). For \(n=1\), the construction gives

$$ s_1(x)=\frac12\left( \mathbf{1}_{\{x\geq 1/2\}}(x)+ \mathbf{1}_{\{x\geq 1\}}(x) \right). $$

At \(x=1.3\), both indicators in the sum are \(1\), so \(s_1(1.3)=\frac12(1+1)=1\). For \(n=2\), the grid spacing is \(1/4\), and \(1.3\) exceeds \(1/4,2/4,3/4,4/4,\) and \(5/4\), but not \(6/4\). Hence \(s_2(1.3)=5/4=1.25\). This is closer to \(1.3\) than the first approximation. Every set used here is an interval intersected with \([0,2]\), so it is Borel measurable.

Increasing Approximations and Pointwise Convergence

The grid spacing at stage \(n+1\) is half the spacing at stage \(n\), and its cap is larger. The next theorem verifies that these changes make the simple approximations increase, not merely become more accurate.

Theorem (Increasing Simple Approximation): Let \(f:X\to[0,\infty)\) be a finite-valued measurable function, and define \(s_n\) by the Dyadic Simple Approximation. Then each \(s_n\) is a nonnegative simple measurable function, $$ s_n(x)\leq s_{n+1}(x)\leq f(x)\quad\text{for every }x\in X, $$ and \(s_n(x)\to f(x)\) for every \(x\in X\).

Proof. Simplicity and measurability were established above. Fix \(x\in X\) and write \(t=f(x)\). The value \(s_n(x)\) is \(2^{-n}\) times the number of integers \(k\) satisfying \(1\leq k\leq n2^n\) and \(k2^{-n}\leq t\). Every counted term contributes \(2^{-n}\), and the corresponding threshold is at most \(t\). Therefore \(s_n(x)\leq t\), which proves the upper bound.

To compare consecutive approximations, consider any coarse-grid level \(k2^{-n}\), where \(1\leq k\leq n2^n\). At stage \(n+1\), the two levels \[ (2k-1)2^{-(n+1)}\quad\text{and}\quad 2k2^{-(n+1)} \] are both at most \(k2^{-n}\). If \(t\geq k2^{-n}\), then both of these finer levels are at most \(t\). Both indices are included in the stage-\((n+1)\) sum, since \(2k\leq n2^{n+1}\leq(n+1)2^{n+1}\). Their combined contribution is \(2\cdot 2^{-(n+1)}=2^{-n}\), exactly the contribution of the coarse level at stage \(n\). Applying this pairing to every coarse level counted by \(s_n(x)\), and noting that any other terms in \(s_{n+1}(x)\) are nonnegative, gives \(s_n(x)\leq s_{n+1}(x)\).

It remains to show convergence. Since \(t\) is finite, choose \(n>t\). The cap \(n\) then does not affect the value at \(x\), so \[ s_n(x)=2^{-n}\lfloor 2^nt\rfloor, \] where \(\lfloor y\rfloor\) denotes the greatest integer not exceeding \(y\). The defining property of the floor gives \[ \lfloor 2^nt\rfloor\leq 2^nt<\lfloor 2^nt\rfloor+1. \] After multiplying by \(2^{-n}\), this becomes \[ 0\leq t-s_n(x)<2^{-n}. \] As \(n\to\infty\), the right-hand side tends to zero. Thus \(s_n(x)\to t=f(x)\). Since \(x\) was arbitrary, convergence holds pointwise on \(X\). \(\square\)

Worked Example: Approximating a Nonlinear Function

On \(X=[0,2]\), let \(f(x)=x^2\). This function is nonnegative and continuous, hence Borel measurable. At stage \(n=2\), the levels are \(1/4,2/4,\ldots,8/4\). At \(x=1.1\), we have \(f(1.1)=1.21\), which exceeds \(1/4,2/4,3/4,\) and \(4/4\), but not \(5/4\). Thus \[ s_2(1.1)=4\cdot\frac14=1. \] The difference is \(1.21-1=0.21\), which is nonnegative and less than \(1/4\), as the grid error bound predicts because the cap \(2\) exceeds \(1.21\). The threshold sets \(\{x\in[0,2]:x^2\geq k/4\}\) are Borel, so this construction does give simple measurable functions.

Worked Example: An Unbounded Function on Its Domain

Take \(X=(0,1]\) and \(f(x)=1/x\). This function is continuous on its domain, nonnegative, and unbounded. At \(x=1/3\), the value is \(3\). At stage \(n=2\), the cap is \(2\), so \(s_2(1/3)=2\). At stage \(n=3\), the cap is \(3\) and the grid spacing is \(1/8\); since \(3\) is a grid value, \(s_3(1/3)=3\). At \(x=2/5\), the function value is \(5/2\). The stage-\(2\) approximation is capped at \(2\), while stage \(3\) represents \(5/2\) exactly because \(5/2=20/8\). Thus \(s_2(2/5)=2\) and \(s_3(2/5)=5/2\).

Although \(f\) is unbounded on \(X\), it is finite at every individual point. For each fixed \(x>0\), once \(n>1/x\), the cap no longer affects \(f(x)\), and the grid error is less than \(2^{-n}\). This is why the construction converges pointwise even though no single finite cap controls the function everywhere.

Real-Valued Functions and the Role of Truncation

The increasing approximation theorem is stated for nonnegative functions, which is the form most useful when building integration theory. A real-valued measurable function can still be approximated pointwise by simple functions, although the approximants need not increase. Separate its positive and negative parts: \[ f^+(x)=\max(f(x),0),\qquad f^-(x)=\max(-f(x),0). \] These are measurable because they are compositions of \(f\) with continuous real-valued functions. They are nonnegative, and \(f=f^+-f^-\). Apply the theorem to obtain increasing simple functions \(u_n\to f^+\) and \(v_n\to f^-\). By arithmetic closure, \(u_n-v_n\) is simple, and \[ u_n(x)-v_n(x)\longrightarrow f^+(x)-f^-(x)=f(x) \] at every point. This gives pointwise simple approximation for every finite-valued real measurable function.

Truncation is essential when the function is unbounded. Rounding all values on a fixed grid without a cap would generally produce infinitely many possible values and therefore not a simple function. Capping at \(n\) ensures finite range at each stage; allowing that cap to rise ensures that each fixed finite value is eventually no longer truncated. The grid simultaneously becomes finer, controlling the remaining rounding error.

The result matters because it reduces questions about nonnegative measurable functions to questions about simple functions, whose values and level sets are finite in number. In later measure-theoretic arguments, estimates or constructions can first be carried out for these finite combinations of indicators and then passed to pointwise limits using appropriate convergence theorems. The pointwise approximation itself does not assert that measures of sets, integrals, or other quantities automatically converge; those conclusions require additional hypotheses and results.

A common pitfall is to confuse pointwise convergence with uniform convergence. For \(f(x)=1/x\) on \((0,1]\), the finite cap \(n\) means that at points with \(1/x>n\), the approximation is at most \(n\), so the error can be large. Nevertheless, at each fixed \(x>0\), the cap eventually exceeds \(1/x\), and the grid error then tends to zero. Pointwise convergence allows the stage at which a given error bound is reached to depend on the point.

Key takeaway: Every nonnegative finite-valued measurable function is the pointwise limit of an increasing sequence of nonnegative simple measurable functions. Dyadic rounding provides the approximation, while a rising truncation level keeps each stage simple and still allows every fixed function value to be reached.

Check Your Understanding

Use the construction and its proof to answer the following questions.

  1. Why does each set \(\{f\geq k2^{-n}\}\) in the construction have to be measurable?
  2. What role does the cap \(n\) play in ensuring that \(s_n\) is simple?
  3. Why does pairing two finer grid levels with each coarse level prove \(s_n\leq s_{n+1}\)?
  4. If \(f(x)=2.37\) and \(n>2.37\), what bounds can be stated for \(f(x)-s_n(x)\)?
  5. Why can the construction converge pointwise for \(f(x)=1/x\) on \((0,1]\) even though the function is unbounded?
  6. How can the positive and negative parts be used to approximate a real-valued measurable function by simple functions?