approximating functions via a piecewise combination of linear and constant functions

219 Views Asked by At

I am curious if anyone has encountered any literature on approximating functions via a piecewise combination of linear and constant functions.

I have seen a couple of papers which use piecewise constant functions only or piecewise linear functions only but not a combination of both.

Has anyone seen any published work on what I'm looking for?

Thanks!

2

There are 2 best solutions below

0
On

In this context, linear functions are of the form $a\,x+b$. Thus, constant functions are a particular case of linear functions when $a=0$. This type of approximation is called linear interpolation.

0
On

Any continuous function on an interval $[a,b]$ can be approximated using such an interpolation:

Partition $[a,b]$ into $[a=x_0,x_1,x_2,\ldots,x_n=b]$, and then your approximation will be given by:

$$f^*(x) = \begin{cases} f(x_k), & \text{if $x=x_k$} \\ y_k, & \text{otherwise} \end{cases}$$

with $y_k$ satisfying, for $0\le k\le n-1$:

$$\frac{f(x_k)-f(x_{k+1})}{x_k-x_{k+1}}=\frac{y_k-f(x_k)}{x-x_k}$$

That's why it is called a "linear" interpolation.

Note that, for all $x\in[a,b]$:

$$\lim\limits_{n\to\infty} f^*(x)=f(x)$$