6. [14 marks] In $C_R[-1,1]$ with inner product $\langle p(x), q(x) \rangle = \int_{-1}^1 p(x)q(x) \, dx$ and
$W = \text{span} \{1, x, x^2\}$.
a) [4 marks] Show that $\epsilon = 1, x, x^2$ is not an orthogonal basis for $W$.
b) [4 marks] Show that $\beta = q_1(x) = 1, q_2(x) = x, q_3(x) = 3x^2 - 1$ is an orthogonal basis for $W$
c) [4 marks] Compute the projection onto $W$ of $f(x) = e^x$. (in Matlab: exp(x).)
d) [2 marks] The computation from part c) can be expressed as a sentence. Fill in the blanks to
complete that sentence:
Of all the real polynomials $q(x)$ of degree \_\_\_\_\_\_ or less, the one that is closest to
\_\_\_\_\_\_ on the interval \_\_\_\_\_\_, in the sense that $\int_{-1}^1 | \_\_\_\_\_\_ |^2 \, dx$ is minimized, is
\_\_\_\_\_\_.