= Solution
Assume $a<b$. On <continuous functions> on this compact interval, both proposed distances are finite and symmetric, and vanish on identical <functions>. For the <supremum norm>, zero distance plainly implies pointwise equality. For the <L2 norm>, if a continuous difference is nonzero at any point, it stays bounded away from zero on a subinterval of positive length. Its squared <integral> is then positive, so zero distance also implies equality.
For the first <metric>, the pointwise <triangle inequality> followed by the supremum gives $d_1(x,z)\leq d_1(x,y)+d_1(y,z)$. For the second, put $u=x-y$, $v=y-z$. The <Cauchy-Schwarz inequality> gives
$$
\|u+v\|_2^2\leq\|u\|_2^2+2\|u\|_2\|v\|_2+\|v\|_2^2=(\|u\|_2+\|v\|_2)^2.
$$
Taking square roots proves the required <triangle inequality>. Thus both are <metrics>.
\b[The continuous-function space is complete in the uniform <metric>.] If $(x_n)$ is a <Cauchy sequence> in $d_1$, at each $t$ its scalar values have a limit $x(t)$, by completeness of the scalar field. Given $\varepsilon>0$, choose $N$ with $\|x_n-x_m\|_\infty<\varepsilon$ for $m,n\geq N$. Letting $m\to\infty$ gives $|x_n(t)-x(t)|\leq\varepsilon$ uniformly in $t$. Hence there is <uniform convergence>. To see that the limit is continuous at $t_0$, approximate it uniformly by one continuous $x_n$ and use
$$
|x(t)-x(t_0)|\leq|x(t)-x_n(t)|+|x_n(t)-x_n(t_0)|+|x_n(t_0)-x(t_0)|.
$$
The outer terms can be made small uniformly, and the middle term is small near $t_0$. This proves the needed <uniform limit theorem> and <completeness>.
For the second <metric>, let $H$ be zero on $(-1,0)$ and one on $(0,1)$; its value at zero is immaterial to the <integral>. The supplied ramp <functions> are continuous and satisfy
$$
\|x_n-H\|_2^2=\int_0^{1/n}(1-nt)^2\,dt=\frac1{3n}.
$$
Although $H$ is not in the continuous-function space, the <integral> <triangle inequality> yields $d_2(x_m,x_n)\leq(3m)^{-1/2}+(3n)^{-1/2}\to0$. Thus the <sequence> is <Cauchy>. If it converged in $d_2$ to a continuous $x$, the same inequality would give $\|x-H\|_2=0$. <Continuity> would then force $x=0$ on the negative half-interval and $x=1$ on the positive half-interval, contradicting <continuity> at zero. Therefore \b[the continuous-function space is not complete in $d_2$]; its limit in the larger <L2 space> is the discontinuous step.
Back to article page