MHB How Can We Approximate a Continuous Function with a Piece-Wise Linear Function?

joypav
Messages
149
Reaction score
0
This is an exercise given in my real analysis course. We have definitions for continuity, uniform continuity, l.s.c and u.s.c., but I don't see how to apply them.
I guess I want to construct $φ$ piece by piece of the interval to eventually cover all of [a,b]?

Exercise:
A continuous function $φ$ on [a, b] is called piece-wise linear provided there is a partition
$a = x_0 < x_1 < · · · < x_n = b$ of [a, b] for which φ is linear on each interval $[x_{i−1}, x_i]$.
Let f be a continuous function on [a, b] and $\epsilon$ a positive number. Show that there is a
piece-wise linear function $φ$ on [a, b] with |$f(x) − φ(x)$| $< \epsilon$ for all x ∈ [a, b].
 
Physics news on Phys.org
joypav said:
I guess I want to construct $φ$ piece by piece of the interval to eventually cover all of [a,b]?

Hi joypav,

That sounds like a plan, or perhaps we can start with a uniform partition $x_i=a+ih$.
And then apply the $\varepsilon$-$\delta$-definition of continuity to a point $x_i$.
 
Since f is continuous, at each point x_0, there exist some \delta&gt; 0 such that is |x- x_0|&lt; \delta then |f(x)- f(x_0)|&lt; \epsilon. Take x_i and x_{i+1} such that |x_{i+1}- x_i|&lt; \delta and take the linear approximation to be the straight line from (x_i, f(x_i)) to (x_{i+1}, f(x_{i+1}).
 
Country Boy said:
Since f is continuous, at each point x_0, there exist some \delta&gt; 0 such that is |x- x_0|&lt; \delta then |f(x)- f(x_0)|&lt; \epsilon. Take x_i and x_{i+1} such that |x_{i+1}- x_i|&lt; \delta and take the linear approximation to be the straight line from (x_i, f(x_i)) to (x_{i+1}, f(x_{i+1}).
Notice that this method uses the fact that $f$ is uniformly continuous (so that you can use the same $\delta$ for each $x_i$). I think it would be much harder to prove the result without using uniform continuity.
 
Opalg said:
Notice that this method uses the fact that $f$ is uniformly continuous (so that you can use the same $\delta$ for each $x_i$). I think it would be much harder to prove the result without using uniform continuity.

Isn't a continuous function on a closed interval [a, b] uniformly continuous?
 
I like Serena said:
Isn't a continuous function on a closed interval [a, b] uniformly continuous?
Yes – I just wanted to point out that it is necessary to use that fact here.
 
I wrote up a proof.. I'll post it sometime today if y'all don't mind taking a look!
 
Consider a partition, $x_i = a + ih$, $h = \frac{b-a}{n}$, $n \in \Bbb{N}$.
Then $x_0 = a + 0(h) = a$ and $x_n = a + n(\frac{b-a}{n}) = a + b - a = b$.
Also, notice $x_0 < x_1 < ... < x_n$.
Because, $\forall i, 0 \leq i \leq n, x_i = a + ih < a + ih + h = x_{i+1}$

Consider, $(x_i, f(x_i)), (x_{i+1}, f(x_{i+1}))$ and the straight line connecting them.

Slope $= \frac{f(x_{i+1})-f(x_i)}{x_{i+1}-x_i} = \frac{f(x_{i+1})-f(x_i)}{a + ih + h -a -ih} = \frac{f(x_{i+1})-f(x_i)}{h}$
Let,
$\phi(x) = \frac{f(x_{i+1})-f(x_i)}{h} \cdot (x-x_i) + f(x_i)$

Now consider the difference,
$\left| f(x) - \phi(x) \right| = \left| f(x) - (\frac{f(x_{i+1})-f(x_i)}{h} \cdot (x-x_i) + f(x_i)) \right| $
$ = \left| f(x) + \frac{f(x_{i+1})-f(x_i)}{h} \cdot (x_i-x) - f(x_i) \right| = \left| f(x) - f(x_i) + \frac{f(x_{i+1})-f(x_i)}{h} \cdot (x_i-x) \right| $

By continuity of f on [a,b], f is continuous at $x_i$
$\implies \forall \epsilon_1>0, \exists \delta_1>0, \left| x-x_i \right|<\delta_1 \implies \left| f(x)-f(x_i) \right|<\epsilon_1$
Choose $\epsilon_1 < \epsilon / 2$.

f continuous on [a,b] a subset of R, [a,b] closed and bounded $\implies$ f is uniformly continuous on [a,b].
$\implies$ for $x_i, x_{i+1} \in [a,b]$,
$\implies \forall \epsilon_2>0, \exists \delta_2>0, \left| x_{i+1}-x_i \right|<\delta_2 \implies \left| f(x_{i+1})-f(x_i) \right|<\epsilon_2$
Choose $\epsilon_2 = \frac{\epsilon h}{2\delta_1}$.

Then,
$\left| f(x) - f(x_i) + \frac{f(x_{i+1})-f(x_i)}{h} \cdot (x_i-x) \right| < \epsilon_1 + \frac{\epsilon_2}{h}\cdot \delta_1 = \epsilon$
for $\delta = min(\delta_1, \delta_2)$.
 
Back
Top