# Integral on continuous functions metric space, is it right?

The function $f$ is defined : $\begin{cases} C_{[0,1]}\to\mathbb{R} \\f\to f(0)\end{cases}$ And $C_{[0,1]}$ is the metric space of continuous functions with the integral metric $d$. We define a function $g$ that lies on the neighbourhood of $f$:

\begin{align}g:[0,1]&\to\mathbb{R}\\ x&\rightarrow\begin{cases}f(\epsilon^´)\frac{x}{\epsilon´}&\text{if }x<\epsilon´\\ f(x)&\text{otherwise}\end{cases}\end{align}

My question is about the integral. How can $\int_0^{\epsilon´}\left|f-g\right|\leqslant 2M\epsilon$ be true. Is this right? I got it from a textbook exercise solution. $M=sup\left|f\right|$.Thanks for reading!

\begin{align}d(f,g_n)&=\int_0^1\left|f-g\right|\\ &\ =\int_0^{\epsilon´}\left|f-g\right|\\ &\leqslant 2M\epsilon´ \end{align}

• Presumably $M$ is a bound for $|f|$ in which case the functions $f,g$ differ only for $x \in [0,\epsilon']$ and then $2M$ is a conservative upper bound for $|f(x)-g(x)|$ there. – copper.hat Mar 20 '17 at 15:53
• I have thought of that but when you compute the integral you get $M\epsilon´-M\epsilon´=0$ instead of $2M\epsilon$, right? – Pedro Gomes Mar 20 '17 at 15:59

Note that $g(x) = f(x)$ for $x > \epsilon'$.
$\int_0^1 |f-g| = \int_0^{\epsilon'} |f(x)-g(x)| dx \le \int_0^{\epsilon'} (|f(x)|+|g(x)|)dx \le \int_0^{\epsilon'} 2M dx = 2M \epsilon'$.
• Thank you I was doing$\int_0^{\epsilon'} (|f(x)|-|g(x)|)dx$ which was wrong. – Pedro Gomes Mar 20 '17 at 16:38