I am having trouble solving the following question,
Let $P_9 ([-1,1])$ be the complex vector space consisting of polynomials $p:[-1,1] \rightarrow\mathbb{C}$ with degree 9 or lower. With the inner product
$$\langle f,g\rangle = \int_{-1}^1 \! f(t)\overline{g(t)} \, \mathrm{d}t$$
Let $W$ be the subspace of $P_9$ spanned by the polynomials of even degree. So $W$ is the span of $\{1,t^2,t^4,t^6,t^8\}$.
a) Determine the best approximation in $W$ of the polynomial $t^3$.
I assumed it had to be a least squares approximation problem and so I tried and horribly failed at making a matrix $A$ to use $A^tAx=A^tb$ where $x$ and $b$ are vectors. Can anyone point me in the right direction?
You need to minimize
which can be done by differentiating with respect to $a_i, i=0,\ldots,4$ and equating to $0$ and solving the resulted system in $a_i$