Distance of a function from a subspace

176 Views Asked by At

Let $f \in L^2([-a,a])$. Trying to find $\mathrm{dist}(f,S)$ in $L^2([-a,a])$ (where S is the subspace of real polynomials of max degree $2$, like $a+bx+cx^2$) and knowing that $\langle f,a\rangle=0$ and $\langle f,bx\rangle=0$, can we proceed by considering just $$ \left(\int_{-a}^a |f-cx^2|^2\right)^{1/2} $$ and minimizing with respect to $c$?

1

There are 1 best solutions below

0
On BEST ANSWER

The best $L^2$ approximation to $f$ is going to be the orthogonal projection of $f$ onto $S$, let's call it $P_S(f)$. With that in mind, the simplest way to find this projection is to find an orthonormal basis $\{e_1,e_2,e_3\}$ for $S$ using Gram-Schmidt (this will be easy for your subspace), then

$$ P_S(f)=\sum_{j=1}^3\langle f,e_j\rangle e_j $$ The distance from $f$ to $S$ is then simply $\|f-P_S(f)\|_2$.