1. ## Gram-Schmidt procedure

Right i have a rather large project to do and its split into 12 parts. This is the first part and im posting my answer to it. I one of those 'using the result of the previous part' projects so i figure i'd better get the first part right! Could someone please tell me if this is done right?

Let P denote the vector space of real polynomials and $P_n$ the subspace polynomials of degree $\le n$. We define an inner product on P by

$(f,g) = \int_{-1}^{1}f(x)g(x)dx$.

1. Apply the Gram-Schmidt procedure to $(1,x,x^2,x^3,x^4)$ to construct an orthogonal basis of $P_4$. Normalize the basis vectors such that they take the value 1 when x = 1. (Im having a bit of trouble with the normalization bit...)

My solution so far... (shortened a bit cos its a lot to type!)
$(v_1,v_2,v_3,v_4,v_5)=(1,x,x^2,x^3,x^4)$
and $(u_1,u_2,u_3,u_4,u_5)$ is the basis i am trying to find.

Let $u_1 = v_1$
_______________________
$u_2 = v_2 - \frac{(v_2,u_1)}{(u_1,u_1)}u_1$
$(u_1,u_1) = \int_{-1}^{1}dx = 2. (v_2,u_1) = \int_{-1}^{1}xdx = 0$
so $u_2 = v_2 - 0 = v_2 = x$
__________________________________
$u_3 = v_3 - \frac{(v_3,u_1)}{(u_1,u_1)}u_1 - \frac{(v_3,u_2)}{(u_2,u_2)}u_2$

$(v_3,u_1) = \int_{-1}^{1}x^2 dx = \frac{2}{3}$

$(v_3,u_2) = \int_{-1}^{1}x^3 dx = 0$

so $u_3 = v_3 - \frac{2}{3} = x^2 - \frac{2}{3}$
_______________________________________________

$u_4 = v_4 - \frac{(v_4,u_1)}{(u_1,u_1)}u_1 - \frac{(v_4,u_2)}{(u_2,u_2)}u_2 - \frac{(v_4,u_3)}{(u_3,u_3)}u_3$

$(v_4,u_1) = \int_{-1}^{1}x^3 dx = 0$

$(v_4,u_2) = \int_{-1}^{1}x^4 dx = \frac{2}{5}$

$(v_4,u_3) = \int_{-1}^{1}x^3 (x^2 - \frac{2}{3}) dx = 0$

$(u_2,u_2) = \int_{-1}^{1}x^2 dx = \frac{2}{3}$

so $u_4 = x^3 - \frac{\frac{2}{5}}{\frac{2}{3}}x = x^3 - \frac{3x}{5}$
__________________________________________________ ___
$u_5 = v_5 - \frac{(v_5,u_1)}{2}u_1 - \frac{(v_5,u_2)}{\frac{2}{3}}u_2 - \frac{(v_5,u_3)}{(u_3,u_3)}u_3 - \frac{(v_5,u_4)}{(u_4,u_4)}u_4$

$(v_5,u_1) = \int_{-1}^{1}x^4dx = \frac{2}{5}$

$(v_5,u_2) = \int_{-1}^{1}x^5dx = 0$

$(v_5,u_3) = \int_{-1}^{1}x^4(x^2 - \frac{2}{3})dx = \frac{16}{105}$

$(u_3,u_3) = \int_{-1}^{1}(x^2 - \frac{2}{3})^2 dx = \frac{2}{5}$

$(v_5,u_4) = \int_{-1}^{1}x^4(x^3 - \frac{3x}{5})dx = 0$

so $u_5 = x^4 - \frac{8x^3}{21} - \frac{8x}{35} - \frac{1}{5}$

SO!
basis is $(1,x,x^2 - \frac{2}{3},x^3 - \frac{3x}{5},x^4 - \frac{8x^3}{21} - \frac{8x}{35} - \frac{1}{5})$

If thats right how do you normalize it?

