# Thread: Approximation of a Riemann integrable function w continuous function in the L2 metric

1. ## Approximation of a Riemann integrable function w continuous function in the L2 metric

Let f be a function that is Riemann integrable. Prove there exists a piece-wise linear continuous function g such that $\displaystyle \ ||f-g||_2 = \sqrt (\int^b_a |f-g|^2 )$. The given hint was construct g with a suitable partition of [b,a]. Given $\displaystyle \ (x_1, x_2, ...., x_n)$ define $\displaystyle \ g(t) = \frac{x_{i+1} - t}{\Delta x_i}\cdot f(x_i) + \frac{t-x_i}{\Delta x_i}\cdot f(x_{i+1})$ when $\displaystyle \ x_i\le t\le x_{i+1}$

Here is what I have so far.
So on an interval [$\displaystyle \ x_i , x_{i+1}$] either $\displaystyle \ 1) f(x_i)\le g(t) \le f(x_{i+1})$ or $\displaystyle \ 2) f(x_{i+1})\le g(t) \le f(x_i)$
So for a given partition P $\displaystyle \ = (x_1, x_2, ......, x_n)$, Let $\displaystyle \ M_i$ be the sup and $\displaystyle \ m_i$ be the inf of the interval $\displaystyle \ [x_i , x_{i+1}]$.
Let h = |f-g| , for an arbitrary partition resulting from integrating f, let $\displaystyle \ K_i$ be the sup for the function h over the interval $\displaystyle \ [x_i , x_{i+1}]$ . Now $\displaystyle \ K_i \le \max ( {{M_i}^f} - {{m_i}^g} , {{M_i}^g} - {{m_i}^f} )$. $\displaystyle \ {{M_i}^f}$ is the sup and $\displaystyle \ {{m_i}^f}$ is the inf of f over the interval $\displaystyle \ [x_i , x_{i+1}]$. $\displaystyle \ {{M_i}^g}$ is the sup and $\displaystyle \ {{m_i}^g}$ the inf of g over the interval $\displaystyle \ [x_i , x_{i+1}]$. Now $\displaystyle \ {{m_i}^f}\le f(x_i),f(x_{i+1}) \le {{M_i}^f}$ combined with $\displaystyle \ 1)$ and $\displaystyle \ 2)$ $\displaystyle \Rightarrow \ K_i \le {{M_i}^f} - {{m_i}^f}$

Because f is Riemann integrable $\displaystyle \exists P_\epsilon$ : $\displaystyle \sum_{i=1}^{n} ({{M_i}^f} - {{m_i}^f} )\cdot\Delta x_i < \epsilon$
Let $\displaystyle \Delta \tilde{x} = max ( \Delta x_i : 1\le i \le n)$
Once again because f is Riemann integrable $\displaystyle \exists P_\epsilon '$ : $\displaystyle \sum_{i=1}^{n'} ({{M_i}^f} - {{m_i}^f})\cdot\Delta x_i < \epsilon ' \cdot\Delta\tilde{x}$ where $\displaystyle \epsilon ' = \min (\epsilon , \frac{\epsilon}{\sqrt{b-a}})$
Let $\displaystyle \ P = P_\epsilon \bigcup P_\epsilon '$. Construct the function g out of the partition P in piece-wise linear manner as decribed above. Let N be the number of points in P, it has at most has n + (n' -2) points and $\displaystyle \forall$ $\displaystyle \ [x_i,x_{i+1}]$ in the partition $\displaystyle \ P ; \Delta x_i \le\Delta \tilde{x}$.
Let B $\displaystyle \ = \max ({{M_i}^f} - {{m_i}^f} : 1\le i \le N)$, let $\displaystyle \ i_0$ be such a number that $\displaystyle \ : 1\le i_0 \le N$ and $\displaystyle \ B = {{M_{i_0}^f} - {{m_{i_0}^f}$
$\displaystyle \ {{M_{i_0}^f} - {{m_{i_0}^f}\cdot\Delta x_{i_0} \le \sum_{i=1}^{N} ({M_i}^f} - {{m_i}^f})\cdot\Delta x_i < \epsilon '\cdot\Delta\tilde{x}$
Therefore $\displaystyle \ B\cdot\Delta x_{i_0} < \epsilon '\cdot\Delta\tilde{x}$
$\displaystyle \Rightarrow B < \epsilon '$
$\displaystyle \sqrt (\int_b^a {|h|}^2 ) \le U({|h|}^2,P)$ $\displaystyle \forall$partitions P of [a,b]. $\displaystyle \ U({|h|}^2,P)$ is the upper sum of the partition.
$\displaystyle \int_b^a {|f-g|}^2 = \int_b^a {|h|}^2 < \int_b^a {\epsilon '}^2$
$\displaystyle \int_b^a {\epsilon '}^2 = {\epsilon '}^2\cdot (b-a) \le (\frac{\epsilon}{\sqrt (b-a)})^2 \cdot (b-a) = \frac{{\epsilon}^2}{b-a}\cdot (b-a) = {\epsilon}^2$
$\displaystyle \Rightarrow ||f-g||_2 = \sqrt (\int^b_a |f-g|^2 ) < \epsilon$
Please let me know where I went wrong or if this whole approach is wrong.

can someone let me know of any good readings about Lp spaces and motivation for the Lp metric's construction.

2. Your solution seems good (I only skimmed it though), just notice that the approach is very similar to when you try to calculate the lenght of a curve in some $\displaystyle \mathbb{R} ^m$.

For the construction of the $\displaystyle L^p$ spaces there are several equivalent approaches (all of which require a knowledge of the Lebesgue integral): There's the measure theoretic approach, the metric space completion of certain spaces under the $\displaystyle L^p$ norm, etc. If you want an analytic approach Jöst's "Postmodern analysis" is a good option, if you're interested in measure theory Halmos' "Measure theory" and Bartle's "Elements of integration and Lebesgue measure" are classics.

3. thanks a lot for the book suggestions