Let there be the inner product of all polynomials of degree smaller or equal to 2: $\langle f,g\rangle=\int_0^1f(x)g(x)xdx$. Find orthonormal basis.
So I really tried this for an hour and it pretty much became annoying, as I can't tell what's my mistake. Let $E=\{1,x,x^2\}$ be the standard basis.
$u_1=1$
$u_2=x-\langle x,1\rangle1=x-\int_0^1x\cdot1\cdot x dx=x-\int_0^1x^2dx=x-\frac{1}{3}$
There is also $u_3$ but let's say I can find it successfully. Lets find the normal of $u_1$ and $u_2$:
$\|u_1\|=\sqrt{\int_0^11\cdot1 \cdot x dx}=\sqrt{\int_0^1x dx}=\sqrt{\frac{1}{2}} \rightarrow \hat u_1=\sqrt2$
$\|u_2\|=\sqrt{\int_0^1(x-\frac{1}{3})^2\cdot x dx}=\sqrt{\frac{1}{12}} \rightarrow \hat u_2=\sqrt{12}(x-\frac{1}{3})$
But $\langle u_1,u_2\rangle=\int_0^1\sqrt2 \cdot \sqrt{12}(x-\frac{1}{3})\cdot x dx \neq 0$.
What's my mistake?
Thanks in advance!
I think your mistake is when you put
$$ u_2 = x - \langle x , 1 \rangle \cdot 1 \ . $$
You indeed have that the second vector is something like
$$ u_2 = v_2 + \lambda v_1 \ , $$
where $v_1, v_2$ are the first vectors of your original basis. Now you want to replace them by $u_1, u_2$ being orthogonal. So you set $u_1 = v_1$ and impose
$$ 0 = \langle u_1, u_2\rangle = \langle v_1, v_2 + \lambda v_1\rangle = \langle v_1, v_2\rangle + \lambda \langle v_1, v_1\rangle \ . $$
Which entails that you must take
$$ \lambda = - \frac{\langle v_1, v_2 \rangle}{\langle v_1, v_1 \rangle} \ . $$
That is,
$$ u_2 = x - \frac{\langle 1, x \rangle}{\langle 1, 1 \rangle} \cdot 1 \ . $$
would be better.