Right i have a rather large project to do and its split into 12 parts. This is the first part and im posting my answer to it. I one of those 'using the result of the previous part' projects so i figure i'd better get the first part right! Could someone please tell me if this is done right?

Let P denote the vector space of real polynomials and $P_n$ the subspace polynomials of degree $\le n$. We define an inner product on P by

$(f,g) = \int_{-1}^{1}f(x)g(x)dx$.

1. Apply the Gram-Schmidt procedure to $(1,x,x^2,x^3,x^4)$ to construct an orthogonal basis of $P_4$. Normalize the basis vectors such that they take the value 1 when x = 1. (Im having a bit of trouble with the normalization bit...)

My solution so far... (shortened a bit cos its a lot to type!)
$(v_1,v_2,v_3,v_4,v_5)=(1,x,x^2,x^3,x^4)$
and $(u_1,u_2,u_3,u_4,u_5)$ is the basis i am trying to find.

Let $u_1 = v_1$
_______________________
$u_2 = v_2 - \frac{(v_2,u_1)}{(u_1,u_1)}u_1$
$(u_1,u_1) = \int_{-1}^{1}dx = 2. (v_2,u_1) = \int_{-1}^{1}xdx = 0$
so $u_2 = v_2 - 0 = v_2 = x$
__________________________________
$u_3 = v_3 - \frac{(v_3,u_1)}{(u_1,u_1)}u_1 - \frac{(v_3,u_2)}{(u_2,u_2)}u_2$

$(v_3,u_1) = \int_{-1}^{1}x^2 dx = \frac{2}{3}$

$(v_3,u_2) = \int_{-1}^{1}x^3 dx = 0$

so $u_3 = v_3 - \frac{2}{3} = x^2 - \frac{2}{3}$
_______________________________________________

$u_4 = v_4 - \frac{(v_4,u_1)}{(u_1,u_1)}u_1 - \frac{(v_4,u_2)}{(u_2,u_2)}u_2 - \frac{(v_4,u_3)}{(u_3,u_3)}u_3$

$(v_4,u_1) = \int_{-1}^{1}x^3 dx = 0$

$(v_4,u_2) = \int_{-1}^{1}x^4 dx = \frac{2}{5}$

$(v_4,u_3) = \int_{-1}^{1}x^3 (x^2 - \frac{2}{3}) dx = 0$

$(u_2,u_2) = \int_{-1}^{1}x^2 dx = \frac{2}{3}$

so $u_4 = x^3 - \frac{\frac{2}{5}}{\frac{2}{3}}x = x^3 - \frac{3x}{5}$
__________________________________________________ ___
$u_5 = v_5 - \frac{(v_5,u_1)}{2}u_1 - \frac{(v_5,u_2)}{\frac{2}{3}}u_2 - \frac{(v_5,u_3)}{(u_3,u_3)}u_3 - \frac{(v_5,u_4)}{(u_4,u_4)}u_4$

$(v_5,u_1) = \int_{-1}^{1}x^4dx = \frac{2}{5}$

$(v_5,u_2) = \int_{-1}^{1}x^5dx = 0$

$(v_5,u_3) = \int_{-1}^{1}x^4(x^2 - \frac{2}{3})dx = \frac{16}{105}$

$(u_3,u_3) = \int_{-1}^{1}(x^2 - \frac{2}{3})^2 dx = \frac{2}{5}$

$(v_5,u_4) = \int_{-1}^{1}x^4(x^3 - \frac{3x}{5})dx = 0$

so $u_5 = x^4 - \frac{8x^3}{21} - \frac{8x}{35} - \frac{1}{5}$

SO!
basis is $(1,x,x^2 - \frac{2}{3},x^3 - \frac{3x}{5},x^4 - \frac{8x^3}{21} - \frac{8x}{35} - \frac{1}{5})$

If thats right how do you normalize it?
Try:

$u_i^*(x)=u_i(x)/u_i(1)$

RonL