# Need calculation help! ( gram-schmidt formula)

I tried to use gram-schmidt formula.
Let $V=\operatorname{span}(S)$ with $\left\langle f,g\right\rangle=\int_{0}^{\pi}f(t)g(t)dt$ and $S$={$\sin t,\cos t, t,1$}.
Rename the elements of $S$ as $w_1, w_2, w_3, w_4$.
$v_1=w_1$.
$v_2=w_2-\dfrac{\left\langle w_2,v_1\right\rangle}{\left \| v_1 \right\|^2}v_1=\cos t$. (Thanks to AWertheim's help)
Using the same formula, $v_3=1-4/\pi \sin t$?
Then this problem becomes too complicated. Can anyone get $v_4$?

• Could you be more specific about the trouble you're having? May 27, 2013 at 3:58
• @AWertheim I get $\parallel v_1\parallel^2=\frac{\pi}{2}$ , $<w_2,v_1>=\cos t \sin t$ and then other things messed up... May 27, 2013 at 4:00
• That calculation looks right to me, though your inner product needs to evaluate $\int_{0}^{\pi} \cos t \sin t dt$. I'm happy to post an answer, but what makes you think you are messing up? May 27, 2013 at 4:03
• @AWertheim You're right! $<w_2, v_1>$ is not a scalar values as I wrote and I should calculate it as a integral value! Thanks, I'll try it right now. Hope to get the answer... May 27, 2013 at 4:06

## 1 Answer

Let $v_{1} = \sin t$. Then $$v_{2} = w_{2} - \frac{\langle w_{2}, v_{1}\rangle}{\parallel v_{1} \parallel ^{2}}v_{1}$$

Let's calculate each term individually.

$w_{2} = \cos t$, so:

$$\langle w_{2}, v_{1} \rangle = \int_{0}^{\pi}\sin t\cos t dt$$

Using the substitution $u = \sin t, du = \cos t dt$, we get:

$$\langle w_{2}, v_{1} \rangle = \int_{0}^{0} udu = 0$$

Hence, we get $v_{2} = w_{2} - 0v_{1} = w_{2}$. (N.B: strictly speaking, we need to also check that $\parallel v_{1} \parallel^{2}$ is nonzero, but you've already done this!)

(The other way to look at this is that with respect to this inner product, $\cos t$ and $\sin t$ are already orthogonal!)