# 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 $\ ||f-g||_2 = \sqrt (\int^b_a |f-g|^2 )$. The given hint was construct g with a suitable partition of [b,a]. Given $\ (x_1, x_2, ...., x_n)$ define $\ 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 $\ x_i\le t\le x_{i+1}$

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

Because f is Riemann integrable $\exists P_\epsilon$ : $\sum_{i=1}^{n} ({{M_i}^f} - {{m_i}^f} )\cdot\Delta x_i < \epsilon$
Let $\Delta \tilde{x} = max ( \Delta x_i : 1\le i \le n)$
Once again because f is Riemann integrable $\exists P_\epsilon '$ : $\sum_{i=1}^{n'} ({{M_i}^f} - {{m_i}^f})\cdot\Delta x_i < \epsilon ' \cdot\Delta\tilde{x}$ where $\epsilon ' = \min (\epsilon , \frac{\epsilon}{\sqrt{b-a}})$
Let $\ 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 $\forall$ $\ [x_i,x_{i+1}]$ in the partition $\ P ; \Delta x_i \le\Delta \tilde{x}$.
Let B $\ = \max ({{M_i}^f} - {{m_i}^f} : 1\le i \le N)$, let $\ i_0$ be such a number that $\ : 1\le i_0 \le N$ and $\ B = {{M_{i_0}^f} - {{m_{i_0}^f}$
$\ {{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 $\ B\cdot\Delta x_{i_0} < \epsilon '\cdot\Delta\tilde{x}$
$\Rightarrow B < \epsilon '$
$\sqrt (\int_b^a {|h|}^2 ) \le U({|h|}^2,P)$ $\forall$partitions P of [a,b]. $\ U({|h|}^2,P)$ is the upper sum of the partition.
$\int_b^a {|f-g|}^2 = \int_b^a {|h|}^2 < \int_b^a {\epsilon '}^2$
$\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$
$\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 $\mathbb{R} ^m$.

For the construction of the $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 $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