Specific algorithm for approximation by step functions

45 Views Asked by At

I was wondering whether the following is a successful approximation in sup norm and is used. For a continuous function $f$ on an interval $[a,b]$, can be approximated by a step function $\phi$ defined by

$\phi(x)=\begin{cases} f(x_{i-1}) &;x\in [x_{i-1},x_i) \\ f(b) &; x=b \end{cases}$

where $x_i=a+\frac{i}{n}\cdot(b-a)$ and $n$ large enough. This is true because $f$ is uniformly continous. In a more specific case, when $f$ is $K$-Lipschitz, such a function $\phi$ satisfies $\Vert f-\phi \Vert_\infty<\epsilon$ when $n>\frac{K}{\epsilon}$.

Is the above approximation method used at all, and are step functions actually used for practical approximation?