Norm computation inside a space

26 Views Asked by At

Just want to check my solution.

Let $V$ be a vector space with the inner product $\langle f(x),g(x)\rangle =\int_{-\infty}^\infty f(x)\cdot g(x)dx$ and let: $$f(x)=\begin{cases} 1 & \quad 0\leq x<1\\ 2 & \quad 1\leq x<2\\ -1 & \quad 2\leq x<3\\ \end{cases}$$

$$h(x)=\begin{cases} \frac{5}{3} & \quad 0\leq x<1\\ \frac{4}{3} & \quad 1\leq x<2\\ -\frac{1}{3} & \quad 2\leq x<3\\ \end{cases}$$

calculate $\|f(x)-h(x)\|$

So I went by: $$\|f-h\|=\sqrt{\left(\int_0^1 -\frac{2}{3}dx+\int_1^2 \frac{2}{3}dx+\int_2^3 -\frac{2}{3}dx \right)}=\sqrt{\left(-\frac{2}{3}+\frac{2}{3}-\frac{2}{3} \right)}=\sqrt{\left(\frac{2}{3} \right)}$$ The answer is showing $\frac{2}{\sqrt{3}}$. Where have I gone wrong? Or is it correct?

1

There are 1 best solutions below

0
On BEST ANSWER

We compute \begin{align} \langle f-h,f-h\rangle &= \int_{-\infty}^\infty (f(x)-h(x))^2\,\mathsf dx\\ &= \int_0^1 \left(1-\frac53\right)^2\,\mathsf dx + \int_1^2\left(2-\frac43\right)^2\,\mathsf dx+\int_2^3 \left(-1+\frac13\right)^2\,\mathsf dx\\ &= \frac49 + \frac49 +\frac49\\ &= \frac43, \end{align} and hence $$\|f-h\| = \langle f-h,f-h\rangle^{\frac12} = \frac2{\sqrt3}. $$