I have to determine which of the following formula defines a metric.
- $d(f,g)=\sup_{x\in[-1,1]} |x|\cdot|f(x)-g(x)|$ on $B([-1,1],\mathbb{R})$
- $d(f,g)=\int_{-1}^1 |x|\cdot|f(x)-g(x)|\ dx$ on $C^0([-1,1],\mathbb{R})$
where $B(S,\mathbb{R}):=\{f:S\to\mathbb{R}|f$ is bounded$\}$.
My attempt:
I know the definition of the metric, i.e. a function $d:S\times S\to\mathbb{R}_0^+$ is a metric on a set $S$ if for all $x,y,z\in X$:
- $d(x,y)\geq 0$ and $d(x,y)=0\Leftrightarrow x=y$,
- $d(x,y)=d(y,x)$
- $d(x,y)\leq d(x,z)+d(z,y)$.
In my opinion, the both formulas fulfill the conditions for a metric:
(a) $d(f,g)=0$ if $x=0$ or $f\equiv g$.
(b) $d(f,g)=\sup |x|\cdot|f(x)-g(x)| = \sup |x|\cdot|-1|\cdot|g(x)-f(x)|=d(g,f)$
(c) $d(f,g)=\sup |x|\cdot |f(x)-h(x)+h(x)-g(x)|\leq \sup |x|\cdot|f(x)-h(x)|+\sup |x|\cdot |h(x)-g(x)| = d(f,h)+d(h,g).$
The same as in 1.
Actually, the first one is not a metric. Take $f(x)=0$ and$$g(x)=\begin{cases}1&\text{ if }x=0\\0&\text{ otherwise.}\end{cases}$$Then $f\neq g$, but $d(f,g)=0$.