# Gram-Schmidt & Inner Space Question?

I've been confused about this question from my homework and was hoping if someone could tell me how to do them, or if there are any substitutions to be made in these types of problems?

(a) In the space [-1, 1], we introduce the inner product $\langle f, g\rangle = \frac{1}{2} \int_{-1}^{1}f(t)g(t)dt$. Applying the Gram-Schmidt process to the standard basis $1, t, t^2, t^3 of P_3$, construct an orthonormal basis of $g_0 (t), g_1 (t), g_2 (t), g_3 (t)$ of $P_3$ for the given inner product.

(b) Find the polynomial g(t) in $P_3$ that best approximates the function $f(t) = \frac{1}{1+ t^2}$ on the interval [-1, 1], for the inner product introduced in this exercise. Draw a sketch.

• For $(a)$ just apply the Gram-Schimdt process as usual. For $(b)$ I assume they want you to find the orthogonal projection of $f$ onto $P_3$ wrt $\langle \cdot, \cdot \rangle$. – user137731 Jul 17 '16 at 18:21
• That's the part I am confused about, my professor mentioned substitution u1 and u2 in order to get g1 and g2? Could someone possibly set up these equations for me because I'm very confused. – skancharla Jul 17 '16 at 18:38

The Gram-Schmidt process is a way of turning a basis $\{b_1, \dots, b_n\}$ into an orthonormal basis $\{e_1, \dots, e_n\}$. Here's the process:

First we'll obtain an orthogonal set $\{f_i\}$.

Set $f_1 = b_1$.

Then we set $f_i = b_i - \sum_{j=1}^{i-1}\operatorname{proj}_{\operatorname{span}(f_j)}(b_i)$ for all $1<i\le n$.

Then finally we get the orthonormal basis $\{e_i\}$ by setting each $e_i = \frac{f_i}{\|f_i\|}$.

That's it.

In the above process we use the orthogonal projection which is defined by $$\operatorname{proj}_{u}(v) = \frac{\langle u,v\rangle}{\langle u,u\rangle}u$$

and the norm which is defined by

$$\|f\| = \sqrt{\langle f, f\rangle}$$

So in part $(a)$ of your assignment, you'll set $f_1 = 1$ and then $$e_1 = \frac{1}{\sqrt{\int_{-1}^1 1^2\ dt}}=\frac 1{\sqrt{2}}$$

And then $$f_2 = t-\frac{\int_{-1}^1 1\cdot t\ dt}{\int_{-1}^1 1^2\ dt}1 = t-\frac{0}{2}=t$$

Then $e_2 = \dfrac{t}{\sqrt{\int_{-1}^1 t^2\ dt}} = \sqrt{\frac {3}{2}}\ t$.

Continue on to get $e_3$ and $e_4$.

For part $(b)$ you need to find $$\text{Best approximation in P_3} = \sum_i\operatorname{proj}_{e_i}(f)$$