Use an inner product to find the projection onto the span of Fourier approximation

800 Views Asked by At

Using the inner product on $C[-\pi,\pi]$ given by $$ \langle f,g\rangle = \int_0^1 f(t)g(t)dt $$ Find the projection of $h(x) = x$ onto the span of $$\{1, \sin x, \cos x, \sin(2x), \cos(2x),\ldots,\sin(kx), \cos(kx)\}$$

I know this type of projection is called the Fourier approximation to $h$, and that the functions in the span are orthogonal.

2

There are 2 best solutions below

0
On

The definition of inner product is wrongly stated. The integral is from $-\pi$ to $\pi$ instead of $0$ to $1$. The given functions form an orthonormal set for this inner product. Hence the projection is $\sum\limits_{i=0}^{k} \langle h, \cos(ix) \rangle \cos(ix)+\sum\limits_{i=1}^{k} \langle h, \sin(ix) \rangle \sin(ix)$. You can integrate by parts to calculate the inner products in this sum.

0
On

Let's call

$$B:=\{1, \sin x, \cos x, \sin(2x), \cos(2x),\ldots,\sin(kx), \cos(kx)\}$$

for some $k\in\Bbb N$. Then you want to find the orthogonal projection of $h$ into the subspace defined by the span of $B$, namely $S$.

First you need to transform $B$ into an orthonormal basis. $B$ is already orthogonal so you need to normalize it, that is dividing each vector of the basis by it norm. Then suppose that you have your normalized basis, namely $B'$, then the projection of $h$ in $S$ is defined by

$$P_S h=\sum_{j=1}^{2k+1}\langle h,e_j\rangle e_j$$

where the $e_j$ are the vectors of the orthonormal basis $B'$ of $S$.