Find the projection of a function $f(x)=1$ to a subspace

147 Views Asked by At

I have to find a projection of a function $f(x)=1$ to a subspace $M$ in $L^2(0,1)$ generated by $f_1(x)=x$ and $f_2(x)=x^2$ and then find the distance between $f$ and subspace $M$.
I post the answer I came up with.

2

There are 2 best solutions below

0
On BEST ANSWER

The orthogonal projection of $f$ onto the closed subspace $M=[\{x,x^2\}]$ is the unique $ax+bx^2$ such that $(f-ax-bx^2)\perp M$, which gives a $2x2$ system of equations for $a,b$:

$$ \langle 1-ax-bx^2, x\rangle = 0 \\ \langle 1-ax-bx^2, x^2\rangle = 0. $$ This becomes $$ \int_{0}^{1}(1-ax-bx^2)x dx = 0 \\ \int_{0}^{1}(1-ax-bx^2)x^2 dx = 0 $$

or

$$ \frac{1}{2}-\frac{1}{3}a-\frac{1}{4}b=0 \\ \frac{1}{3}-\frac{1}{4}a-\frac{1}{5}b=0. $$ The distance from $f$ to $M$ is $$ \|f-ax-bx^2\| = \left(\int_0^1 (1-ax-bx^2)^2dx\right)^{1/2} $$

4
On

Idea of a solution

First I go for several inner product defined in $L^2$ as $$\langle f,g\rangle=\int_{0}^{1}f(x)g(x)dx$$ so I get the following numbers: $\langle1,x\rangle=\frac{1}{2}$, $\langle 1,x^{2}\rangle=\frac{1}{3}$.
Now, I apply the formula for the projection $$P(f)=\langle 1,x\rangle x+\langle 1,x^{2}\rangle x^{2}=\frac{1}{2}x+\frac{1}{3}x^{2}$$ The distance is given by $\left\Vert f-\frac{1}{2}x-\frac{1}{3}x^{2}\right\Vert ^{2}$ and since the norm in $L^2$ is $\Vert f \Vert^2 = \int^1_0|f(x)|^2$dx I obtain a square of the distance: $$\left\Vert f-\frac{1}{2}x-\frac{1}{3}x^{2}\right\Vert ^{2}=\int_{0}^{1}(1-\frac{1}{2}x-\frac{1} {3}x^{2})^{2}dx=0.4666...$$ I wonder if I should change the the coefficients in the formula for the $P(f)$ but it seems I got it right