Finding an approximate function using orthonormal basis

1.5k Views Asked by At

I'm trying to take a function in $C_0[0,1]$ space (let's call this $f(x)$) and trying to find the best approximate of $f(x)$ at $P_2[0,1]$ space (let's call this approximate $p(x)$). Note that $P_2[0,1]$ is a subspace of $C_0[0,1]$ and $f(x)$ is not an element of $P_2[0,1]$.

The first thing that I did was finding the orthonormal basis of $P_2[0,1]$ using the Gram-Schmidt process. I know that using the inner product between the function and the orthonormal basis will help me find the best approximate when the value of the innder product is at the minimum, but I am not quite understanding this part. How do I find $P(x)$ in a form of $ax^2+b x+c$?

Would anyone like to explain the process to me?

2

There are 2 best solutions below

0
On

You have a hidden inner product in your phrase "best approximation". Presumably your best approximation is one that minimizes $\int_0^1(f(x)-p(x))^2w(x)dx$ where $w(x)$ is a weight function. Each choice of $w(x)$ gives a different set of orthogonal polynomials. If you choose $w(x)=1$ you get the Legendre polynomials. On the interval $[-1,1]$ the first three are $1,x,\frac 12(3x^2-1)$

0
On

Let's start from the basis $1,x,x^2$. Applying Gram-Schmidt, we transform $x$ into $x-\int_0^1xdx = x-1/2$ and divide by the norm to get $\sqrt 12(x-1/2)$. Finally, we transform $x^2$ into $x^2 - \int_0^1 x^2 dx- \int_0^1 x^2 12 (x-1/2) dx(x-1/2) = x^2 - 1/3 - (x-1/2) = x^2 -x+1/6$ and divide by the norm to get $6\sqrt 5(x^2 - x + 1/6)$. In conclusion your orthonormal basis is

$$1, \sqrt 12(x-1/2), 6\sqrt 5(x^2 - x + 1/6).$$

Now the orthogonal projection operator from $C[0,1]$ onto the subspace $P_2[0,1]$ is given by $$P(f) = \int_0^1 f(x) dx + \int_0^1 f(x)\sqrt 12(x-1/2)dx \cdot \sqrt 12(x-1/2) + \int_0^1 f(x)6\sqrt 5(x^2 - x + 1/6) dx \cdot 6\sqrt 5(x^2 - x + 1/6).$$