Let $f(x)=x$ and $g(x)=x^2-1$ for the vector space [0,1], the functions are real valued continuous functions. Which of the following is correct and why?
- $||f-g||^2=<f-g,f-g> = \int_0^1 (x - x^2-1)(x - x^2-1) dx$
OR........
- $||f-g||^2=<f-g,f-g> = \int_0^1 (x - x^2+1)(x - x^2+1) dx$
It seems that you should refresh some concepts.
$C([0,1])$, the set of all continues functions $f:[0,1]\to\mathbb{R}$ forms a vector space over $\mathbb{R}$. $C([0,1])$ forms an inner product space with the inner product $$ \langle f,g \rangle = \int_0^1 f(x)g(x) \, dx $$
The induced norm is defined as $||f|| = \sqrt{\langle f,f \rangle} $.
Thus, for $f(x) = x,\, g(x) = x^2-1$ we have $[f-g](x) = x - (x^2-1) = x - x^2 + 1.$ Now, $$ ||f-g||^2 = \langle f-g, f-g\rangle = \int_0^1 (x - x^2 + 1)(x - x^2 + 1)\, dx $$